Documentation ¶
Index ¶
- Constants
- type ActionStorage
- func (impl *ActionStorage) CountActionByTeamID(teamID int) (int, error)
- func (impl *ActionStorage) Create(action *model.Action) (int, error)
- func (impl *ActionStorage) Delete(teamID int, actionID int) error
- func (impl *ActionStorage) DeleteActionByTeamIDAndActionID(teamID int, actionID int) error
- func (impl *ActionStorage) DeleteActionsByApp(teamID int, appID int) error
- func (impl *ActionStorage) DeleteAllActionsByTeamIDAppIDAndVersion(teamID int, appID int, targetVersion int) error
- func (impl *ActionStorage) MakeActionPrivateByTeamIDAndAppID(teamID int, appID int, userID int) error
- func (impl *ActionStorage) MakeActionPublicByTeamIDAndAppID(teamID int, appID int, userID int) error
- func (impl *ActionStorage) RetrieveActionByTeamIDActionID(teamID int, actionID int) (*model.Action, error)
- func (impl *ActionStorage) RetrieveActionByTeamIDAndID(teamID int, actionID int) (*model.Action, error)
- func (impl *ActionStorage) RetrieveActionsByTeamIDAppIDAndVersion(teamID int, appID int, version int) ([]*model.Action, error)
- func (impl *ActionStorage) RetrieveActionsByTeamIDAppIDVersionAndType(teamID int, appID int, version int, actionType int) ([]*model.Action, error)
- func (impl *ActionStorage) RetrieveAll(teamID int, appID int) ([]*model.Action, error)
- func (impl *ActionStorage) RetrieveByID(teamID int, actionID int) (*model.Action, error)
- func (impl *ActionStorage) UpdatePrivacyByTeamIDAndAppIDAndUserID(teamID int, appID int, userID int, isPublic bool) error
- func (impl *ActionStorage) UpdateWholeAction(action *model.Action) error
- type AppSnapshotStorage
- func (impl *AppSnapshotStorage) Create(appSnapshot *model.AppSnapshot) (int, error)
- func (impl *AppSnapshotStorage) DeleteAllAppSnapshotByTeamIDAndAppID(teamID int, appID int) error
- func (impl *AppSnapshotStorage) RetrieveAll(teamID int) ([]*model.AppSnapshot, error)
- func (impl *AppSnapshotStorage) RetrieveByID(id int) (*model.AppSnapshot, error)
- func (impl *AppSnapshotStorage) RetrieveByTeamIDAndAppID(teamID int, appID int) ([]*model.AppSnapshot, error)
- func (impl *AppSnapshotStorage) RetrieveByTeamIDAppIDAndPage(teamID int, appID int, pagination *Pagination) ([]*model.AppSnapshot, error)
- func (impl *AppSnapshotStorage) RetrieveByTeamIDAppIDAndTargetVersion(teamID int, appID int, targetVersion int) (*model.AppSnapshot, error)
- func (impl *AppSnapshotStorage) RetrieveCountByTeamIDAndAppID(teamID int, appID int) (int64, error)
- func (impl *AppSnapshotStorage) RetrieveEditVersion(teamID int, appID int) (*model.AppSnapshot, error)
- func (impl *AppSnapshotStorage) UpdateWholeSnapshot(appSnapshot *model.AppSnapshot) error
- type AppStorage
- func (impl *AppStorage) CountAPPByTeamID(teamID int) (int, error)
- func (impl *AppStorage) CountByTeamID(teamID int) (int64, error)
- func (impl *AppStorage) CountByTeamIDAndKeywords(teamID int, keywords string) (int64, error)
- func (impl *AppStorage) Create(app *model.App) (int, error)
- func (impl *AppStorage) Delete(teamID int, appID int) error
- func (impl *AppStorage) RetrieveAppByTeamIDAndAppID(teamID int, appID int) (*model.App, error)
- func (impl *AppStorage) RetrieveAppLastModifiedTime(teamID int) (time.Time, error)
- func (impl *AppStorage) RetrieveByID(appID int) (*model.App, error)
- func (d *AppStorage) RetrieveByIDs(ids []int) ([]*model.App, error)
- func (impl *AppStorage) RetrieveByKeywordsAndSortByCreatedAtDesc(teamID int, keywords string) ([]*model.App, error)
- func (impl *AppStorage) RetrieveByKeywordsAndSortByCreatedAtDescByPage(teamID int, keywords string, pagination *Pagination) ([]*model.App, error)
- func (impl *AppStorage) RetrieveByKeywordsAndSortByUpdatedAtDesc(teamID int, keywords string) ([]*model.App, error)
- func (impl *AppStorage) RetrieveByKeywordsAndSortByUpdatedAtDescByPage(teamID int, keywords string, pagination *Pagination) ([]*model.App, error)
- func (impl *AppStorage) RetrieveByTeamID(teamID int) ([]*model.App, error)
- func (impl *AppStorage) RetrieveByTeamIDAndSortByCreatedAtDescByPage(teamID int, pagination *Pagination) ([]*model.App, error)
- func (impl *AppStorage) RetrieveByTeamIDAndSortByUpdatedAtDescByPage(teamID int, pagination *Pagination) ([]*model.App, error)
- func (impl *AppStorage) RetrieveByTeamIDOrderByUpdatedTime(teamID int) ([]*model.App, error)
- func (impl *AppStorage) RetrieveDeployedAppByTeamID(teamID int) ([]*model.App, error)
- func (impl *AppStorage) RetrieveDeployedAppByTeamIDOrderByUpdatedTime(teamID int) ([]*model.App, error)
- func (impl *AppStorage) Update(app *model.App) error
- func (impl *AppStorage) UpdateUpdatedAt(app *model.App) error
- func (impl *AppStorage) UpdateWholeApp(app *model.App) error
- type FlowActionStorage
- func (impl *FlowActionStorage) CountFlowActionByTeamID(teamID int) (int, error)
- func (impl *FlowActionStorage) Create(action *model.FlowAction) (int, error)
- func (impl *FlowActionStorage) Delete(teamID int, flowActionID int) error
- func (impl *FlowActionStorage) DeleteAllFlowActionsByTeamIDWorkflowIDAndVersion(teamID int, workflowID int, targetVersion int) error
- func (impl *FlowActionStorage) DeleteFlowActionByTeamIDAndFlowActionID(teamID int, flowActionID int) error
- func (impl *FlowActionStorage) DeleteFlowActionsByWorkflow(teamID int, workflowID int) error
- func (impl *FlowActionStorage) RetrieveAll(teamID int, workflowID int, version int) ([]*model.FlowAction, error)
- func (impl *FlowActionStorage) RetrieveByID(teamID int, flowActionID int) (*model.FlowAction, error)
- func (impl *FlowActionStorage) RetrieveByType(teamID int, workflowID int, version int, actionType int) ([]*model.FlowAction, error)
- func (impl *FlowActionStorage) RetrieveFlowActionByTeamIDAndID(teamID int, flowActionID int) (*model.FlowAction, error)
- func (impl *FlowActionStorage) RetrieveFlowActionByTeamIDFlowActionID(teamID int, flowActionID int) (*model.FlowAction, error)
- func (impl *FlowActionStorage) RetrieveFlowActionsByTeamIDWorkflowIDAndVersion(teamID int, workflowID int, version int) ([]*model.FlowAction, error)
- func (impl *FlowActionStorage) RetrieveFlowActionsByTeamIDWorkflowIDVersionAndType(teamID int, workflowID int, version int, actionType int) ([]*model.FlowAction, error)
- func (impl *FlowActionStorage) UpdateWholeFlowAction(action *model.FlowAction) error
- type KVStateStorage
- func (impl *KVStateStorage) Create(kvState *model.KVState) error
- func (impl *KVStateStorage) Delete(teamID int, kvStateID int) error
- func (impl *KVStateStorage) DeleteAllKVStatesByAppVersionAndType(teamID int, apprefid int, version int, stateType int) error
- func (impl *KVStateStorage) DeleteAllTypeKVStatesByApp(teamID int, apprefid int) error
- func (impl *KVStateStorage) DeleteAllTypeKVStatesByTeamIDAppIDAndVersion(teamID int, apprefid int, targetVersion int) error
- func (impl *KVStateStorage) DeleteAllTypeKVStatesByTeamIDAppIDAndVersionAndKey(teamID int, apprefid int, targetVersion int, key string) error
- func (impl *KVStateStorage) RetrieveByID(teamID int, kvStateID int) (*model.KVState, error)
- func (impl *KVStateStorage) RetrieveEditVersionByAppAndKey(teamID int, apprefid int, statetype int, key string) (*model.KVState, error)
- func (impl *KVStateStorage) RetrieveKVStatesByApp(teamID int, apprefid int, statetype int, version int) ([]*model.KVState, error)
- func (impl *KVStateStorage) RetrieveKVStatesByKey(teamID int, key string) ([]*model.KVState, error)
- func (impl *KVStateStorage) RetrieveKVStatesByTeamIDAppIDAndVersion(teamID int, apprefid int, version int) ([]*model.KVState, error)
- func (impl *KVStateStorage) RetrieveKVStatesByVersion(teamID int, version int) ([]*model.KVState, error)
- func (impl *KVStateStorage) Update(kvState *model.KVState) error
- type Pagination
- func (p *Pagination) CalculateTotalPagesByTotalRows(totalRows int64)
- func (p *Pagination) GetLimit() int
- func (p *Pagination) GetOffset() int
- func (p *Pagination) GetPage() int
- func (p *Pagination) GetSort() string
- func (p *Pagination) GetTotalPages() int
- func (p *Pagination) GetTotalRows() int64
- func (p *Pagination) SetSort(field string, vec string)
- func (p *Pagination) SetTotalRows(totalRows int64)
- type ResourceStorage
- func (impl *ResourceStorage) CountResourceByTeamID(teamID int) (int, error)
- func (impl *ResourceStorage) Create(resource *model.Resource) (int, error)
- func (impl *ResourceStorage) Delete(teamID int, resourceID int) error
- func (impl *ResourceStorage) RetrieveAllByUpdatedTime(teamID int) ([]*model.Resource, error)
- func (impl *ResourceStorage) RetrieveByTeamID(teamID int) ([]*model.Resource, error)
- func (impl *ResourceStorage) RetrieveByTeamIDAndResourceID(teamID int, resourceID int) (*model.Resource, error)
- func (impl *ResourceStorage) RetrieveResourceLastModifiedTime(teamID int) (time.Time, error)
- func (impl *ResourceStorage) UpdateWholeResource(resource *model.Resource) error
- type SetStateStorage
- func (impl *SetStateStorage) Create(setState *model.SetState) error
- func (impl *SetStateStorage) Delete(teamID int, setStateID int) error
- func (impl *SetStateStorage) DeleteAllTypeSetStatesByApp(teamID int, apprefid int) error
- func (impl *SetStateStorage) DeleteAllTypeSetStatesByTeamIDAppIDAndVersion(teamID int, apprefid int, targetVersion int) error
- func (impl *SetStateStorage) DeleteAllTypeSetStatesByTeamIDAppIDAndVersionAndValue(teamID int, apprefid int, targetVersion int, value string) error
- func (impl *SetStateStorage) DeleteByValue(setState *model.SetState) error
- func (impl *SetStateStorage) RetrieveByID(teamID int, setStateID int) (*model.SetState, error)
- func (impl *SetStateStorage) RetrieveByValue(setState *model.SetState) (*model.SetState, error)
- func (impl *SetStateStorage) RetrieveSetStatesByTeamIDAppIDAndVersion(teamID int, apprefid int, statetype int, version int) ([]*model.SetState, error)
- func (impl *SetStateStorage) RetrieveSetStatesByVersion(teamID int, version int) ([]*model.SetState, error)
- func (impl *SetStateStorage) Update(setState *model.SetState) error
- func (impl *SetStateStorage) UpdateByValue(beforeSetState *model.SetState, afterSetState *model.SetState) error
- type Storage
- type TreeStateStorage
- func (impl *TreeStateStorage) Create(treeState *model.TreeState) (int, error)
- func (impl *TreeStateStorage) CreateComponentTree(app *model.App, parentNodeID int, componentNodeTree *model.ComponentNode) error
- func (impl *TreeStateStorage) Delete(teamID int, treeStateID int) error
- func (impl *TreeStateStorage) DeleteAllTypeTreeStatesByApp(teamID int, apprefid int) error
- func (impl *TreeStateStorage) DeleteAllTypeTreeStatesByTeamIDAppIDAndVersion(teamID int, apprefid int, targetVersion int) error
- func (impl *TreeStateStorage) DeleteByIDs(treeStateIDs []int) error
- func (impl *TreeStateStorage) DeleteComponentTree(currentNode *model.TreeState) error
- func (impl *TreeStateStorage) MoveTreeStateNode(currentNode *model.TreeState) error
- func (impl *TreeStateStorage) RetrieveByID(teamID int, treeStateID int) (*model.TreeState, error)
- func (impl *TreeStateStorage) RetrieveByIDs(ids []int) ([]*model.TreeState, error)
- func (impl *TreeStateStorage) RetrieveEditVersionByAppAndName(teamID int, apprefid int, statetype int, name string) (*model.TreeState, error)
- func (impl *TreeStateStorage) RetrieveTreeStatesByApp(teamID int, apprefid int, statetype int, version int) ([]*model.TreeState, error)
- func (impl *TreeStateStorage) RetrieveTreeStatesByName(teamID int, name string) ([]*model.TreeState, error)
- func (impl *TreeStateStorage) RetrieveTreeStatesByTeamIDAppIDAndVersion(teamID int, apprefid int, version int) ([]*model.TreeState, error)
- func (impl *TreeStateStorage) RetrieveTreeStatesByVersion(teamID int, version int) ([]*model.TreeState, error)
- func (impl *TreeStateStorage) RetrieveTreeStatesLatestVersion(teamID int, appID int) (int, error)
- func (impl *TreeStateStorage) Update(treeState *model.TreeState) error
Constants ¶
View Source
const DEFAULT_PAGE_LIMIT = 10
View Source
const DEFAULT_SORT_ORDER = "id desc"
View Source
const SQL_SET_ACTION_PRIVATE = `` /* 132-byte string literal not displayed */
View Source
const SQL_SET_ACTION_PUBLIC = `` /* 131-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionStorage ¶
type ActionStorage struct {
// contains filtered or unexported fields
}
func NewActionStorage ¶
func NewActionStorage(logger *zap.SugaredLogger, db *gorm.DB) *ActionStorage
func (*ActionStorage) CountActionByTeamID ¶
func (impl *ActionStorage) CountActionByTeamID(teamID int) (int, error)
func (*ActionStorage) DeleteActionByTeamIDAndActionID ¶
func (impl *ActionStorage) DeleteActionByTeamIDAndActionID(teamID int, actionID int) error
func (*ActionStorage) DeleteActionsByApp ¶
func (impl *ActionStorage) DeleteActionsByApp(teamID int, appID int) error
func (*ActionStorage) DeleteAllActionsByTeamIDAppIDAndVersion ¶
func (impl *ActionStorage) DeleteAllActionsByTeamIDAppIDAndVersion(teamID int, appID int, targetVersion int) error
func (*ActionStorage) MakeActionPrivateByTeamIDAndAppID ¶
func (impl *ActionStorage) MakeActionPrivateByTeamIDAndAppID(teamID int, appID int, userID int) error
func (*ActionStorage) MakeActionPublicByTeamIDAndAppID ¶
func (impl *ActionStorage) MakeActionPublicByTeamIDAndAppID(teamID int, appID int, userID int) error
func (*ActionStorage) RetrieveActionByTeamIDActionID ¶
func (*ActionStorage) RetrieveActionByTeamIDAndID ¶
func (*ActionStorage) RetrieveActionsByTeamIDAppIDAndVersion ¶
func (*ActionStorage) RetrieveActionsByTeamIDAppIDVersionAndType ¶
func (*ActionStorage) RetrieveAll ¶
func (*ActionStorage) RetrieveByID ¶
func (*ActionStorage) UpdatePrivacyByTeamIDAndAppIDAndUserID ¶
func (*ActionStorage) UpdateWholeAction ¶
func (impl *ActionStorage) UpdateWholeAction(action *model.Action) error
type AppSnapshotStorage ¶
type AppSnapshotStorage struct {
// contains filtered or unexported fields
}
func NewAppSnapshotStorage ¶
func NewAppSnapshotStorage(logger *zap.SugaredLogger, db *gorm.DB) *AppSnapshotStorage
func (*AppSnapshotStorage) Create ¶
func (impl *AppSnapshotStorage) Create(appSnapshot *model.AppSnapshot) (int, error)
func (*AppSnapshotStorage) DeleteAllAppSnapshotByTeamIDAndAppID ¶
func (impl *AppSnapshotStorage) DeleteAllAppSnapshotByTeamIDAndAppID(teamID int, appID int) error
func (*AppSnapshotStorage) RetrieveAll ¶
func (impl *AppSnapshotStorage) RetrieveAll(teamID int) ([]*model.AppSnapshot, error)
func (*AppSnapshotStorage) RetrieveByID ¶
func (impl *AppSnapshotStorage) RetrieveByID(id int) (*model.AppSnapshot, error)
func (*AppSnapshotStorage) RetrieveByTeamIDAndAppID ¶
func (impl *AppSnapshotStorage) RetrieveByTeamIDAndAppID(teamID int, appID int) ([]*model.AppSnapshot, error)
func (*AppSnapshotStorage) RetrieveByTeamIDAppIDAndPage ¶
func (impl *AppSnapshotStorage) RetrieveByTeamIDAppIDAndPage(teamID int, appID int, pagination *Pagination) ([]*model.AppSnapshot, error)
func (*AppSnapshotStorage) RetrieveByTeamIDAppIDAndTargetVersion ¶
func (impl *AppSnapshotStorage) RetrieveByTeamIDAppIDAndTargetVersion(teamID int, appID int, targetVersion int) (*model.AppSnapshot, error)
func (*AppSnapshotStorage) RetrieveCountByTeamIDAndAppID ¶
func (impl *AppSnapshotStorage) RetrieveCountByTeamIDAndAppID(teamID int, appID int) (int64, error)
func (*AppSnapshotStorage) RetrieveEditVersion ¶
func (impl *AppSnapshotStorage) RetrieveEditVersion(teamID int, appID int) (*model.AppSnapshot, error)
func (*AppSnapshotStorage) UpdateWholeSnapshot ¶
func (impl *AppSnapshotStorage) UpdateWholeSnapshot(appSnapshot *model.AppSnapshot) error
type AppStorage ¶
type AppStorage struct {
// contains filtered or unexported fields
}
func NewAppStorage ¶
func NewAppStorage(logger *zap.SugaredLogger, db *gorm.DB) *AppStorage
func (*AppStorage) CountAPPByTeamID ¶
func (impl *AppStorage) CountAPPByTeamID(teamID int) (int, error)
func (*AppStorage) CountByTeamID ¶
func (impl *AppStorage) CountByTeamID(teamID int) (int64, error)
func (*AppStorage) CountByTeamIDAndKeywords ¶
func (impl *AppStorage) CountByTeamIDAndKeywords(teamID int, keywords string) (int64, error)
func (*AppStorage) RetrieveAppByTeamIDAndAppID ¶
func (*AppStorage) RetrieveAppLastModifiedTime ¶
func (impl *AppStorage) RetrieveAppLastModifiedTime(teamID int) (time.Time, error)
func (*AppStorage) RetrieveByID ¶
func (impl *AppStorage) RetrieveByID(appID int) (*model.App, error)
func (*AppStorage) RetrieveByIDs ¶
func (d *AppStorage) RetrieveByIDs(ids []int) ([]*model.App, error)
func (*AppStorage) RetrieveByKeywordsAndSortByCreatedAtDesc ¶
func (*AppStorage) RetrieveByKeywordsAndSortByCreatedAtDescByPage ¶
func (impl *AppStorage) RetrieveByKeywordsAndSortByCreatedAtDescByPage(teamID int, keywords string, pagination *Pagination) ([]*model.App, error)
func (*AppStorage) RetrieveByKeywordsAndSortByUpdatedAtDesc ¶
func (*AppStorage) RetrieveByKeywordsAndSortByUpdatedAtDescByPage ¶
func (impl *AppStorage) RetrieveByKeywordsAndSortByUpdatedAtDescByPage(teamID int, keywords string, pagination *Pagination) ([]*model.App, error)
func (*AppStorage) RetrieveByTeamID ¶
func (impl *AppStorage) RetrieveByTeamID(teamID int) ([]*model.App, error)
func (*AppStorage) RetrieveByTeamIDAndSortByCreatedAtDescByPage ¶
func (impl *AppStorage) RetrieveByTeamIDAndSortByCreatedAtDescByPage(teamID int, pagination *Pagination) ([]*model.App, error)
func (*AppStorage) RetrieveByTeamIDAndSortByUpdatedAtDescByPage ¶
func (impl *AppStorage) RetrieveByTeamIDAndSortByUpdatedAtDescByPage(teamID int, pagination *Pagination) ([]*model.App, error)
func (*AppStorage) RetrieveByTeamIDOrderByUpdatedTime ¶
func (impl *AppStorage) RetrieveByTeamIDOrderByUpdatedTime(teamID int) ([]*model.App, error)
func (*AppStorage) RetrieveDeployedAppByTeamID ¶
func (impl *AppStorage) RetrieveDeployedAppByTeamID(teamID int) ([]*model.App, error)
func (*AppStorage) RetrieveDeployedAppByTeamIDOrderByUpdatedTime ¶
func (impl *AppStorage) RetrieveDeployedAppByTeamIDOrderByUpdatedTime(teamID int) ([]*model.App, error)
func (*AppStorage) UpdateUpdatedAt ¶
func (impl *AppStorage) UpdateUpdatedAt(app *model.App) error
func (*AppStorage) UpdateWholeApp ¶
func (impl *AppStorage) UpdateWholeApp(app *model.App) error
type FlowActionStorage ¶
type FlowActionStorage struct {
// contains filtered or unexported fields
}
func NewFlowActionStorage ¶
func NewFlowActionStorage(logger *zap.SugaredLogger, db *gorm.DB) *FlowActionStorage
func (*FlowActionStorage) CountFlowActionByTeamID ¶
func (impl *FlowActionStorage) CountFlowActionByTeamID(teamID int) (int, error)
func (*FlowActionStorage) Create ¶
func (impl *FlowActionStorage) Create(action *model.FlowAction) (int, error)
func (*FlowActionStorage) Delete ¶
func (impl *FlowActionStorage) Delete(teamID int, flowActionID int) error
func (*FlowActionStorage) DeleteAllFlowActionsByTeamIDWorkflowIDAndVersion ¶
func (impl *FlowActionStorage) DeleteAllFlowActionsByTeamIDWorkflowIDAndVersion(teamID int, workflowID int, targetVersion int) error
func (*FlowActionStorage) DeleteFlowActionByTeamIDAndFlowActionID ¶
func (impl *FlowActionStorage) DeleteFlowActionByTeamIDAndFlowActionID(teamID int, flowActionID int) error
func (*FlowActionStorage) DeleteFlowActionsByWorkflow ¶
func (impl *FlowActionStorage) DeleteFlowActionsByWorkflow(teamID int, workflowID int) error
func (*FlowActionStorage) RetrieveAll ¶
func (impl *FlowActionStorage) RetrieveAll(teamID int, workflowID int, version int) ([]*model.FlowAction, error)
func (*FlowActionStorage) RetrieveByID ¶
func (impl *FlowActionStorage) RetrieveByID(teamID int, flowActionID int) (*model.FlowAction, error)
func (*FlowActionStorage) RetrieveByType ¶
func (impl *FlowActionStorage) RetrieveByType(teamID int, workflowID int, version int, actionType int) ([]*model.FlowAction, error)
func (*FlowActionStorage) RetrieveFlowActionByTeamIDAndID ¶
func (impl *FlowActionStorage) RetrieveFlowActionByTeamIDAndID(teamID int, flowActionID int) (*model.FlowAction, error)
func (*FlowActionStorage) RetrieveFlowActionByTeamIDFlowActionID ¶
func (impl *FlowActionStorage) RetrieveFlowActionByTeamIDFlowActionID(teamID int, flowActionID int) (*model.FlowAction, error)
func (*FlowActionStorage) RetrieveFlowActionsByTeamIDWorkflowIDAndVersion ¶
func (impl *FlowActionStorage) RetrieveFlowActionsByTeamIDWorkflowIDAndVersion(teamID int, workflowID int, version int) ([]*model.FlowAction, error)
func (*FlowActionStorage) RetrieveFlowActionsByTeamIDWorkflowIDVersionAndType ¶
func (impl *FlowActionStorage) RetrieveFlowActionsByTeamIDWorkflowIDVersionAndType(teamID int, workflowID int, version int, actionType int) ([]*model.FlowAction, error)
func (*FlowActionStorage) UpdateWholeFlowAction ¶
func (impl *FlowActionStorage) UpdateWholeFlowAction(action *model.FlowAction) error
type KVStateStorage ¶
type KVStateStorage struct {
// contains filtered or unexported fields
}
func NewKVStateStorage ¶
func NewKVStateStorage(logger *zap.SugaredLogger, db *gorm.DB) *KVStateStorage
func (*KVStateStorage) DeleteAllKVStatesByAppVersionAndType ¶
func (*KVStateStorage) DeleteAllTypeKVStatesByApp ¶
func (impl *KVStateStorage) DeleteAllTypeKVStatesByApp(teamID int, apprefid int) error
func (*KVStateStorage) DeleteAllTypeKVStatesByTeamIDAppIDAndVersion ¶
func (impl *KVStateStorage) DeleteAllTypeKVStatesByTeamIDAppIDAndVersion(teamID int, apprefid int, targetVersion int) error
func (*KVStateStorage) DeleteAllTypeKVStatesByTeamIDAppIDAndVersionAndKey ¶
func (*KVStateStorage) RetrieveByID ¶
func (*KVStateStorage) RetrieveEditVersionByAppAndKey ¶
func (*KVStateStorage) RetrieveKVStatesByApp ¶
func (*KVStateStorage) RetrieveKVStatesByKey ¶
func (*KVStateStorage) RetrieveKVStatesByTeamIDAppIDAndVersion ¶
func (*KVStateStorage) RetrieveKVStatesByVersion ¶
type Pagination ¶
type Pagination struct { Limit int `json:"limit,omitempty;query:limit"` Page int `json:"page,omitempty;query:page"` Sort string `json:"sort,omitempty;query:sort"` TotalRows int64 `json:"total_rows"` TotalPages int `json:"total_pages"` Rows interface{} `json:"rows"` }
func NewPagination ¶
func NewPagination(limit int, page int) *Pagination
func (*Pagination) CalculateTotalPagesByTotalRows ¶
func (p *Pagination) CalculateTotalPagesByTotalRows(totalRows int64)
func (*Pagination) GetLimit ¶
func (p *Pagination) GetLimit() int
func (*Pagination) GetOffset ¶
func (p *Pagination) GetOffset() int
func (*Pagination) GetPage ¶
func (p *Pagination) GetPage() int
func (*Pagination) GetSort ¶
func (p *Pagination) GetSort() string
func (*Pagination) GetTotalPages ¶
func (p *Pagination) GetTotalPages() int
func (*Pagination) GetTotalRows ¶
func (p *Pagination) GetTotalRows() int64
func (*Pagination) SetSort ¶
func (p *Pagination) SetSort(field string, vec string)
func (*Pagination) SetTotalRows ¶
func (p *Pagination) SetTotalRows(totalRows int64)
type ResourceStorage ¶
type ResourceStorage struct {
// contains filtered or unexported fields
}
func NewResourceStorage ¶
func NewResourceStorage(logger *zap.SugaredLogger, db *gorm.DB) *ResourceStorage
func (*ResourceStorage) CountResourceByTeamID ¶
func (impl *ResourceStorage) CountResourceByTeamID(teamID int) (int, error)
func (*ResourceStorage) Create ¶
func (impl *ResourceStorage) Create(resource *model.Resource) (int, error)
func (*ResourceStorage) Delete ¶
func (impl *ResourceStorage) Delete(teamID int, resourceID int) error
func (*ResourceStorage) RetrieveAllByUpdatedTime ¶
func (impl *ResourceStorage) RetrieveAllByUpdatedTime(teamID int) ([]*model.Resource, error)
func (*ResourceStorage) RetrieveByTeamID ¶
func (impl *ResourceStorage) RetrieveByTeamID(teamID int) ([]*model.Resource, error)
func (*ResourceStorage) RetrieveByTeamIDAndResourceID ¶
func (*ResourceStorage) RetrieveResourceLastModifiedTime ¶
func (impl *ResourceStorage) RetrieveResourceLastModifiedTime(teamID int) (time.Time, error)
func (*ResourceStorage) UpdateWholeResource ¶
func (impl *ResourceStorage) UpdateWholeResource(resource *model.Resource) error
type SetStateStorage ¶
type SetStateStorage struct {
// contains filtered or unexported fields
}
func NewSetStateStorage ¶
func NewSetStateStorage(logger *zap.SugaredLogger, db *gorm.DB) *SetStateStorage
func (*SetStateStorage) Create ¶
func (impl *SetStateStorage) Create(setState *model.SetState) error
func (*SetStateStorage) Delete ¶
func (impl *SetStateStorage) Delete(teamID int, setStateID int) error
func (*SetStateStorage) DeleteAllTypeSetStatesByApp ¶
func (impl *SetStateStorage) DeleteAllTypeSetStatesByApp(teamID int, apprefid int) error
func (*SetStateStorage) DeleteAllTypeSetStatesByTeamIDAppIDAndVersion ¶
func (impl *SetStateStorage) DeleteAllTypeSetStatesByTeamIDAppIDAndVersion(teamID int, apprefid int, targetVersion int) error
func (*SetStateStorage) DeleteAllTypeSetStatesByTeamIDAppIDAndVersionAndValue ¶
func (*SetStateStorage) DeleteByValue ¶
func (impl *SetStateStorage) DeleteByValue(setState *model.SetState) error
func (*SetStateStorage) RetrieveByID ¶
func (*SetStateStorage) RetrieveByValue ¶
func (*SetStateStorage) RetrieveSetStatesByTeamIDAppIDAndVersion ¶
func (*SetStateStorage) RetrieveSetStatesByVersion ¶
func (*SetStateStorage) Update ¶
func (impl *SetStateStorage) Update(setState *model.SetState) error
func (*SetStateStorage) UpdateByValue ¶
type Storage ¶
type Storage struct { AppStorage *AppStorage ActionStorage *ActionStorage FlowActionStorage *FlowActionStorage AppSnapshotStorage *AppSnapshotStorage KVStateStorage *KVStateStorage ResourceStorage *ResourceStorage SetStateStorage *SetStateStorage TreeStateStorage *TreeStateStorage }
func NewStorage ¶
func NewStorage(postgresDriver *gorm.DB, logger *zap.SugaredLogger) *Storage
type TreeStateStorage ¶
type TreeStateStorage struct {
// contains filtered or unexported fields
}
func NewTreeStateStorage ¶
func NewTreeStateStorage(logger *zap.SugaredLogger, db *gorm.DB) *TreeStateStorage
func (*TreeStateStorage) Create ¶
func (impl *TreeStateStorage) Create(treeState *model.TreeState) (int, error)
func (*TreeStateStorage) CreateComponentTree ¶
func (impl *TreeStateStorage) CreateComponentTree(app *model.App, parentNodeID int, componentNodeTree *model.ComponentNode) error
insert tree state by component tree, websocket message like:
{ "signal": 3, "target": 1, "option": 1, "broadcast": { "type": "components/addComponentReducer", "payload": [ { "w": 6, "h": 5, "minW": 1, "minH": 3, "x": 18, "y": 28, "z": 0, "showName": "input", "type": "INPUT_WIDGET", "displayName": "input1", "containerType": "EDITOR_SCALE_SQUARE", "parentNode": "bodySection1-bodySectionContainer1", "childrenNode": [], "props": { "value": "", "label": "Label", "labelAlign": "left", "labelPosition": "left", "labelWidth": "{{33}}", "colorScheme": "blue", "hidden": false, "formDataKey": "{{input1.displayName}}", "placeholder": "input sth", "$dynamicAttrPaths": [ "labelWidth", "formDataKey", "showVisibleButton" ], "type": "input", "showVisibleButton": "{{true}}" }, "version": 0 } ] }, "payload": [ { "w": 6, "h": 5, "minW": 1, "minH": 3, "x": 18, "y": 28, "z": 0, "showName": "input", "type": "INPUT_WIDGET", "displayName": "input1", "containerType": "EDITOR_SCALE_SQUARE", "parentNode": "bodySection1-bodySectionContainer1", "childrenNode": [], "props": { "value": "", "label": "Label", "labelAlign": "left", "labelPosition": "left", "labelWidth": "{{33}}", "colorScheme": "blue", "hidden": false, "formDataKey": "{{input1.displayName}}", "placeholder": "input sth", "$dynamicAttrPaths": [ "labelWidth", "formDataKey", "showVisibleButton" ], "type": "input", "showVisibleButton": "{{true}}" }, "version": 0 } ], "teamID": "ILAfx4p1C7bN", "uid": "ILAfx4p1C7bN" }
func (*TreeStateStorage) Delete ¶
func (impl *TreeStateStorage) Delete(teamID int, treeStateID int) error
func (*TreeStateStorage) DeleteAllTypeTreeStatesByApp ¶
func (impl *TreeStateStorage) DeleteAllTypeTreeStatesByApp(teamID int, apprefid int) error
func (*TreeStateStorage) DeleteAllTypeTreeStatesByTeamIDAppIDAndVersion ¶
func (impl *TreeStateStorage) DeleteAllTypeTreeStatesByTeamIDAppIDAndVersion(teamID int, apprefid int, targetVersion int) error
func (*TreeStateStorage) DeleteByIDs ¶
func (impl *TreeStateStorage) DeleteByIDs(treeStateIDs []int) error
func (*TreeStateStorage) DeleteComponentTree ¶
func (impl *TreeStateStorage) DeleteComponentTree(currentNode *model.TreeState) error
delete component tree, message like:
{ "signal": 4, "target": 1, "option": 1, "broadcast": { "type": "components/deleteComponentNodeReducer", "payload": { "displayNames": [ "image1" ], "source": "manage_delete" } }, "payload": [ "image1" ], "teamID": "ILAfx4p1C7bN", "uid": "ILAfx4p1C7bN" }
func (*TreeStateStorage) MoveTreeStateNode ¶
func (impl *TreeStateStorage) MoveTreeStateNode(currentNode *model.TreeState) error
@todo: add tree ref circle checker.
func (*TreeStateStorage) RetrieveByID ¶
func (*TreeStateStorage) RetrieveByIDs ¶
func (impl *TreeStateStorage) RetrieveByIDs(ids []int) ([]*model.TreeState, error)
func (*TreeStateStorage) RetrieveEditVersionByAppAndName ¶
func (*TreeStateStorage) RetrieveTreeStatesByApp ¶
func (*TreeStateStorage) RetrieveTreeStatesByName ¶
func (*TreeStateStorage) RetrieveTreeStatesByTeamIDAppIDAndVersion ¶
func (*TreeStateStorage) RetrieveTreeStatesByVersion ¶
func (*TreeStateStorage) RetrieveTreeStatesLatestVersion ¶
func (impl *TreeStateStorage) RetrieveTreeStatesLatestVersion(teamID int, appID int) (int, error)
Click to show internal directories.
Click to hide internal directories.