wdbClient

package
v1.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

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) *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) *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.Datum, *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

	// Methods for Roles and Users
	CreateUser(userID model.Identifier, password string) *er.WdbError
	AuthenticateUser(userID model.Identifier, password string) (bool, *er.WdbError)
	CreateRole(roleID model.Identifier, allowed []string, denied []string) *er.WdbError
	ListRole() r.Roles
	CheckUserPermissions(userID model.Identifier, privilege string, entities model.Entities) (bool, *er.WdbError)
	GrantRoles(userID model.Identifier, permissions model.Permissions) *er.WdbError

	// Admin Method
	InitializeAdmin(config *config.Config)
}

func NewWdbClient

func NewWdbClient(configurations model.Configurations, databases d.Databases, roles r.Roles, users u.Users, hashingAlgorithm string) Client

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL