|
|
@ -7,6 +7,7 @@ use std::{
|
|
|
|
use generational_arena::{
|
|
|
|
use generational_arena::{
|
|
|
|
Arena, Index,
|
|
|
|
Arena, Index,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
use bitflags::bitflags;
|
|
|
|
use cryptohelpers::{
|
|
|
|
use cryptohelpers::{
|
|
|
|
rsa::{
|
|
|
|
rsa::{
|
|
|
|
RsaPublicKey, RsaPrivateKey,
|
|
|
|
RsaPublicKey, RsaPrivateKey,
|
|
|
@ -82,6 +83,20 @@ pub enum MaybeEncrypted
|
|
|
|
Unencrypted(Data),
|
|
|
|
Unencrypted(Data),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bitflags! {
|
|
|
|
|
|
|
|
/// And additional metadata for values
|
|
|
|
|
|
|
|
#[derive(Serialize, Deserialize)]
|
|
|
|
|
|
|
|
struct Tags: u16
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
/// Default
|
|
|
|
|
|
|
|
const NONE = 0;
|
|
|
|
|
|
|
|
/// This value should be cloned on write unless specified elsewhere.
|
|
|
|
|
|
|
|
const COW = 1<<0;
|
|
|
|
|
|
|
|
/// This should not show up in searches
|
|
|
|
|
|
|
|
const HIDDEN = 1<<1;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// Information about a map entry.
|
|
|
|
/// Information about a map entry.
|
|
|
|
#[derive(Debug, Serialize, Deserialize)]
|
|
|
|
#[derive(Debug, Serialize, Deserialize)]
|
|
|
|
pub struct Info
|
|
|
|
pub struct Info
|
|
|
@ -92,7 +107,8 @@ pub struct Info
|
|
|
|
modified: u64,
|
|
|
|
modified: u64,
|
|
|
|
|
|
|
|
|
|
|
|
enable_versioning: bool,
|
|
|
|
enable_versioning: bool,
|
|
|
|
hidden: bool,
|
|
|
|
|
|
|
|
|
|
|
|
tags: Tags,
|
|
|
|
|
|
|
|
|
|
|
|
owner: Option<Vec<user::EntityID>>, //starts as the user that created (i.e. same as `created_by`), or `None` if ownership is disabled
|
|
|
|
owner: Option<Vec<user::EntityID>>, //starts as the user that created (i.e. same as `created_by`), or `None` if ownership is disabled
|
|
|
|
signed: Option<Vec<Signature>>,
|
|
|
|
signed: Option<Vec<Signature>>,
|
|
|
|