Documentation
¶
Index ¶
- Constants
- func New(db *sql.DB, pubdoc internal.PublishDocumentEvent, migPath string) internal.Persister
- type Document
- type FormData
- type JSONB
- type PostgreSQL
- func (pg *PostgreSQL) ActivateCustomer(customerID string, active bool) error
- func (pg *PostgreSQL) AddFile(dbName string, f internal.File) (id string, err error)
- func (pg *PostgreSQL) AddFormSubmission(dbName, form string, doc map[string]interface{}) error
- func (pg *PostgreSQL) AddFunction(dbName string, data internal.ExecData) (id string, err error)
- func (pg *PostgreSQL) BulkCreateDocument(auth internal.Auth, dbName, col string, docs []interface{}) error
- func (pg *PostgreSQL) ChangeCustomerPlan(customerID string, plan int) error
- func (pg *PostgreSQL) CreateBase(base internal.BaseConfig) (b internal.BaseConfig, err error)
- func (pg *PostgreSQL) CreateCustomer(customer internal.Customer) (c internal.Customer, err error)
- func (pg *PostgreSQL) CreateDocument(auth internal.Auth, dbName, col string, doc map[string]interface{}) (inserted map[string]interface{}, err error)
- func (pg *PostgreSQL) CreateIndex(dbName, col, field string) error
- func (pg *PostgreSQL) CreateUserAccount(dbName, email string) (id string, err error)
- func (pg *PostgreSQL) CreateUserToken(dbName string, tok internal.Token) (id string, err error)
- func (pg *PostgreSQL) DatabaseExists(name string) (exists bool, err error)
- func (pg *PostgreSQL) DeleteCustomer(dbName, email string) error
- func (pg *PostgreSQL) DeleteDocument(auth internal.Auth, dbName, col, id string) (int64, error)
- func (pg *PostgreSQL) DeleteFile(dbName, fileID string) error
- func (pg *PostgreSQL) DeleteFunction(dbName, name string) error
- func (pg *PostgreSQL) EmailExists(email string) (bool, error)
- func (pg *PostgreSQL) EnableExternalLogin(customerID string, config map[string]internal.OAuthConfig) error
- func (pg *PostgreSQL) FindAccount(customerID string) (customer internal.Customer, err error)
- func (pg *PostgreSQL) FindDatabase(baseID string) (base internal.BaseConfig, err error)
- func (pg *PostgreSQL) FindRootToken(dbName, tokenID, accountID, token string) (tok internal.Token, err error)
- func (pg *PostgreSQL) FindToken(dbName, tokenID, token string) (tok internal.Token, err error)
- func (pg *PostgreSQL) FindTokenByEmail(dbName, email string) (tok internal.Token, err error)
- func (pg *PostgreSQL) GetAllDatabaseSizes() error
- func (pg *PostgreSQL) GetCustomerByStripeID(stripeID string) (cus internal.Customer, err error)
- func (pg *PostgreSQL) GetDocumentByID(auth internal.Auth, dbName, col, id string) (map[string]interface{}, error)
- func (pg *PostgreSQL) GetFileByID(dbName, fileID string) (f internal.File, err error)
- func (pg *PostgreSQL) GetFirstTokenFromAccountID(dbName, accountID string) (tok internal.Token, err error)
- func (pg *PostgreSQL) GetForms(dbName string) (results []string, err error)
- func (pg *PostgreSQL) GetFunctionByID(dbName, id string) (result internal.ExecData, err error)
- func (pg *PostgreSQL) GetFunctionByName(dbName, name string) (result internal.ExecData, err error)
- func (pg *PostgreSQL) GetFunctionForExecution(dbName, name string) (result internal.ExecData, err error)
- func (pg *PostgreSQL) GetRootForBase(dbName string) (tok internal.Token, err error)
- func (pg *PostgreSQL) IncrementMonthlyEmailSent(baseID string) error
- func (pg *PostgreSQL) IncrementValue(auth internal.Auth, dbName, col, id, field string, n int) error
- func (pg *PostgreSQL) ListAllFiles(dbName, accountID string) (results []internal.File, err error)
- func (pg *PostgreSQL) ListCollections(dbName string) (results []string, err error)
- func (pg *PostgreSQL) ListDatabases() (results []internal.BaseConfig, err error)
- func (pg *PostgreSQL) ListDocuments(auth internal.Auth, dbName, col string, params internal.ListParams) (result internal.PagedResult, err error)
- func (pg *PostgreSQL) ListFormSubmissions(dbName, name string) (results []map[string]interface{}, err error)
- func (pg *PostgreSQL) ListFunctions(dbName string) (results []internal.ExecData, err error)
- func (pg *PostgreSQL) ListFunctionsByTrigger(dbName, trigger string) (results []internal.ExecData, err error)
- func (pg *PostgreSQL) ListTasks() (results []internal.Task, err error)
- func (pg *PostgreSQL) ListTasksByBase(dbName string) (results []internal.Task, err error)
- func (pg *PostgreSQL) NewID() string
- func (mg *PostgreSQL) ParseQuery(clauses [][]interface{}) (map[string]interface{}, error)
- func (pg *PostgreSQL) Ping() error
- func (pg *PostgreSQL) QueryDocuments(auth internal.Auth, dbName, col string, filters map[string]interface{}, ...) (result internal.PagedResult, err error)
- func (pg *PostgreSQL) RanFunction(dbName, id string, rh internal.ExecHistory) error
- func (pg *PostgreSQL) ResetPassword(dbName, email, code, password string) error
- func (pg *PostgreSQL) SetPasswordResetCode(dbName, tokenID, code string) error
- func (pg *PostgreSQL) SetUserRole(dbName, email string, role int) error
- func (pg *PostgreSQL) UpdateDocument(auth internal.Auth, dbName, col, id string, doc map[string]interface{}) (map[string]interface{}, error)
- func (pg *PostgreSQL) UpdateDocuments(auth internal.Auth, dbName, col string, filters map[string]interface{}, ...) (n int64, err error)
- func (pg *PostgreSQL) UpdateFunction(dbName, id, code, trigger string) error
- func (pg *PostgreSQL) UserEmailExists(dbName, email string) (exists bool, err error)
- func (pg *PostgreSQL) 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 PostgreSQL ¶
type PostgreSQL struct {
DB *sql.DB
PublishDocument internal.PublishDocumentEvent
}
func (*PostgreSQL) ActivateCustomer ¶
func (pg *PostgreSQL) ActivateCustomer(customerID string, active bool) error
func (*PostgreSQL) AddFormSubmission ¶
func (pg *PostgreSQL) AddFormSubmission(dbName, form string, doc map[string]interface{}) error
func (*PostgreSQL) AddFunction ¶
func (*PostgreSQL) BulkCreateDocument ¶
func (pg *PostgreSQL) BulkCreateDocument(auth internal.Auth, dbName, col string, docs []interface{}) error
func (*PostgreSQL) ChangeCustomerPlan ¶ added in v1.4.0
func (pg *PostgreSQL) ChangeCustomerPlan(customerID string, plan int) error
func (*PostgreSQL) CreateBase ¶
func (pg *PostgreSQL) CreateBase(base internal.BaseConfig) (b internal.BaseConfig, err error)
func (*PostgreSQL) CreateCustomer ¶
func (*PostgreSQL) CreateDocument ¶
func (*PostgreSQL) CreateIndex ¶ added in v1.3.0
func (pg *PostgreSQL) CreateIndex(dbName, col, field string) error
func (*PostgreSQL) CreateUserAccount ¶
func (pg *PostgreSQL) CreateUserAccount(dbName, email string) (id string, err error)
func (*PostgreSQL) CreateUserToken ¶
func (*PostgreSQL) DatabaseExists ¶
func (pg *PostgreSQL) DatabaseExists(name string) (exists bool, err error)
func (*PostgreSQL) DeleteCustomer ¶
func (pg *PostgreSQL) DeleteCustomer(dbName, email string) error
func (*PostgreSQL) DeleteDocument ¶
func (*PostgreSQL) DeleteFile ¶
func (pg *PostgreSQL) DeleteFile(dbName, fileID string) error
func (*PostgreSQL) DeleteFunction ¶
func (pg *PostgreSQL) DeleteFunction(dbName, name string) error
func (*PostgreSQL) EmailExists ¶
func (pg *PostgreSQL) EmailExists(email string) (bool, error)
func (*PostgreSQL) EnableExternalLogin ¶ added in v1.4.0
func (pg *PostgreSQL) EnableExternalLogin(customerID string, config map[string]internal.OAuthConfig) error
func (*PostgreSQL) FindAccount ¶
func (pg *PostgreSQL) FindAccount(customerID string) (customer internal.Customer, err error)
func (*PostgreSQL) FindDatabase ¶
func (pg *PostgreSQL) FindDatabase(baseID string) (base internal.BaseConfig, err error)
func (*PostgreSQL) FindRootToken ¶
func (pg *PostgreSQL) FindRootToken(dbName, tokenID, accountID, token string) (tok internal.Token, err error)
func (*PostgreSQL) FindToken ¶
func (pg *PostgreSQL) FindToken(dbName, tokenID, token string) (tok internal.Token, err error)
func (*PostgreSQL) FindTokenByEmail ¶
func (pg *PostgreSQL) FindTokenByEmail(dbName, email string) (tok internal.Token, err error)
func (*PostgreSQL) GetAllDatabaseSizes ¶ added in v1.4.0
func (pg *PostgreSQL) GetAllDatabaseSizes() error
func (*PostgreSQL) GetCustomerByStripeID ¶
func (pg *PostgreSQL) GetCustomerByStripeID(stripeID string) (cus internal.Customer, err error)
func (*PostgreSQL) GetDocumentByID ¶
func (*PostgreSQL) GetFileByID ¶
func (pg *PostgreSQL) GetFileByID(dbName, fileID string) (f internal.File, err error)
func (*PostgreSQL) GetFirstTokenFromAccountID ¶
func (pg *PostgreSQL) GetFirstTokenFromAccountID(dbName, accountID string) (tok internal.Token, err error)
func (*PostgreSQL) GetForms ¶
func (pg *PostgreSQL) GetForms(dbName string) (results []string, err error)
func (*PostgreSQL) GetFunctionByID ¶
func (pg *PostgreSQL) GetFunctionByID(dbName, id string) (result internal.ExecData, err error)
func (*PostgreSQL) GetFunctionByName ¶
func (pg *PostgreSQL) GetFunctionByName(dbName, name string) (result internal.ExecData, err error)
func (*PostgreSQL) GetFunctionForExecution ¶
func (pg *PostgreSQL) GetFunctionForExecution(dbName, name string) (result internal.ExecData, err error)
func (*PostgreSQL) GetRootForBase ¶
func (pg *PostgreSQL) GetRootForBase(dbName string) (tok internal.Token, err error)
func (*PostgreSQL) IncrementMonthlyEmailSent ¶
func (pg *PostgreSQL) IncrementMonthlyEmailSent(baseID string) error
func (*PostgreSQL) IncrementValue ¶
func (*PostgreSQL) ListAllFiles ¶ added in v1.4.0
func (pg *PostgreSQL) ListAllFiles(dbName, accountID string) (results []internal.File, err error)
func (*PostgreSQL) ListCollections ¶
func (pg *PostgreSQL) ListCollections(dbName string) (results []string, err error)
func (*PostgreSQL) ListDatabases ¶
func (pg *PostgreSQL) ListDatabases() (results []internal.BaseConfig, err error)
func (*PostgreSQL) ListDocuments ¶
func (pg *PostgreSQL) ListDocuments(auth internal.Auth, dbName, col string, params internal.ListParams) (result internal.PagedResult, err error)
func (*PostgreSQL) ListFormSubmissions ¶
func (pg *PostgreSQL) ListFormSubmissions(dbName, name string) (results []map[string]interface{}, err error)
func (*PostgreSQL) ListFunctions ¶
func (pg *PostgreSQL) ListFunctions(dbName string) (results []internal.ExecData, err error)
func (*PostgreSQL) ListFunctionsByTrigger ¶
func (pg *PostgreSQL) ListFunctionsByTrigger(dbName, trigger string) (results []internal.ExecData, err error)
func (*PostgreSQL) ListTasks ¶
func (pg *PostgreSQL) ListTasks() (results []internal.Task, err error)
func (*PostgreSQL) ListTasksByBase ¶
func (pg *PostgreSQL) ListTasksByBase(dbName string) (results []internal.Task, err error)
func (*PostgreSQL) NewID ¶
func (pg *PostgreSQL) NewID() string
func (*PostgreSQL) ParseQuery ¶
func (mg *PostgreSQL) ParseQuery(clauses [][]interface{}) (map[string]interface{}, error)
func (*PostgreSQL) Ping ¶
func (pg *PostgreSQL) Ping() error
func (*PostgreSQL) QueryDocuments ¶
func (pg *PostgreSQL) QueryDocuments(auth internal.Auth, dbName, col string, filters map[string]interface{}, params internal.ListParams) (result internal.PagedResult, err error)
func (*PostgreSQL) RanFunction ¶
func (pg *PostgreSQL) RanFunction(dbName, id string, rh internal.ExecHistory) error
func (*PostgreSQL) ResetPassword ¶
func (pg *PostgreSQL) ResetPassword(dbName, email, code, password string) error
func (*PostgreSQL) SetPasswordResetCode ¶
func (pg *PostgreSQL) SetPasswordResetCode(dbName, tokenID, code string) error
func (*PostgreSQL) SetUserRole ¶
func (pg *PostgreSQL) SetUserRole(dbName, email string, role int) error
func (*PostgreSQL) UpdateDocument ¶
func (*PostgreSQL) UpdateDocuments ¶ added in v1.4.0
func (*PostgreSQL) UpdateFunction ¶
func (pg *PostgreSQL) UpdateFunction(dbName, id, code, trigger string) error
func (*PostgreSQL) UserEmailExists ¶
func (pg *PostgreSQL) UserEmailExists(dbName, email string) (exists bool, err error)
func (*PostgreSQL) UserSetPassword ¶
func (pg *PostgreSQL) UserSetPassword(dbName, tokenID, password string) error
Click to show internal directories.
Click to hide internal directories.