Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authentication ¶
type Collection ¶
type Collection struct { Data map[Identifier]*Datum `json:"data"` Metadata Metadata `json:"metadata"` Schema Schema `json:"schema"` Access map[Identifier]*Access `json:"access,omitempty"` sync.Mutex }
type Configurations ¶
type Configurations struct {
Admin *Identifier `json:"admin"`
}
type Database ¶
type Database struct { Collections map[Identifier]*Collection `json:"collections"` Metadata Metadata `json:"metadata"` Access map[Identifier]*Access `json:"access,omitempty"` sync.Mutex }
type Datum ¶
type Datum struct { Data interface{} `json:"data"` Metadata Metadata `json:"metadata"` Identifier Identifier `json:"id"` }
type ExtraFields ¶
type ExtraFields map[string]interface{}
type Grants ¶
type Grants struct { UserPrivileges *Privileges `json:"userPrivileges,omitempty"` GlobalPrivileges *Privileges `json:"globalPrivileges,omitempty"` DatabasePrivileges *Privileges `json:"databasePrivileges,omitempty"` CollectionPrivileges *Privileges `json:"collectionPrivileges,omitempty"` }
type Identifier ¶
type Identifier string
func (Identifier) String ¶
func (i Identifier) String() string
type Namespace ¶
type Namespace struct { Databases []Identifier `json:"databases"` Metadata Metadata `json:"metadata"` Access map[Identifier]*Access `json:"access,omitempty"` }
type Permissions ¶
type Permissions struct { Role Identifier `json:"role" validate:"required"` On *Entities `json:"on,omitempty"` }
type Privileges ¶
type Role ¶
type Role struct { RoleID Identifier `json:"roleId"` Grants Grants `json:"grants"` Hidden bool `json:"hidden"` }
type User ¶
type User struct { UserID Identifier `json:"userId"` Authentication Authentication `json:"authentication"` Metadata Metadata `json:"metadata"` Permissions []Permissions `json:"permissions"` }
type WDB ¶
type WDB struct { Configurations Configurations `json:"configurations"` Namespaces map[Identifier]*Namespace `json:"namespaces"` Databases map[Identifier]*Database `json:"databases"` Users map[Identifier]*User `json:"users"` Roles map[Identifier]*Role `json:"roles"` }
func NewWDBInstance ¶
func NewWDBInstance(namespaces map[Identifier]*Namespace, databases map[Identifier]*Database, users map[Identifier]*User, roles map[Identifier]*Role) WDB
Click to show internal directories.
Click to hide internal directories.