Documentation ¶
Index ¶
- Constants
- Variables
- type ConnData
- type Conns
- type DbMode
- type MenuStorageService
- func (ms *MenuStorageService) Close(ctx context.Context) error
- func (ms *MenuStorageService) GetPersister(ctx context.Context) (*persist.Persister, error)
- func (ms *MenuStorageService) GetResource(ctx context.Context) (resource.Resource, error)
- func (ms *MenuStorageService) GetStateStore(ctx context.Context) (db.Db, error)
- func (ms *MenuStorageService) GetUserdataDb(ctx context.Context) (db.Db, error)
- func (ms *MenuStorageService) WithDb(store db.Db, typ int8) *MenuStorageService
- func (ms *MenuStorageService) WithGettext(path string, lns []lang.Language) *MenuStorageService
- type SimpleStorageProvider
- type Storage
- type StorageProvider
- type StorageService
Constants ¶
View Source
const ( DBTYPE_NONE = iota DBTYPE_MEM DBTYPE_FS DBTYPE_GDBM DBTYPE_POSTGRES )
View Source
const ( STORETYPE_STATE = iota STORETYPE_RESOURCE STORETYPE_USER )
View Source
const (
DATATYPE_EXTEND = 128
)
Variables ¶
View Source
var ( DbModeDebug = []string{"ANY", "BIN", "TXT"} DbTypeDebug = []string{"NONE", "MEM", "FS", "GDBM", "POSTGRES"} DbStoreDebug = []string{"STATE", "RESOURCE", "USER"} )
Functions ¶
This section is empty.
Types ¶
type ConnData ¶
type ConnData struct {
// contains filtered or unexported fields
}
func ToConnData ¶
type MenuStorageService ¶
type MenuStorageService struct {
// contains filtered or unexported fields
}
func NewMenuStorageService ¶
func NewMenuStorageService(conn Conns) *MenuStorageService
func (*MenuStorageService) Close ¶
func (ms *MenuStorageService) Close(ctx context.Context) error
TODO: how to handle persister here?
func (*MenuStorageService) GetPersister ¶
func (*MenuStorageService) GetResource ¶
func (*MenuStorageService) GetStateStore ¶
func (*MenuStorageService) GetUserdataDb ¶
func (*MenuStorageService) WithDb ¶
func (ms *MenuStorageService) WithDb(store db.Db, typ int8) *MenuStorageService
func (*MenuStorageService) WithGettext ¶
func (ms *MenuStorageService) WithGettext(path string, lns []lang.Language) *MenuStorageService
WithGettext triggers use of gettext for translation of templates and menus.
The first language in `lns` will be used as default language, to resolve node keys to language strings.
If `lns` is an empty array, gettext will not be used.
type SimpleStorageProvider ¶
type SimpleStorageProvider struct {
*Storage
}
func (*SimpleStorageProvider) Close ¶
func (p *SimpleStorageProvider) Close(ctx context.Context) error
type StorageProvider ¶
type StorageProvider interface { Get(ctx context.Context, sessionId string) (*Storage, error) Put(ctx context.Context, sessionId string, storage *Storage) error Close(ctx context.Context) error }
func NewSimpleStorageProvider ¶
func NewSimpleStorageProvider(stateStore db.Db, userdataStore db.Db) StorageProvider
Click to show internal directories.
Click to hide internal directories.