Documentation ¶
Index ¶
Constants ¶
const ALLFILE = USER | DATE | NAME
ALLFILE are all the types of tags that are associated with a File
ALLSTORE are all the types of tags that are associated with a FileStore
const ALLSYNTH = TOPIC | ACTION | RESOURCE | PROCESS
ALLSYNTH is the combination of TOPIC, ACTION, RESOURCE, and PROCESS
const ALLTYPES = Type(math.MaxUint32)
ALLTYPES is the compound of all possible tag types
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Data ¶
Data maps a tag type to an abitrary collection of string to string mappings
func (Data) Contains ¶
Contains returns true if all data fields in the provided data match the fields in the original
func (Data) FilterType ¶
FilterType returns a new instance of tag data that is a subset of keys defined by the type
func (Data) MarshalBSON ¶
MarshalBSON converts Data into a bson representation
func (*Data) UnmarshalBSON ¶
UnmarshalBSON converts bson representation back into Data
type FileTag ¶
type FileTag struct { Tag `bson:",inline"` File types.FileID `bson:"file"` Owner types.OwnerID `bson:"owner"` }
FileTag is a Tag tied to a File
type Tag ¶
type Tag struct { Word string `bson:"word" json:"word"` Type Type `bson:"type" json:"type"` Data Data `bson:"data" json:"data"` }
Tag is a combination of a word and a type to attach to a file or store Data is to store additional data about a particular tag
func BuildNameTags ¶
BuildNameTags converts a string into tags of that string and substrings that are alpha numeric sequences
func ExtractContentTags ¶
ExtractContentTags generates an array of tags for each unique word as defined by ScanWords
type Type ¶
type Type uint32
Type is a byte flag for different kinds of tags
Types of tags, bitwise or them together to make compound tags
func DecodeType ¶
DecodeType converts String representation back to Type