Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Allowed bool = true Denied bool = false )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { // Database Methods AddDatabase(databaseId model.Identifier, userId model.Identifier) *er.WdbError GetDatabase(databaseId model.Identifier) (*model.Database, *er.WdbError) DeleteDatabase(databaseId model.Identifier) *er.WdbError // Collection Methods AddCollection(databaseId, collectionId model.Identifier, schema model.Schema, primaryKey *model.Identifier) *er.WdbError GetCollection(databaseId, collectionId model.Identifier) (*model.Collection, *er.WdbError) DeleteCollection(databaseId, collectionId model.Identifier) *er.WdbError // Data Methods AddData(databaseId, collectionId model.Identifier, inputData interface{}) *er.WdbError GetData(databaseId model.Identifier, collectionId model.Identifier, filters interface{}) (map[model.Identifier]*model.Record, *er.WdbError) UpdateData(databaseId model.Identifier, collectionId model.Identifier, updatedData interface{}, filters interface{}) *er.WdbError DeleteData(databaseId model.Identifier, collectionId model.Identifier, filters interface{}) *er.WdbError QueryData(databaseId, collectionId model.Identifier, query string, mode data.QueryType) (interface{}, *er.WdbError) // Users Methods CreateUser(userID model.Identifier, password string) *er.WdbError AuthenticateUser(userID model.Identifier, password string) (bool, *er.WdbError) CheckUserPermissions(userID model.Identifier, privilege string, entities model.Entities) (bool, *er.WdbError) GrantRole(userID model.Identifier, permissions model.Permissions) *er.WdbError RevokeRole(userID model.Identifier, permission model.Permissions) (map[string]int, *er.WdbError) // Roles Methods ListRole(requesterId, forceListAllRoles string) (r.Roles, *er.WdbError) CreateRole(roleID model.Identifier, allowed []string, denied []string, hidden bool) *er.WdbError UpdateRole(roleID model.Identifier, allowed []string, denied []string, hidden bool) *er.WdbError // Admin Method InitializeAdmin(config *config.Config) }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.