Documentation
¶
Index ¶
- Constants
- func New(db *sql.DB, pubdoc cache.PublishDocumentEvent, log *logger.Logger) database.Persister
- type Document
- type FormData
- type JSON
- type SQLite
- func (sl *SQLite) ActivateTenant(tenantID string, active bool) error
- func (sl *SQLite) AddFile(dbName string, f model.File) (id string, err error)
- func (sl *SQLite) AddFormSubmission(dbName, form string, doc map[string]interface{}) error
- func (sl *SQLite) AddFunction(dbName string, data model.ExecData) (id string, err error)
- func (sl *SQLite) AddTask(dbName string, task model.Task) (id string, err error)
- func (sl *SQLite) BulkCreateDocument(auth model.Auth, dbName, col string, docs []interface{}) error
- func (sl *SQLite) ChangeTenantPlan(tenantID string, plan int) error
- func (sl *SQLite) Count(auth model.Auth, dbName, col string, filters map[string]interface{}) (count int64, err error)
- func (sl *SQLite) CreateAccount(dbName, email string) (id string, err error)
- func (sl *SQLite) CreateDatabase(base model.DatabaseConfig) (b model.DatabaseConfig, err error)
- func (sl *SQLite) CreateDocument(auth model.Auth, dbName, col string, doc map[string]interface{}) (inserted map[string]interface{}, err error)
- func (sl *SQLite) CreateIndex(dbName, col, field string) error
- func (sl *SQLite) CreateTenant(customer model.Tenant) (c model.Tenant, err error)
- func (sl *SQLite) CreateUser(dbName string, tok model.User) (id string, err error)
- func (sl *SQLite) DatabaseExists(name string) (exists bool, err error)
- func (sl *SQLite) DeleteDocument(auth model.Auth, dbName, col, id string) (int64, error)
- func (sl *SQLite) DeleteDocuments(auth model.Auth, dbName, col string, filters map[string]any) (n int64, err error)
- func (sl *SQLite) DeleteFile(dbName, fileID string) error
- func (sl *SQLite) DeleteFunction(dbName, name string) error
- func (sl *SQLite) DeleteTask(dbName, id string) error
- func (sl *SQLite) DeleteTenant(dbName, email string) error
- func (sl *SQLite) EmailExists(email string) (bool, error)
- func (sl *SQLite) EnableExternalLogin(tenantID string, config map[string]model.OAuthConfig) error
- func (sl *SQLite) FindDatabase(baseID string) (base model.DatabaseConfig, err error)
- func (sl *SQLite) FindRootUser(dbName, userID, accountID, token string) (tok model.User, err error)
- func (sl *SQLite) FindTenant(tenantID string) (customer model.Tenant, err error)
- func (sl *SQLite) FindUser(dbName, userID, token string) (tok model.User, err error)
- func (sl *SQLite) FindUserByEmail(dbName, email string) (tok model.User, err error)
- func (sl *SQLite) GetAllDatabaseSizes() error
- func (sl *SQLite) GetDocumentByID(auth model.Auth, dbName, col, id string) (map[string]interface{}, error)
- func (sl *SQLite) GetDocumentsByIDs(auth model.Auth, dbName, col string, ids []string) (docs []map[string]interface{}, err error)
- func (sl *SQLite) GetFileByID(dbName, fileID string) (f model.File, err error)
- func (sl *SQLite) GetFirstUserFromAccountID(dbName, accountID string) (tok model.User, err error)
- func (sl *SQLite) GetForms(dbName string) (results []string, err error)
- func (sl *SQLite) GetFunctionByID(dbName, id string) (result model.ExecData, err error)
- func (sl *SQLite) GetFunctionByName(dbName, name string) (result model.ExecData, err error)
- func (sl *SQLite) GetFunctionForExecution(dbName, name string) (result model.ExecData, err error)
- func (sl *SQLite) GetRootForBase(dbName string) (tok model.User, err error)
- func (sl *SQLite) GetTenantByStripeID(stripeID string) (cus model.Tenant, err error)
- func (sl *SQLite) GetUserByID(dbName, accountID, userID string) (user model.User, err error)
- func (sl *SQLite) IncrementMonthlyEmailSent(baseID string) error
- func (sl *SQLite) IncrementValue(auth model.Auth, dbName, col, id, field string, n int) error
- func (sl *SQLite) ListAccounts(dbName string) ([]model.Account, error)
- func (sl *SQLite) ListAllFiles(dbName, accountID string) (results []model.File, err error)
- func (sl *SQLite) ListCollections(dbName string) (results []string, err error)
- func (sl *SQLite) ListDatabases() (results []model.DatabaseConfig, err error)
- func (sl *SQLite) ListDocuments(auth model.Auth, dbName, col string, params model.ListParams) (result model.PagedResult, err error)
- func (sl *SQLite) ListFormSubmissions(dbName, name string) (results []map[string]interface{}, err error)
- func (sl *SQLite) ListFunctions(dbName string) (results []model.ExecData, err error)
- func (sl *SQLite) ListFunctionsByTrigger(dbName, trigger string) (results []model.ExecData, err error)
- func (sl *SQLite) ListTasks() (results []model.Task, err error)
- func (sl *SQLite) ListTasksByBase(dbName string) (results []model.Task, err error)
- func (sl *SQLite) ListUsers(dbName, accountID string) ([]model.User, error)
- func (sl *SQLite) NewID() string
- func (sl *SQLite) ParseQuery(clauses [][]interface{}) (map[string]interface{}, error)
- func (sl *SQLite) Ping() error
- func (sl *SQLite) QueryDocuments(auth model.Auth, dbName, col string, filters map[string]interface{}, ...) (result model.PagedResult, err error)
- func (sl *SQLite) RanFunction(dbName, id string, rh model.ExecHistory) error
- func (sl *SQLite) RemoveUser(auth model.Auth, dbName, userID string) error
- func (sl *SQLite) ResetPassword(dbName, email, code, password string) error
- func (sl *SQLite) SetPasswordResetCode(dbName, userID, code string) error
- func (sl *SQLite) SetUserRole(dbName, email string, role int) error
- func (sl *SQLite) UpdateDocument(auth model.Auth, dbName, col, id string, doc map[string]interface{}) (map[string]interface{}, error)
- func (sl *SQLite) UpdateDocuments(auth model.Auth, dbName, col string, filters map[string]interface{}, ...) (n int64, err error)
- func (sl *SQLite) UpdateFunction(dbName, id, code, trigger string) error
- func (sl *SQLite) UserEmailExists(dbName, email string) (exists bool, err error)
- func (sl *SQLite) UserSetPassword(dbName, tokenID, password string) error
- type Scanner
Constants ¶
View Source
const ( FieldID = "id" FieldAccountID = "accountId" FieldFormName = "sb_form" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SQLite ¶
type SQLite struct { DB *sql.DB PublishDocument cache.PublishDocumentEvent // contains filtered or unexported fields }
func (*SQLite) ActivateTenant ¶
func (*SQLite) AddFormSubmission ¶
func (*SQLite) AddFunction ¶
func (*SQLite) BulkCreateDocument ¶
func (*SQLite) ChangeTenantPlan ¶
func (*SQLite) CreateAccount ¶
func (*SQLite) CreateDatabase ¶
func (sl *SQLite) CreateDatabase(base model.DatabaseConfig) (b model.DatabaseConfig, err error)
func (*SQLite) CreateDocument ¶
func (*SQLite) CreateIndex ¶
func (*SQLite) CreateTenant ¶
func (*SQLite) CreateUser ¶
func (*SQLite) DatabaseExists ¶
func (*SQLite) DeleteDocument ¶
func (*SQLite) DeleteDocuments ¶
func (*SQLite) DeleteFile ¶
func (*SQLite) DeleteFunction ¶
func (*SQLite) DeleteTask ¶
func (*SQLite) DeleteTenant ¶
func (*SQLite) EnableExternalLogin ¶
func (*SQLite) FindDatabase ¶
func (sl *SQLite) FindDatabase(baseID string) (base model.DatabaseConfig, err error)
func (*SQLite) FindRootUser ¶
func (*SQLite) FindTenant ¶
func (*SQLite) FindUserByEmail ¶
func (*SQLite) GetAllDatabaseSizes ¶
func (*SQLite) GetDocumentByID ¶
func (*SQLite) GetDocumentsByIDs ¶
func (*SQLite) GetFileByID ¶
func (*SQLite) GetFirstUserFromAccountID ¶
func (*SQLite) GetFunctionByID ¶
func (*SQLite) GetFunctionByName ¶
func (*SQLite) GetFunctionForExecution ¶
func (*SQLite) GetRootForBase ¶
func (*SQLite) GetTenantByStripeID ¶
func (*SQLite) GetUserByID ¶
func (*SQLite) IncrementMonthlyEmailSent ¶
func (*SQLite) IncrementValue ¶
func (*SQLite) ListAccounts ¶
func (*SQLite) ListAllFiles ¶
func (*SQLite) ListCollections ¶
func (*SQLite) ListDatabases ¶
func (sl *SQLite) ListDatabases() (results []model.DatabaseConfig, err error)
func (*SQLite) ListDocuments ¶
func (sl *SQLite) ListDocuments(auth model.Auth, dbName, col string, params model.ListParams) (result model.PagedResult, err error)
func (*SQLite) ListFormSubmissions ¶
func (*SQLite) ListFunctions ¶
func (*SQLite) ListFunctionsByTrigger ¶
func (*SQLite) ListTasksByBase ¶
func (*SQLite) ParseQuery ¶
func (*SQLite) QueryDocuments ¶
func (sl *SQLite) QueryDocuments(auth model.Auth, dbName, col string, filters map[string]interface{}, params model.ListParams) (result model.PagedResult, err error)
func (*SQLite) RanFunction ¶
func (sl *SQLite) RanFunction(dbName, id string, rh model.ExecHistory) error
func (*SQLite) RemoveUser ¶
func (*SQLite) ResetPassword ¶
func (*SQLite) SetPasswordResetCode ¶
func (*SQLite) UpdateDocument ¶
func (*SQLite) UpdateDocuments ¶
func (*SQLite) UpdateFunction ¶
func (*SQLite) UserEmailExists ¶
func (*SQLite) UserSetPassword ¶
Click to show internal directories.
Click to hide internal directories.