Documentation
¶
Index ¶
- func Close()
- func Delete(bucket, key string) error
- func Init(location string, buckets []string)
- func Read(bucket, key string) []byte
- func Scan() map[string]Person
- func ScanObjectBoxes() map[string]ObjectBox
- func ScanObjects() map[string]UserObject
- func Write(bucket, key string, value []byte) error
- type ObjectBox
- type Person
- type UserObject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ScanObjectBoxes ¶
Scan updates the (memory) user map. Must be called after writes to the userdata db to get the true map
func ScanObjects ¶
func ScanObjects() map[string]UserObject
Scan updates the (memory) user map. Must be called after writes to the userdata db to get the true map
Types ¶
type UserObject ¶
type UserObject struct {
OwnerID string
ObjectID string
Title string
Filename string
Extension string
Data string `json:",omitempty"` // base64 encoded inside json encoded
TimeCreated time.Time `json:",string"`
TimeModified time.Time `json:",string,omitempty"`
Size int `json:",string"`
IsMessage bool `json:",string,omitempty"`
IsMedia bool `json:",string,omitempty"`
IsFile bool `json:",string,omitempty"`
IsPublic bool `json:",string,omitempty"`
Permissions []string // List of users able to view/read the databytes
ImgSrc string `json:",omitempty"`
ImgBase64 string `json:",omitempty"`
LinkHref string `json:",omitempty"`
LinkTitle string `json:",omitempty"`
Ref string `json:",omitempty"`
Class string `json:",omitempty"` // for css
}
func (UserObject) Base64 ¶
func (ob UserObject) Base64() string
func (UserObject) RawBytes ¶
func (ob UserObject) RawBytes() []byte
Click to show internal directories.
Click to hide internal directories.