Documentation ¶
Index ¶
- Variables
- func RegisterAuthentication(name string, plugin Authentication)
- func RegisterByteStore(name string, plugin ByteStore)
- func RegisterCommandHandler(name string, fn CommandHandler)
- func RegisterDataFilter(name string, fn DataFilter)
- func RegisterFileSystem(name string, plugin FileSystem)
- func RegisterParser(name string, plugin Parser)
- func RegisterStateStore(name string, plugin StateStore)
- type Authentication
- type ByteStore
- type Command
- type CommandHandler
- type Config
- type ConfigData
- type DataFilter
- type Engine
- type FileSystem
- type Parser
- type StateStore
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // to be expanded MimeList = map[string]string{ ".js": "text/javascript", ".css": "text/css", } )
Functions ¶
func RegisterAuthentication ¶
func RegisterAuthentication(name string, plugin Authentication)
func RegisterByteStore ¶
func RegisterCommandHandler ¶
func RegisterCommandHandler(name string, fn CommandHandler)
func RegisterDataFilter ¶
func RegisterDataFilter(name string, fn DataFilter)
func RegisterFileSystem ¶
func RegisterFileSystem(name string, plugin FileSystem)
func RegisterParser ¶
func RegisterStateStore ¶
func RegisterStateStore(name string, plugin StateStore)
Types ¶
type Authentication ¶
type Authentication interface { Start(config string) error ClearAll() error Authenticate(usr, pw string) bool NewUser(usr, pw string, root bool) error ChangeUserPassword(usr, pw string) error ChangeUserStatus(usr string, isactive bool) error ListUser(rgx string) ([]string, error) ChangeUserDbAccess(usr, db string, grant bool) error HasDbAccess(usr, db string) bool RemoveUser(usr string) error UserInfo(u string) (*User, error) }
func NewAuthentication ¶
func NewAuthentication(pluginName, config string) (plugin Authentication, err error)
type ByteStore ¶
type ByteStore interface { Start(config string) error Add(db string, file *os.File) (map[string]interface{}, error) Update(db, id string, file *os.File) (map[string]interface{}, error) Delete(db, id string) error Read(db, filename string, file io.Writer) error DropDatabase(db string) error }
func NewByteStore ¶
type Command ¶
type CommandHandler ¶
type ConfigData ¶
type ConfigData struct { Authentication json.RawMessage ByteStore json.RawMessage FileSystem json.RawMessage StateStore json.RawMessage DataFilter json.RawMessage Parser json.RawMessage }
type DataFilter ¶
type Engine ¶
type Engine struct { Authentication Authentication FileSystem FileSystem ByteStore ByteStore StateStore StateStore Parser Parser }
func (*Engine) CreateAdminUser ¶
func (*Engine) ExecuteCommand ¶
command is sent directly for execution
func (*Engine) ExecuteScript ¶
script is parsed into commands before execution
type FileSystem ¶
type FileSystem interface { Start(config string, b *ByteStore) error ClearAll() ([]string, error) ListDatabase(filter string) ([]string, error) CreateDatabase(db string) error DropDatabase(db string) error NewDir(p, db string) error NewFile(p, db string, jsondata map[string]interface{}) error ListDir(p, filter, db string) (map[string][]string, error) ReadJson(p, db string, fields []string) (interface{}, error) Delete(p, db string) error Rename(p, newname, db string) error Move(from, to, db string) error Copy(from, to, db string) error Info(p, db string) (map[string]interface{}, error) FileAccess(p, db string, protect bool) error SetCounter(counter, action string, value int64, db string) (int64, error) ListCounter(filter, db string) (map[string]int64, error) WriteBytes(p, ap, db string) (int64, error) ReadBytes(fp, db string) (string, error) DirectAccess(fp, db, layer string) (map[string]interface{}, string, error) DeleteBytes(p, db string) error UpdateJson(p, db string, j map[string]interface{}) error BQLSearch(db string, query map[string]interface{}) (interface{}, error) BQLSet(db string, query map[string]interface{}) (int, error) BQLUnset(db string, query map[string]interface{}) (int, error) }
func NewFileSystem ¶
func NewFileSystem(pluginName, config string, b *ByteStore) (plugin FileSystem, err error)
type StateStore ¶
type StateStore interface { TokenSet(token, user string, timeout int64) error TokenGet(token string) (string, error) CacheSet(id, value string, timeout int64) error CacheGet(id string) (string, error) ClearAll() error Start(config string) error }
Manages authentication tokens, upload tickets and caching
func NewStateStore ¶
func NewStateStore(pluginName, config string) (plugin StateStore, err error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.