Versions in this module Expand all Collapse all v0 v0.15.0 Jul 2, 2026 v0.14.0 May 5, 2026 v0.13.1 Mar 22, 2026 v0.13.0 Mar 5, 2026 Changes in this version type Page + Protected bool type PageData + Protected bool v0.12.1 Feb 5, 2026 Changes in this version + const AdminRole + const CredentialTypeOAuth + const CredentialTypeText + const GrantTypeAuthorizationCode + const GrantTypeClientCredentials + const GrantTypeRefreshToken + type Block struct + Active bool + CreatedAt time.Time + Description string + EnvVariables sql.NullString + ID int64 + Name string + func (w *Block) GetEnvVars() map[string]string + type Credential struct + ClientID sql.NullString + ClientSecret sql.NullString + Expiry sql.NullString + GrantType string + ID int64 + Name string + OauthTokenUrl sql.NullString + OauthUrl sql.NullString + RefreshToken sql.NullString + Scope sql.NullString + Token sql.NullString + Type string + UpdatedAt time.Time + Value sql.NullString + type CredentialFormData struct + ClientID string + ClientSecret string + Expiry string + Name string + OauthUrl string + RefreshToken string + Scope string + Token string + TokenUrl string + Type string + Value string + type DueTasksTaskDetail struct + Block Block + type Event struct + Args sql.NullString + BlockID int64 + CreatedAt time.Time + EventType string + ID int + Logs sql.NullString + PeriodicTaskID sql.NullInt64 + Status string + WebhookID sql.NullInt64 + type File struct + Content string + CreatedAt time.Time + Filename string + ID int64 + ProgramID int + type JSONRawString map[string]any + func (j *JSONRawString) Scan(value interface{}) error + func (j JSONRawString) Value() (driver.Value, error) + type Page struct + Active bool + BlockID int + CanvasState JSONRawString + CreatedAt time.Time + Description sql.NullString + HTMLOutput sql.NullString + ID int64 + Name sql.NullString + Path string + UpdatedAt time.Time + type PageData struct + Active bool + CanvasItems any + Description string + HtmlOutput any + Metadata map[string]any + Path string + Title string + type PageWithMeta struct + WebhookPaths []string + WebhookPathsRaw string + type PeriodicTask struct + Active bool + BlockID int64 + CreatedAt time.Time + Cron string + Description sql.NullString + EnvVariables sql.NullString + ID int64 + Name sql.NullString + NextRunAt time.Time + OnFailEnabled bool + OnFailScript sql.NullString + OnFailScriptType sql.NullString + ProgramID int64 + Timezone string + UpdatedAt time.Time + func (w *PeriodicTask) GetEnvVars() map[string]string + type PeriodicTaskDetail struct + Block Block + File File + PeriodicTask PeriodicTask + Program Program + type PeriodicTaskFormData struct + Active bool + Code string + Cron string + Description string + Env string + FileContent string + Name string + OnFailEnabled bool + OnFailScript string + OnFailScriptType string + ProgramType string + type Program struct + CreatedAt time.Time + ID int64 + Name string + ProgramType string + type Setting struct + ID int + Name string + Value string + type Store struct + func NewModel(db *database.DbCon) *Store + func (s *Store) CreateAdminUserIfNoUserExists() (*User, error) + func (s *Store) DeleteBlockById(id int64) error + func (s *Store) DeleteCredential(id int64) error + func (s *Store) DeletePageById(id int64) error + func (s *Store) DeletePeriodicTaskById(id int64) error + func (s *Store) DeleteUser(userID int64) error + func (s *Store) DeleteWebhookById(id int64) error + func (s *Store) FetchCredentialByID(id int64) (*Credential, error) + func (s *Store) FetchCredentialByName(name string) (*Credential, error) + func (s *Store) FetchEventByBlockID(blockID int64, limit int, page int) (*[]Event, error) + func (s *Store) FetchEventByID(id int64) (*Event, error) + func (s *Store) FetchEventByTypeAndID(eventType string, id int64, idColumn string, limit int, page int) (*[]Event, error) + func (s *Store) FetchEvents(eventType string, id int64, idColumn string, limit int, page int) (*[]Event, error) + func (s *Store) GetAndLockDuePeriodicTasks() ([]DueTasksTaskDetail, error) + func (s *Store) GetConfigByKey(key string) (string, error) + func (s *Store) GetUserByID(id int64) (*User, error) + func (s *Store) GetUserByUsername(username string) (*User, error) + func (s *Store) InsertBlock(block Block) (sql.Result, error) + func (s *Store) InsertBlockWithAutoName(description string, active bool) (int64, error) + func (s *Store) InsertCredential(credential *Credential) error + func (s *Store) InsertEvent(event Event) (sql.Result, error) + func (s *Store) InsertPageWithAutoName(blockID int64) (int64, error) + func (s *Store) InsertPeriodicTaskWithAutoName(blockID int64) (int64, error) + func (s *Store) InsertSetting(key, value string) + func (s *Store) InsertUser(user *User) error + func (s *Store) InsertUserOLD(user *User) error + func (s *Store) InsertWebhookWithAutoName(blockID int64) (int64, error) + func (s *Store) ListBlocks() ([]Block, error) + func (s *Store) ListCredentials() (*[]Credential, error) + func (s *Store) ListCredentialsForEnv() (map[string]string, error) + func (s *Store) ListExpiredCredentials() ([]Credential, error) + func (s *Store) ListPagesByBlockID(blockID int64) ([]Page, error) + func (s *Store) ListPeriodicTasksByBlockID(blockID int64) ([]PeriodicTask, error) + func (s *Store) ListUsers() ([]User, error) + func (s *Store) ListWebhooksByBlockID(blockID int64) ([]Webhook, error) + func (s *Store) RecordTaskFailure(id int64) error + func (s *Store) RecordTaskSuccess(id int64) error + func (s *Store) RefreshTokens() error + func (s *Store) RemoveEventsOlderThanAWeek() (sql.Result, error) + func (s *Store) SaveToken(id int64, token *oauth2.Token) error + func (s *Store) SearchBlocks(query string) ([]Block, error) + func (s *Store) SearchCredentials(query string) ([]Credential, error) + func (s *Store) SearchPages(blockID int64, query string) ([]Page, error) + func (s *Store) SearchPeriodicTasks(blockID int64, query string) ([]PeriodicTask, error) + func (s *Store) SearchUsers(query string) ([]User, error) + func (s *Store) SearchWebhooks(blockID int64, query string) ([]Webhook, error) + func (s *Store) SelectBlockById(id int64) (*Block, error) + func (s *Store) SelectPageById(id int64) (*PageWithMeta, error) + func (s *Store) SelectPageByPath(path string) (*Page, error) + func (s *Store) SelectPeriodicTaskDetailsById(id int64) (*PeriodicTaskDetail, error) + func (s *Store) SelectWebhookById(id int64) (*Webhook, error) + func (s *Store) SelectWebhookByPath(path string, verb string) (*WebHookDetail, error) + func (s *Store) SelectWebhookDetailsById(id int64) (*WebhookDetail, error) + func (s *Store) UnlockPeriodicTask(id int64) error + func (s *Store) UnlockStalePeriodicTasks() error + func (s *Store) UpdateBlock(id int64, block Block) error + func (s *Store) UpdateConfigByKey(key, value string) + func (s *Store) UpdateCredential(credential *Credential) error + func (s *Store) UpdateFileContentByWebhookID(webhookID int64, formData WebhookFormData) error + func (s *Store) UpdateName(table string, id int64, newName string) (string, error) + func (s *Store) UpdatePageByID(id int64, pageData PageData) error + func (s *Store) UpdatePeriodicTaskByFrom(periodicTaskID int64, formData PeriodicTaskFormData) error + func (s *Store) UpdatePeriodicTaskNextRunAt(id int64, nextRunAt time.Time) error + func (s *Store) UpdateUser(user *User) error + func (s *Store) UpdateWebhookPath(id int64, newPath string) (string, error) + func (s *Store) UserExists() (bool, error) + func (s *Store) VerifyPassword(storedHash string, password string) bool + type User struct + CreatedAt time.Time + Email sql.NullString + ID int64 + PasswordHash string + Role string + Settings sql.NullString + UpdatedAt time.Time + Username string + type WebHookDetail struct + Block Block + File File + Program Program + Webhook Webhook + type Webhook struct + Active bool + AuthConfig sql.NullString + BlockID int + Cors sql.NullString + CreatedAt time.Time + Description sql.NullString + EnvVariables sql.NullString + ExitHttpPair sql.NullString + FullPath string + HttpMethod string + ID int64 + Name sql.NullString + OnFailEnabled bool + OnFailScript sql.NullString + OnFailScriptType sql.NullString + Path string + ProgramID int + ResponseHeaders sql.NullString + func (w *Webhook) GetAuthConfig() *WebhookAuthConfig + func (w *Webhook) GetCors() []string + func (w *Webhook) GetEnvVars() map[string]string + func (w *Webhook) GetExitHttpPair() map[int]int + func (w *Webhook) GetResponseHeaders() map[string]string + type WebhookAuthConfig struct + Enabled bool + Tokens []string + type WebhookDetail struct + Block Block + File File + Program Program + Webhook Webhook + type WebhookFormData struct + Active bool + AuthConfig string + Code string + Cors string + Description string + Env string + ExitCodes []string + FileContent string + HTTPResponseCodes []string + HttpVerb string + Name string + OnFailEnabled bool + OnFailScript string + OnFailScriptType string + ProgramType string + ResponseHeaders string