Documentation ¶
Index ¶
- type Automation
- type Base
- type Board
- type Deck
- type Integration
- type Preferences
- type PrefsAutomation
- type PrefsBase
- type PrefsDeck
- type PrefsDetails
- type PrefsLayout
- type PrefsSpace
- type PrefsWorkspace
- type Profile
- type Shortcut
- type Space
- type Table
- type User
- type Workflow
- type Workspace
- type XUserWorkspaceMembership
- type XWorkspaceInstalledIntegration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Automation ¶
type Automation struct { models.Base Name string `json:"name"` OutputServerlessJSFileURL string `json:"output_serverless_js_file_url"` CreatorID uuid.UUID `json:"creator_id"` SpaceID uuid.UUID `pg:"type:uuid" json:"space_id"` Workflows []Workflow `pg:"rel:has-many" json:"workflows"` }
Automation stores information about an automation. No specification file is stored. Instead it is generated from model.
type Base ¶
type Base struct { models.Base Name string `json:"name"` CreatorID uuid.UUID `json:"creator_id"` SpaceID uuid.UUID `pg:"type:uuid" json:"space_id"` Tables []Table `pg:"rel:has-many" json:"tables"` }
Base stores information about a base. No specification file is stored. Instead it is generated from model.
type Board ¶
type Board struct { models.Base Name string `json:"name"` SpecificationFileURL string `json:"specification_file_url"` CreatorID uuid.UUID `json:"creator_id"` DeckID uuid.UUID `json:"deck_id"` }
Board stores information about a board.
type Deck ¶
type Deck struct { models.Base Name string `json:"name"` OutputBundleFolderURL string `json:"output_bundle_folder_url"` CreatorID uuid.UUID `pg:"type:uuid" json:"creator_id"` SpaceID uuid.UUID `pg:"type:uuid" json:"space_id"` Boards []Board `pg:"rel:has-many" json:"boards"` }
Deck stores information about a deck. No specification file is stored. Instead it is generated from model.
type Integration ¶
type Integration struct { models.Base Name string `json:"name"` SpecificationFileURL string `json:"specification_file_url"` CreatorID uuid.UUID `json:"creator_id"` XWorkspaceInstalledIntegrations []Workspace `pg:"many2many:x_workspace_installed_integrations" json:"-"` }
Integration stores information about an integration.
type Preferences ¶
type Preferences struct { models.Base Details PrefsDetails `json:"details"` UserID uuid.UUID `pg:"type:uuid,notnull" json:"user_id"` }
Preferences stores session preferences of a user.
func (*Preferences) Create ¶
func (preferences *Preferences) Create(db *database.DB) error
Create creates a preferences.
func (*Preferences) GetByID ¶
func (preferences *Preferences) GetByID(db *database.DB) error
GetByID gets an preferences by id.
func (*Preferences) UpdateByID ¶
func (preferences *Preferences) UpdateByID(db *database.DB) error
UpdateByID updates all the fields of a preferences by id.
type PrefsAutomation ¶
type PrefsAutomation struct { ID string `json:"id"` FocusWorkflowIndex int64 `json:"focus_workflow_index"` Workflows []struct { ID string `json:"id"` } `json:"workflows"` }
PrefsAutomation contains details about an automation.
type PrefsBase ¶
type PrefsBase struct { ID string `json:"id"` FocusTableIndex int64 `json:"focus_table_index"` Tables []struct { ID string `json:"id"` } `json:"tables"` }
PrefsBase contains details about a base.
type PrefsDeck ¶
type PrefsDeck struct { ID string `json:"id"` FocusBoardIndex int64 `json:"focus_board_index"` Boards []struct { ID string `json:"id"` } `json:"boards"` }
PrefsDeck contains details about a deck.
type PrefsDetails ¶
type PrefsDetails struct { FocusWorkspaceIndex *int64 `json:"focus_workspace_index"` Workspaces []PrefsWorkspace `json:"workspaces"` }
PrefsDetails contains details of the preferences.
func (*PrefsDetails) JSON ¶
func (details *PrefsDetails) JSON() (string, error)
JSON converts details to json.
type PrefsLayout ¶
type PrefsLayout struct { MainShortcuts []Shortcut `json:"main_shortcuts"` QuickShortcuts []Shortcut `json:"quick_shortcuts"` OtherShortcuts []Shortcut `json:"other_shortcuts"` }
PrefsLayout contains details about a layout.
type PrefsSpace ¶
type PrefsSpace struct { ID string `json:"id"` FocusDeckIndex *int64 `json:"focus_deck_index"` FocusAppIndex *int64 `json:"focus_app_index"` FocusAutomationIndex *int64 `json:"focus_automation_index"` FocusBaseIndex *int64 `json:"focus_base_index"` Decks []PrefsDeck `json:"decks"` Automations []PrefsAutomation `json:"automations"` Bases []PrefsBase `json:"bases"` }
PrefsSpace contains details about a space.
type PrefsWorkspace ¶
type PrefsWorkspace struct { ID string `json:"id"` FocusSpaceIndex *int64 `json:"focus_space_index"` Spaces []PrefsSpace `json:"spaces"` Layout PrefsLayout `json:"layout"` }
PrefsWorkspace contains details about a workspace.
type Profile ¶
type Profile struct { models.Base Username *string `json:"username"` FirstName *string `json:"first_name"` LastName *string `json:"last_name"` Email *string `json:"email"` AvatarURL *string `json:"avatar_url"` UserID uuid.UUID `pg:"type:uuid,notnull" json:"user_id"` }
Profile stores information about the user.
type Shortcut ¶
type Shortcut struct { IconName string `json:"icon_name"` EntityName string `json:"entity_name"` Route string `json:"route"` }
Shortcut represents a shortcut icon or button in the UI. Usually situated in sidebar.
type Space ¶
type Space struct { models.Base Name string `json:"name"` AvatarURL string `json:"avatar_url"` CreatorID uuid.UUID `pg:"type:uuid" json:"creator_id"` WorkspaceID uuid.UUID `pg:"type:uuid" json:"workspace_id"` Decks []Deck `pg:"rel:has-many" json:"decks"` Automations []Automation `pg:"rel:has-many" json:"automations"` Bases []Base `pg:"rel:has-many" json:"bases"` }
Space represents a sectio under a workspace.
type Table ¶
type Table struct { models.Base Name string `json:"name"` SpecificationFileURL string `json:"specification_file_url"` CreatorID uuid.UUID `json:"creator_id"` BaseID uuid.UUID `json:"base_id"` }
Table stores information about a table in a base.
type User ¶
type User struct { models.Base Profile Profile `pg:"rel:belongs-to" json:"profile"` Workspaces []Workspace `pg:"rel:has-many,join_fk:creator_id" json:"workspaces"` Spaces []Space `pg:"rel:has-many,join_fk:creator_id" json:"spaces"` Decks []Deck `pg:"rel:has-many,join_fk:creator_id" json:"decks"` Automations []Automation `pg:"rel:has-many,join_fk:creator_id" json:"automations"` Bases []Base `pg:"rel:has-many,join_fk:creator_id" json:"bases"` Boards []Board `pg:"rel:has-many,join_fk:creator_id" json:"boards"` Workflows []Workflow `pg:"rel:has-many,join_fk:creator_id" json:"workflows"` Tables []Table `pg:"rel:has-many,join_fk:creator_id" json:"tables"` Integrations []Integration `pg:"rel:has-many,join_fk:creator_id" json:"integrations"` XUserWorkspaceMemberships []Workspace `pg:"many2many:x_user_workspace_memberships" json:"-"` }
User stores information about a user.
func (*User) GetPreferencesByID ¶
func (user *User) GetPreferencesByID(db *database.DB) (*Preferences, error)
GetPreferencesByID gets a user's preferences.
type Workflow ¶
type Workflow struct { models.Base Name string `json:"name"` SpecificationFileURL string `json:"specification_file_url"` CreatorID uuid.UUID `json:"creator_id"` AutomationID uuid.UUID `json:"automation_id"` }
Workflow stores information about a workflow.
type Workspace ¶
type Workspace struct { models.Base Name string `json:"name"` AvatarURL string `json:"avatar_url"` CreatorID uuid.UUID `pg:"type:uuid" json:"creator_id"` Spaces []Space `pg:"rel:has-many" json:"spaces"` XUserWorkspaceMemberships []User `pg:"many2many:x_user_workspace_memberships" json:"-"` XWorkspaceInstalledIntegrations []Integration `pg:"many2many:x_workspace_installed_integrations" json:"-"` }
Workspace represents a workspace.
type XUserWorkspaceMembership ¶
type XUserWorkspaceMembership struct { models.BaseNoID UserID uuid.UUID `pg:",pk,type:uuid" json:"user_id"` WorkspaceID uuid.UUID `pg:",pk,type:uuid" json:"workspace_id"` }
XUserWorkspaceMembership is represents users membership to a workspace.
type XWorkspaceInstalledIntegration ¶
type XWorkspaceInstalledIntegration struct { models.BaseNoID WorkspaceID uuid.UUID `pg:",pk,type:uuid" json:"workspace_id"` IntegrationID uuid.UUID `pg:",pk,type:uuid" json:"integration_id"` }
XWorkspaceInstalledIntegration is represents users membership to a workspace.