Documentation
¶
Index ¶
- Constants
- func New(pubdoc internal.PublishDocumentEvent) internal.Persister
- type Memory
- func (m *Memory) ActivateCustomer(customerID string, active bool) error
- func (m *Memory) AddFile(dbName string, f internal.File) (id string, err error)
- func (m *Memory) AddFormSubmission(dbName, form string, doc map[string]any) error
- func (m *Memory) AddFunction(dbName string, data internal.ExecData) (id string, err error)
- func (m *Memory) BulkCreateDocument(auth internal.Auth, dbName, col string, docs []interface{}) error
- func (m *Memory) ChangeCustomerPlan(customerID string, plan int) error
- func (m *Memory) CreateBase(base internal.BaseConfig) (internal.BaseConfig, error)
- func (m *Memory) CreateCustomer(customer internal.Customer) (internal.Customer, error)
- func (m *Memory) CreateDocument(auth internal.Auth, dbName, col string, doc map[string]interface{}) (map[string]interface{}, error)
- func (m *Memory) CreateIndex(dbName, col, field string) error
- func (m *Memory) CreateUserAccount(dbName, email string) (id string, err error)
- func (m *Memory) CreateUserToken(dbName string, tok internal.Token) (id string, err error)
- func (m *Memory) DatabaseExists(name string) (exists bool, err error)
- func (m *Memory) DeleteCustomer(dbName, email string) error
- func (m *Memory) DeleteDocument(auth internal.Auth, dbName, col, id string) (n int64, err error)
- func (m *Memory) DeleteFile(dbName, fileID string) error
- func (m *Memory) DeleteFunction(dbName, name string) error
- func (m *Memory) EmailExists(email string) (exists bool, err error)
- func (m *Memory) EnableExternalLogin(customerID string, config map[string]internal.OAuthConfig) error
- func (m *Memory) FindAccount(customerID string) (cus internal.Customer, err error)
- func (m *Memory) FindDatabase(baseID string) (base internal.BaseConfig, err error)
- func (m *Memory) FindRootToken(dbName, tokenID, accountID, token string) (tok internal.Token, err error)
- func (m *Memory) FindToken(dbName, tokenID, token string) (tok internal.Token, err error)
- func (m *Memory) FindTokenByEmail(dbName, email string) (tok internal.Token, err error)
- func (m *Memory) GetCustomerByStripeID(stripeID string) (cus internal.Customer, err error)
- func (m *Memory) GetDocumentByID(auth internal.Auth, dbName, col, id string) (doc map[string]interface{}, err error)
- func (m *Memory) GetFileByID(dbName, fileID string) (f internal.File, err error)
- func (m *Memory) GetFirstTokenFromAccountID(dbName, accountID string) (tok internal.Token, err error)
- func (m *Memory) GetForms(dbName string) (names []string, err error)
- func (m *Memory) GetFunctionByID(dbName, id string) (data internal.ExecData, err error)
- func (m *Memory) GetFunctionByName(dbName, name string) (data internal.ExecData, err error)
- func (m *Memory) GetFunctionForExecution(dbName, name string) (data internal.ExecData, err error)
- func (m *Memory) GetRootForBase(dbName string) (tok internal.Token, err error)
- func (m *Memory) IncrementMonthlyEmailSent(baseID string) error
- func (m *Memory) IncrementValue(auth internal.Auth, dbName, col, id, field string, n int) error
- func (m *Memory) ListAllFiles(dbName, accountID string) (results []internal.File, err error)
- func (m *Memory) ListCollections(dbName string) (repos []string, err error)
- func (m *Memory) ListDatabases() (results []internal.BaseConfig, err error)
- func (m *Memory) ListDocuments(auth internal.Auth, dbName, col string, params internal.ListParams) (result internal.PagedResult, err error)
- func (m *Memory) ListFormSubmissions(dbName, name string) (docs []map[string]any, err error)
- func (m *Memory) ListFunctions(dbName string) (list []internal.ExecData, err error)
- func (m *Memory) ListFunctionsByTrigger(dbName, trigger string) (list []internal.ExecData, err error)
- func (m *Memory) ListTasks() (results []internal.Task, err error)
- func (m *Memory) NewID() string
- func (m *Memory) ParseQuery(clauses [][]interface{}) (filter map[string]any, err error)
- func (m *Memory) Ping() error
- func (m *Memory) QueryDocuments(auth internal.Auth, dbName, col string, filter map[string]any, ...) (result internal.PagedResult, err error)
- func (m *Memory) RanFunction(dbName, id string, rh internal.ExecHistory) error
- func (m *Memory) ResetPassword(dbName, email, code, password string) error
- func (m *Memory) SetPasswordResetCode(dbName, tokenID, code string) error
- func (m *Memory) SetUserRole(dbName, email string, role int) error
- func (m *Memory) UpdateDocument(auth internal.Auth, dbName, col, id string, doc map[string]any) (exists map[string]any, err error)
- func (m *Memory) UpdateDocuments(auth internal.Auth, dbName, col string, filter map[string]interface{}, ...) (n int64, err error)
- func (m *Memory) UpdateFunction(dbName, id, code, trigger string) error
- func (m *Memory) UserEmailExists(dbName, email string) (exists bool, err error)
- func (m *Memory) UserSetPassword(dbName, tokenID, password string) error
Constants ¶
View Source
const ( FieldID = "id" FieldAccountID = "accountId" FieldOwnerID = "ownerId" FieldCreated = "sb_created" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Memory ¶
type Memory struct {
DB map[string]map[string][]byte
PublishDocument internal.PublishDocumentEvent
}
func (*Memory) ActivateCustomer ¶
func (*Memory) AddFormSubmission ¶
func (*Memory) AddFunction ¶
func (*Memory) BulkCreateDocument ¶
func (*Memory) ChangeCustomerPlan ¶
func (*Memory) CreateBase ¶
func (m *Memory) CreateBase(base internal.BaseConfig) (internal.BaseConfig, error)
func (*Memory) CreateCustomer ¶
func (*Memory) CreateDocument ¶
func (*Memory) CreateIndex ¶
func (*Memory) CreateUserAccount ¶
func (*Memory) CreateUserToken ¶
func (*Memory) DatabaseExists ¶
func (*Memory) DeleteCustomer ¶
func (*Memory) DeleteDocument ¶
func (*Memory) DeleteFile ¶
func (*Memory) DeleteFunction ¶
func (*Memory) EnableExternalLogin ¶
func (*Memory) FindAccount ¶
func (*Memory) FindDatabase ¶
func (m *Memory) FindDatabase(baseID string) (base internal.BaseConfig, err error)
func (*Memory) FindRootToken ¶
func (*Memory) FindTokenByEmail ¶
func (*Memory) GetCustomerByStripeID ¶
func (*Memory) GetDocumentByID ¶
func (*Memory) GetFileByID ¶
func (*Memory) GetFirstTokenFromAccountID ¶
func (*Memory) GetFunctionByID ¶
func (*Memory) GetFunctionByName ¶
func (*Memory) GetFunctionForExecution ¶
func (*Memory) GetRootForBase ¶
func (*Memory) IncrementMonthlyEmailSent ¶
func (*Memory) IncrementValue ¶
func (*Memory) ListAllFiles ¶
func (*Memory) ListCollections ¶
func (*Memory) ListDatabases ¶
func (m *Memory) ListDatabases() (results []internal.BaseConfig, err error)
func (*Memory) ListDocuments ¶
func (m *Memory) ListDocuments(auth internal.Auth, dbName, col string, params internal.ListParams) (result internal.PagedResult, err error)
func (*Memory) ListFormSubmissions ¶
func (*Memory) ListFunctions ¶
func (*Memory) ListFunctionsByTrigger ¶
func (*Memory) ParseQuery ¶
func (*Memory) QueryDocuments ¶
func (*Memory) RanFunction ¶
func (m *Memory) RanFunction(dbName, id string, rh internal.ExecHistory) error
func (*Memory) ResetPassword ¶
func (*Memory) SetPasswordResetCode ¶
func (*Memory) UpdateDocument ¶
func (*Memory) UpdateDocuments ¶
func (*Memory) UpdateFunction ¶
func (*Memory) UserEmailExists ¶
func (*Memory) UserSetPassword ¶
Click to show internal directories.
Click to hide internal directories.