Documentation ¶
Index ¶
- Constants
- Variables
- func BuildTreeStateLookupTable(treeStates []*TreeState) map[int]*TreeState
- func DoesActionHasBeenCreated(actionID int) bool
- func DoesFlowActionHasBeenCreated(actionID int) bool
- func ExportComponentTreeAllDisplayNames(cnode *ComponentNode, displayNames []string)
- func ExtractAllEditorIDFromApps(apps []*App) []int
- func ExtractAllModifierIDFromAppSnapshot(appSnapshots []*AppSnapshot) []int
- func ExtractComponentsNameList(treeStates []*TreeState) []string
- func GenerateGoogleSheetsOAuth2Token(teamID int, userID int, resourceID int, ...) (string, error)
- func NewUsersByDataControlRawData(rawUsersString string) (map[int]*User, error)
- func ResolveDisplayNameByPayload(data interface{}) (string, error)
- type Action
- func NewAcitonByCreateActionRequest(app *App, userID int, req *request.CreateActionRequest) (*Action, error)
- func NewAcitonByRunActionRequest(app *App, userID int, req *request.RunActionRequest) *Action
- func NewAcitonByUpdateActionRequest(app *App, userID int, req *request.UpdateActionRequest) (*Action, error)
- func NewAction() *Action
- func (action *Action) AppendNewVersion(newVersion int)
- func (action *Action) AppendRuntimeInfoForVirtualResource(authorization string, teamID int)
- func (action *Action) CleanID()
- func (action *Action) ExportConfig() *ActionConfig
- func (action *Action) ExportConfigInMap() map[string]interface{}
- func (action *Action) ExportDisplayName() string
- func (action *Action) ExportID() int
- func (action *Action) ExportIcon() string
- func (action *Action) ExportRawTemplateInMap() map[string]interface{}
- func (action *Action) ExportResourceID() int
- func (action *Action) ExportTemplateInMap() map[string]interface{}
- func (action *Action) ExportTransformerInMap() map[string]interface{}
- func (action *Action) ExportType() int
- func (action *Action) ExportTypeInString() string
- func (action *Action) InitCreatedAt()
- func (action *Action) InitForFork(teamID int, appID int, version int, userID int)
- func (action *Action) InitUID()
- func (action *Action) InitUpdatedAt()
- func (action *Action) IsLocalVirtualAction() bool
- func (action *Action) IsPublic() bool
- func (action *Action) IsRemoteVirtualAction() bool
- func (action *Action) IsVirtualAction() bool
- func (action *Action) MergeRunActionContextToRawTemplate(context map[string]interface{})
- func (action *Action) RewritePublicSettings(isPublic bool)
- func (action *Action) SetPrivate(userID int)
- func (action *Action) SetPublic(userID int)
- func (action *Action) SetResourceIDByAiAgent(aiAgent *kozmoresourcemanagersdk.AIAgentForExport)
- func (action *Action) SetTutorialLink(link string, userID int)
- func (action *Action) UpdateAcitonByUpdateActionRequest(app *App, userID int, req *request.UpdateActionRequest)
- func (action *Action) UpdateAppConfig(actionConfig *ActionConfig, userID int)
- func (action *Action) UpdateWithRunActionRequest(req *request.RunActionRequest, userID int)
- type ActionConfig
- type ActionFactory
- type ActionForExport
- func (resp *ActionForExport) AppendVirtualResourceToTemplate(value interface{})
- func (resp *ActionForExport) ExportDisplayName() string
- func (resp *ActionForExport) ExportForFeedback() interface{}
- func (resp *ActionForExport) ExportResourceID() string
- func (resp *ActionForExport) ExportResourceIDInInt() int
- func (resp *ActionForExport) ExportTeamID() string
- type ActionSummaryForExport
- type AdvancedConfig
- type App
- func (app *App) BumpMainlineVersion()
- func (app *App) BumpMainlineVersionOverReleaseVersion()
- func (app *App) ExportAppName() string
- func (app *App) ExportAppType() int
- func (app *App) ExportConfig() *AppConfig
- func (app *App) ExportCreatedBy() int
- func (app *App) ExportEditedBy() []*AppEditedBy
- func (app *App) ExportID() int
- func (app *App) ExportMainlineVersion() int
- func (app *App) ExportModifiedAllUserIDs() []int
- func (app *App) ExportReleaseVersion() int
- func (app *App) ExportTeamID() int
- func (app *App) ExportUpdatedAt() time.Time
- func (app *App) ExportUpdatedBy() int
- func (app *App) ImportEditedBy(appEditedBys []*AppEditedBy)
- func (app *App) InitCreatedAt()
- func (app *App) InitForFork(teamID int, modifyUserID int)
- func (app *App) InitUID()
- func (app *App) InitUpdatedAt()
- func (app *App) IsPublic() bool
- func (app *App) IsPublishWithAIAgent() bool
- func (app *App) IsPublishedToMarketplace() bool
- func (app *App) Modify(userID int)
- func (app *App) PushEditedBy(currentEditedBy *AppEditedBy)
- func (app *App) Release()
- func (app *App) ReleaseMainlineVersion()
- func (app *App) RewritePublicSettings(isPublic bool)
- func (app *App) SetID(appID int)
- func (app *App) SetNotPublishedToMarketplace(userID int)
- func (app *App) SetPrivate(userID int)
- func (app *App) SetPublic(userID int)
- func (app *App) SetPublishedToMarketplace(publishedToMarketpalce bool, modifyUserID int)
- func (app *App) SyncMainlineVersionWithTreeStateLatestVersion(treeStateLatestVersion int)
- func (app *App) UpdateAppByConfigAppRawRequest(rawReq map[string]interface{}) error
- func (app *App) UpdateAppConfig(appConfig *AppConfig, userID int)
- type AppActivity
- type AppConfig
- func (appConfig *AppConfig) DisableWaterMark()
- func (appConfig *AppConfig) EnableWaterMark()
- func (appConfig *AppConfig) ExportAppType() int
- func (appConfig *AppConfig) ExportAppTypeToString() string
- func (appConfig *AppConfig) ExportToJSONString() string
- func (appConfig *AppConfig) IsPublic() bool
- func (appConfig *AppConfig) SetAppType(appType int)
- func (appConfig *AppConfig) SetAppTypeByString(appType string) error
- func (appConfig *AppConfig) SetCover(cover string)
- func (appConfig *AppConfig) SetNotPublishWithAIAgent()
- func (appConfig *AppConfig) SetNotPublishedToMarketplace()
- func (appConfig *AppConfig) SetPublishWithAIAgent()
- func (appConfig *AppConfig) SetublishedToMarketplace()
- func (appConfig *AppConfig) UpdateAppConfigByConfigAppRawRequest(rawReq map[string]interface{}) error
- type AppConfigForExport
- type AppEditedBy
- type AppForExport
- type AppModifyHistory
- type AppModifyHistoryForExport
- type AppSnapshot
- func (appSnapshot *AppSnapshot) DoesActiveSnapshotNeedArchive() bool
- func (appSnapshot *AppSnapshot) ExportCreatedAt() time.Time
- func (appSnapshot *AppSnapshot) ExportModifyHistory() []*AppModifyHistory
- func (appSnapshot *AppSnapshot) ExportTargetVersion() int
- func (appSnapshot *AppSnapshot) ImportModifyHistory(appModifyHistorys []*AppModifyHistory)
- func (appSnapshot *AppSnapshot) InitCreatedAt()
- func (appSnapshot *AppSnapshot) InitModifyHistory()
- func (appSnapshot *AppSnapshot) InitUID()
- func (appSnapshot *AppSnapshot) PushModifyHistory(currentAppModifyHistory *AppModifyHistory)
- func (appSnapshot *AppSnapshot) SetTargetVersion(targetVersion int)
- func (appSnapshot *AppSnapshot) SetTriggerMode(triggerMode int)
- func (appSnapshot *AppSnapshot) SetTriggerModeAuto()
- func (appSnapshot *AppSnapshot) SetTriggerModeManual()
- type AppSnapshotForExport
- type ComponentNode
- type ComponentStateForUpdate
- type DisplayNameState
- type DisplayNameStateForUpdate
- type FlowAction
- func NewFlowAcitonByCreateFlowActionRequest(teamID int, workflowID int, userID int, req *request.CreateFlowActionRequest) (*FlowAction, error)
- func NewFlowAcitonByRunFlowActionRequest(teamID int, workflowID int, userID int, req *request.RunFlowActionRequest) *FlowAction
- func NewFlowAcitonByUpdateFlowActionRequest(teamID int, workflowID int, userID int, req *request.UpdateFlowActionRequest) (*FlowAction, error)
- func NewFlowAction() *FlowAction
- func (action *FlowAction) AppendNewVersion(newVersion int)
- func (action *FlowAction) AppendRuntimeInfoForVirtualResource(authorization string, teamID int)
- func (action *FlowAction) CleanID()
- func (action *FlowAction) ExportConfig() *FlowActionConfig
- func (action *FlowAction) ExportConfigInMap() map[string]interface{}
- func (action *FlowAction) ExportDisplayName() string
- func (action *FlowAction) ExportID() int
- func (action *FlowAction) ExportIcon() string
- func (action *FlowAction) ExportRawTemplateInMap() map[string]interface{}
- func (action *FlowAction) ExportResourceID() int
- func (action *FlowAction) ExportTemplateInMap() map[string]interface{}
- func (action *FlowAction) ExportTransformerInMap() map[string]interface{}
- func (action *FlowAction) ExportType() int
- func (action *FlowAction) ExportTypeInString() string
- func (action *FlowAction) InitCreatedAt()
- func (action *FlowAction) InitForFork(teamID int, workflowID int, version int, userID int)
- func (action *FlowAction) InitUID()
- func (action *FlowAction) InitUpdatedAt()
- func (action *FlowAction) IsLocalVirtualFlowAction() bool
- func (action *FlowAction) IsRemoteVirtualFlowAction() bool
- func (action *FlowAction) IsVirtualFlowAction() bool
- func (action *FlowAction) MergeRunFlowActionContextToRawTemplate(context map[string]interface{})
- func (action *FlowAction) SetContextByMap(context map[string]interface{})
- func (action *FlowAction) SetResourceIDByAiAgent(aiAgent *kozmoresourcemanagersdk.AIAgentForExport)
- func (action *FlowAction) SetTemplate(tempalte interface{})
- func (action *FlowAction) UpdateAppConfig(actionConfig *FlowActionConfig, userID int)
- func (action *FlowAction) UpdateFlowAcitonByUpdateFlowActionRequest(teamID int, workflowID int, userID int, req *request.UpdateFlowActionRequest)
- func (action *FlowAction) UpdateWithRunFlowActionRequest(req *request.RunFlowActionRequest, userID int)
- type FlowActionConfig
- type FlowAdvancedConfig
- type FlowMockConfig
- type FullAppForExport
- type GoogleSheetsOAuth2Claims
- type GoogleSheetsOAuth2Options
- type KVState
- func (kvState *KVState) AppendNewVersion(newVersion int)
- func (kvState *KVState) CleanID()
- func (kvState *KVState) ExportID() int
- func (kvState *KVState) ExportKey() string
- func (kvState *KVState) ExportVersion() int
- func (kvState *KVState) InitCreatedAt()
- func (kvState *KVState) InitForFork(teamID int, appID int, version int, userID int)
- func (kvState *KVState) InitUID()
- func (kvState *KVState) InitUpdatedAt()
- func (kvState *KVState) UpdateByNewKVState(newKVState *KVState)
- type MockConfig
- 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 RawTeam
- type RawUser
- type RawUsers
- type Resource
- func (resource *Resource) CanCreateOAuthToken() bool
- func (resource *Resource) CleanID()
- func (resource *Resource) ExportOptionsInMap() map[string]interface{}
- func (resource *Resource) ExportType() int
- func (resource *Resource) ExportTypeInString() string
- func (resource *Resource) ExportUpdatedAt() time.Time
- func (resource *Resource) InitCreatedAt()
- func (resource *Resource) InitUID()
- func (resource *Resource) InitUpdatedAt()
- func (resource *Resource) UpdateByUpdateResourceRequest(userID int, req *request.UpdateResourceRequest)
- func (resource *Resource) UpdateGoogleSheetOAuth2Options(userID int, options *ResourceOptionGoogleSheets)
- type ResourceForExport
- type ResourceOptionGoogleSheets
- func (i *ResourceOptionGoogleSheets) ExportInString() string
- func (i *ResourceOptionGoogleSheets) ExportRefreshToken() string
- func (i *ResourceOptionGoogleSheets) IsAvaliableAuthenticationMethod() bool
- func (i *ResourceOptionGoogleSheets) SetAccessToken(accessToken string)
- func (i *ResourceOptionGoogleSheets) UpdateByExchangeTokenResponse(repo *oauthgoogle.ExchangeTokenResponse)
- type SetState
- func (setState *SetState) AppendNewVersion(newVersion int)
- func (setState *SetState) CleanID()
- func (setState *SetState) ExportID() int
- func (setState *SetState) ExportValue() string
- func (setState *SetState) ExportVersion() int
- func (setState *SetState) InitCreatedAt()
- func (setState *SetState) InitForFork(teamID int, appID int, version int, userID int)
- func (setState *SetState) InitUID()
- func (setState *SetState) InitUpdatedAt()
- func (setState *SetState) UpdateByNewSetState(newSetState *SetState)
- type Team
- type TreeState
- func NewTreeState() *TreeState
- func NewTreeStateByApp(app *App, stateType int) *TreeState
- func NewTreeStateByAppAndComponentState(app *App, stateType int, componentNode *ComponentNode) (*TreeState, error)
- func NewTreeStateByDeleteComponentsWebsocketMessage(app *App, stateType int, data interface{}) (*TreeState, error)
- func NewTreeStateByMoveStateWebsocketMessage(app *App, stateType int, data interface{}) (*TreeState, error)
- func NewTreeStateByTeamIDAndStateType(teamID int, stateType int) *TreeState
- func NewTreeStateByWebsocketMessage(app *App, stateType int, data interface{}) (*TreeState, error)
- func PickUpTreeStatesRootNode(treeStates []*TreeState) *TreeState
- func (treeState *TreeState) AppendChildrenNodeRefIDs(targetIDs []int) error
- func (treeState *TreeState) AppendNewVersion(newVersion int)
- func (treeState *TreeState) CleanID()
- func (treeState *TreeState) ExportChildrenNodeRefIDs() ([]int, error)
- func (treeState *TreeState) ExportContentAsComponentState() (*ComponentNode, error)
- func (treeState *TreeState) ExportID() int
- func (treeState *TreeState) ExportName() string
- func (treeState *TreeState) ExportStateType() int
- func (treeState *TreeState) InitCreatedAt()
- func (treeState *TreeState) InitForFork(teamID int, appID int, version int, userID int)
- func (treeState *TreeState) InitUID()
- func (treeState *TreeState) InitUpdatedAt()
- func (treeState *TreeState) RemapChildrenNodeRefIDs(idMap map[int]int)
- func (treeState *TreeState) RemoveChildrenNodeRefIDs(targetIDs []int) error
- func (treeState *TreeState) ResetChildrenNodeRefIDsByMap(idMap map[int]int)
- func (treeState *TreeState) ResetParentNodeRefIDByMap(idMap map[int]int)
- func (treeState *TreeState) SetParentNodeRefID(id int)
- func (treeState *TreeState) SetTeamID(teamID int)
- func (treeState *TreeState) UpdateByNewTreeState(newTreeState *TreeState)
- func (treeState *TreeState) UpdateNameAndContent(newTreeState *TreeState)
- type User
- type UserForEditedBy
- type UserForModifiedBy
- type WebsocketConnectionInfo
- func (i *WebsocketConnectionInfo) GetAppRoomBinaryConnectionAddress(teamID int, roomID int, zone string) string
- func (i *WebsocketConnectionInfo) GetAppRoomConnectionAddress(teamID int, roomID int, zone string) string
- func (i *WebsocketConnectionInfo) GetConnectionAddressByCountryCode(countryCode string) string
- func (i *WebsocketConnectionInfo) GetDashboardConnectionAddress(teamID int, zone string) string
Constants ¶
const ( ACTION_RUNTIME_INFO_FIELD_TEAM_ID = "teamID" ACTION_RUNTIME_INFO_FIELD_APP_ID = "appID" ACTION_RUNTIME_INFO_FIELD_RESOURCE_ID = "resourceID" ACTION_RUNTIME_INFO_FIELD_ACTION_ID = "actionID" ACTION_RUNTIME_INFO_FIELD_AUTHORIZATION = "authorization" ACTION_RUNTIME_INFO_FIELD_RUN_BY_ANONYMOUS = "runByAnonymous" ACTION_RUNTIME_INFO_FIELD_CONTEXT = "context" )
const ( ACTION_CONFIG_FIELD_PUBLIC = "public" ACTION_CONFIG_FIELD_VIRTUAL_RESOURCE = "virtualResource" )
const ( APP_TYPE_PC = 1 APP_TYPE_MOBILE = 2 )
const ( APP_TYPE_STRING_PC = "pc" APP_TYPE_STRING_MOBILE = "mobile" )
const ( SNAPSHOT_TRIGGER_MODE_AUTO = 1 SNAPSHOT_TRIGGER_MODE_MANUAL = 2 )
const ( GOOGLE_SHEETS_OAUTH2_ACCESS_TYPE_INVALIED = 0 GOOGLE_SHEETS_OAUTH2_ACCESS_TYPE_READ_AND_WRITE = 1 GOOGLE_SHEETS_OAUTH2_ACCESS_TYPE_READ_ONLY = 2 )
const ( GOOGLE_SHEETS_OAUTH_STATUS_SUCCESS = 1 GOOGLE_SHEETS_OAUTH_STATUS_FAILED = 2 )
const ( TREE_STATE_FIELD_DISPLAY_NAME = "displayName" TREE_STATE_FIELD_PARENT_NODE = "parentNode" )
const ( CONNECTION_ZONE_SOUTH_ASIA = "southAsia" CONNECTION_ZONE_EAST_ASIA = "eastAsia" CONNECTION_ZONE_CENTER_EUROPE = "centerEurope" )
const (
ACTION_FOR_EXPORT_FIELD_VIRTUAL_RESOURCE = "virtualResource"
)
const (
ANONYMOUS_USER_ID = -1
)
anonymous user config
const APP_AUTO_MAINLINE_VERSION = -1 // -1 for get latest mainline version automatically
const APP_AUTO_RELEASE_VERSION = -2 // -1 for get latest release version automatically
const APP_CONFIG_FIELD_APP_TYPE = "appType"
const APP_CONFIG_FIELD_DESCRIPTION = "description"
const APP_CONFIG_FIELD_PUBLIC = "public"
const APP_CONFIG_FIELD_PUBLISHED_TO_MARKETPLACE = "publishedToMarketplace"
const APP_CONFIG_FIELD_PUBLISH_WITH_AI_AGENT = "publishWithAIAgent"
const APP_CONFIG_FIELD_WATER_MARK = "waterMark"
const APP_EDITED_BY_MAX_LENGTH = 4
const APP_EDIT_VERSION = 0 // the editable version app ID always be 0
const APP_FIELD_NAME = "appName"
const APP_MODIFY_HISTORY_MAX_LEN = 10
const APP_SNAPSHOT_PERIOD = time.Second * 300 // 5 min
const CUSTOMIZATION_LANGUAGE_EN_US = "en-US"
const CUSTOMIZATION_LANGUAGE_ZH_CN = "zh-CN"
const DASHBOARD_WS_URL = "%s://%s/teams/%s/room/websocketConnection/dashboard"
const DEFAULT_PAGE_LIMIT = 10
const DEFAULT_SORT_ORDER = "id desc"
const (
FLOW_ACTION_EDIT_VERSION = 0
)
const (
GOOGLE_OAUTH2_TOKEN_DEFAULT_EXIPRED_PERIOD = time.Minute * 60
)
const (
GOOGLE_SHEET_OAUTH_TYPE = "oauth2"
)
const (
INVALIED_ACTION_ID = 0
)
const (
KV_STATE_FIELD_DISPLAY_NAME = "displayName"
)
const KV_STATE_TYPE_DEPENDENCIES = 2 // DependenciesState
const KV_STATE_TYPE_DOTTED_LINE_SQUARE = 4 // DottedLineSquareState
const KV_STATE_TYPE_DRAG_SHADOW = 3 // DragShadowState
const PENDING_USER_AVATAR = ""
const PENDING_USER_NICKNAME = "pending"
const PENDING_USER_PASSWORDDIGEST = "pending"
const PROTOCOL_WEBSOCKET = "ws"
const PROTOCOL_WEBSOCKET_OVER_TLS = "wss"
const ROOM_BINARY_WS_URL = "%s://%s/teams/%s/room/binaryWebsocketConnection/apps/%s"
const ROOM_WS_URL = "%s://%s/teams/%s/room/websocketConnection/apps/%s"
const SELF_HOST_DASHBOARD_WS_URL = "/builder-ws/teams/%s/room/websocketConnection/dashboard"
const SELF_HOST_ROOM_BINARY_WS_URL = "/builder-ws/teams/%s/room/binaryWebsocketConnection/apps/%s"
const SELF_HOST_ROOM_WS_URL = "/builder-ws/teams/%s/room/websocketConnection/apps/%s"
const (
SET_STATE_FIELD_DISPLAY_NAME = "displayName"
)
const SET_STATE_TYPE_DISPLAY_NAME = 5 // DisplayNameState
const SNAPSHOT_TARGET_APP = "app"
const STATE_TYPE_INVALIED = 0
define StateType
const TREE_STATE_SUMMIT_ID = 0
const TREE_STATE_SUMMIT_NAME = "root"
const TREE_STATE_TYPE_COMPONENTS = 1 // ComponentsState
Variables ¶
var CountryCodeMappedIngressAddress = map[string]string{ "AF": CONNECTION_ZONE_EAST_ASIA, "CN": CONNECTION_ZONE_EAST_ASIA, "JP": CONNECTION_ZONE_EAST_ASIA, "KP": CONNECTION_ZONE_EAST_ASIA, "HK": CONNECTION_ZONE_EAST_ASIA, "MO": CONNECTION_ZONE_EAST_ASIA, "MN": CONNECTION_ZONE_EAST_ASIA, "KR": CONNECTION_ZONE_EAST_ASIA, "TW": CONNECTION_ZONE_EAST_ASIA, "TL": CONNECTION_ZONE_SOUTH_ASIA, "ID": CONNECTION_ZONE_SOUTH_ASIA, "LA": CONNECTION_ZONE_SOUTH_ASIA, "IN": CONNECTION_ZONE_SOUTH_ASIA, "MY": CONNECTION_ZONE_SOUTH_ASIA, "MM": CONNECTION_ZONE_SOUTH_ASIA, "PH": CONNECTION_ZONE_SOUTH_ASIA, "SG": CONNECTION_ZONE_SOUTH_ASIA, "BD": CONNECTION_ZONE_SOUTH_ASIA, "BT": CONNECTION_ZONE_SOUTH_ASIA, "IR": CONNECTION_ZONE_SOUTH_ASIA, "MV": CONNECTION_ZONE_SOUTH_ASIA, "NP": CONNECTION_ZONE_SOUTH_ASIA, "PK": CONNECTION_ZONE_SOUTH_ASIA, "LK": CONNECTION_ZONE_SOUTH_ASIA, "KZ": CONNECTION_ZONE_SOUTH_ASIA, "KG": CONNECTION_ZONE_SOUTH_ASIA, "TJ": CONNECTION_ZONE_SOUTH_ASIA, "TM": CONNECTION_ZONE_SOUTH_ASIA, "UZ": CONNECTION_ZONE_SOUTH_ASIA, "AX": CONNECTION_ZONE_CENTER_EUROPE, "AL": CONNECTION_ZONE_CENTER_EUROPE, "AD": CONNECTION_ZONE_CENTER_EUROPE, "AT": CONNECTION_ZONE_CENTER_EUROPE, "BY": CONNECTION_ZONE_CENTER_EUROPE, "BE": CONNECTION_ZONE_CENTER_EUROPE, "BA": CONNECTION_ZONE_CENTER_EUROPE, "BG": CONNECTION_ZONE_CENTER_EUROPE, "HR": CONNECTION_ZONE_CENTER_EUROPE, "CV": CONNECTION_ZONE_CENTER_EUROPE, "CZ": CONNECTION_ZONE_CENTER_EUROPE, "DK": CONNECTION_ZONE_CENTER_EUROPE, "EE": CONNECTION_ZONE_CENTER_EUROPE, "FO": CONNECTION_ZONE_CENTER_EUROPE, "FI": CONNECTION_ZONE_CENTER_EUROPE, "FR": CONNECTION_ZONE_CENTER_EUROPE, "DE": CONNECTION_ZONE_CENTER_EUROPE, "GI": CONNECTION_ZONE_CENTER_EUROPE, "GR": CONNECTION_ZONE_CENTER_EUROPE, "GG": CONNECTION_ZONE_CENTER_EUROPE, "HU": CONNECTION_ZONE_CENTER_EUROPE, "IS": CONNECTION_ZONE_CENTER_EUROPE, "IE": CONNECTION_ZONE_CENTER_EUROPE, "IT": CONNECTION_ZONE_CENTER_EUROPE, "JE": CONNECTION_ZONE_CENTER_EUROPE, "XK": CONNECTION_ZONE_CENTER_EUROPE, "LV": CONNECTION_ZONE_CENTER_EUROPE, "LI": CONNECTION_ZONE_CENTER_EUROPE, "LT": CONNECTION_ZONE_CENTER_EUROPE, "LU": CONNECTION_ZONE_CENTER_EUROPE, "MT": CONNECTION_ZONE_CENTER_EUROPE, "IM": CONNECTION_ZONE_CENTER_EUROPE, "MD": CONNECTION_ZONE_CENTER_EUROPE, "MC": CONNECTION_ZONE_CENTER_EUROPE, "ME": CONNECTION_ZONE_CENTER_EUROPE, "NL": CONNECTION_ZONE_CENTER_EUROPE, "MK": CONNECTION_ZONE_CENTER_EUROPE, "NO": CONNECTION_ZONE_CENTER_EUROPE, "PL": CONNECTION_ZONE_CENTER_EUROPE, "PT": CONNECTION_ZONE_CENTER_EUROPE, "RO": CONNECTION_ZONE_CENTER_EUROPE, "RU": CONNECTION_ZONE_CENTER_EUROPE, "SM": CONNECTION_ZONE_CENTER_EUROPE, "RS": CONNECTION_ZONE_CENTER_EUROPE, "SK": CONNECTION_ZONE_CENTER_EUROPE, "SI": CONNECTION_ZONE_CENTER_EUROPE, "ES": CONNECTION_ZONE_CENTER_EUROPE, "SJ": CONNECTION_ZONE_CENTER_EUROPE, "SE": CONNECTION_ZONE_CENTER_EUROPE, "CH": CONNECTION_ZONE_CENTER_EUROPE, }
Functions ¶
func ExportComponentTreeAllDisplayNames ¶
func ExportComponentTreeAllDisplayNames(cnode *ComponentNode, displayNames []string)
func ExtractAllModifierIDFromAppSnapshot ¶
func ExtractAllModifierIDFromAppSnapshot(appSnapshots []*AppSnapshot) []int
func ExtractComponentsNameList ¶
the tree_state content field like:
{ "h": 110, "w": 64, "x": 0, "y": 11, "z": 0, "minH": 3, "minW": 2, "type": "CONTAINER_WIDGET", "error": false, "props": { "radius": "4px", "shadow": "small", "viewList": [ { "id": "b58e92d5-22c3-4ffd-a4bc-aab23675387f", "key": "View 1", "label": "View 1" } ], "currentKey": "View 1", "borderColor": "#ffffffff", "borderWidth": "0px", "currentIndex": 0, "dynamicHeight": "fixed", "backgroundColor": "#f7f7f7ff", "resizeDirection": "ALL", "$dynamicAttrPaths": [] }, "unitH": 8, "unitW": 18.109375, "showName": "container", "isDragging": false, "parentNode": "", "displayName": "container9", "panelConfig": null, "childrenNode": null, "containerType": "EDITOR_SCALE_SQUARE", "verticalResize": false }
we need extract type field which suffixed with "_WIDGET" and put them in to slice and return.
Types ¶
type Action ¶
type Action struct { ID int `gorm:"column:id;type:bigserial;primary_key"` UID uuid.UUID `gorm:"column:uid;type:uuid;not null"` TeamID int `gorm:"column:team_id;type:bigserial"` AppRefID int `gorm:"column:app_ref_id;type:bigint;not null"` Version int `gorm:"column:version;type:bigint;not null"` ResourceRefID int `gorm:"column:resource_ref_id;type:bigint;not null"` Name string `gorm:"column:name;type:varchar;size:255;not null"` Type int `gorm:"column:type;type:smallint;not null"` TriggerMode string `gorm:"column:trigger_mode;type:varchar;size:16;not null"` Transformer string `gorm:"column:transformer;type:jsonb"` Template string `gorm:"column:template;type:jsonb"` RawTemplate string `gorm:"-" sql:"-"` Config string `gorm:"column:config;type:jsonb"` CreatedAt time.Time `gorm:"column:created_at;type:timestamp;not null"` CreatedBy int `gorm:"column:created_by;type:bigint;not null"` UpdatedAt time.Time `gorm:"column:updated_at;type:timestamp;not null"` UpdatedBy int `gorm:"column:updated_by;type:bigint;not null"` }
func NewAcitonByRunActionRequest ¶
func NewAcitonByRunActionRequest(app *App, userID int, req *request.RunActionRequest) *Action
func (*Action) AppendNewVersion ¶
func (*Action) AppendRuntimeInfoForVirtualResource ¶
the action runtime does not pass the env info for virtual resource, so add them.
func (*Action) ExportConfig ¶
func (action *Action) ExportConfig() *ActionConfig
func (*Action) ExportConfigInMap ¶
func (*Action) ExportDisplayName ¶
func (*Action) ExportIcon ¶
func (*Action) ExportRawTemplateInMap ¶
func (*Action) ExportResourceID ¶
func (*Action) ExportTemplateInMap ¶
func (*Action) ExportTransformerInMap ¶
func (*Action) ExportType ¶
func (*Action) ExportTypeInString ¶
func (*Action) InitCreatedAt ¶
func (action *Action) InitCreatedAt()
func (*Action) InitForFork ¶
func (*Action) InitUpdatedAt ¶
func (action *Action) InitUpdatedAt()
func (*Action) IsLocalVirtualAction ¶
func (*Action) IsRemoteVirtualAction ¶
func (*Action) IsVirtualAction ¶
func (*Action) MergeRunActionContextToRawTemplate ¶
func (*Action) RewritePublicSettings ¶
WARRING! this is an view-level method, do not use this method to sync database changes, just for export data.
func (*Action) SetPrivate ¶
func (*Action) SetResourceIDByAiAgent ¶
func (action *Action) SetResourceIDByAiAgent(aiAgent *kozmoresourcemanagersdk.AIAgentForExport)
func (*Action) SetTutorialLink ¶
func (*Action) UpdateAcitonByUpdateActionRequest ¶
func (action *Action) UpdateAcitonByUpdateActionRequest(app *App, userID int, req *request.UpdateActionRequest)
func (*Action) UpdateAppConfig ¶
func (action *Action) UpdateAppConfig(actionConfig *ActionConfig, userID int)
func (*Action) UpdateWithRunActionRequest ¶
func (action *Action) UpdateWithRunActionRequest(req *request.RunActionRequest, userID int)
type ActionConfig ¶
type ActionConfig struct { Public bool `json:"public"` // switch for public action (which can view by anonymous user) IsVirtualResource bool `json:"isVirtualResource"` AdvancedConfig *AdvancedConfig `json:"advancedConfig"` // 2023_4_20: add advanced config for action MockConfig *MockConfig `json:"mockConfig"` TutorialLink string `json:"tutorialLink"` }
func NewActionConfig ¶
func NewActionConfig() *ActionConfig
func NewActionConfigByConfigActionRawRequest ¶
func NewActionConfigByConfigActionRawRequest(rawReq map[string]interface{}) (*ActionConfig, error)
func NewActionConfigByConfigAppRawRequest ¶
func NewActionConfigByConfigAppRawRequest(rawReq map[string]interface{}) (*ActionConfig, error)
func (*ActionConfig) ExportToJSONString ¶
func (ac *ActionConfig) ExportToJSONString() string
func (*ActionConfig) SetIsNotVirtualResource ¶
func (ac *ActionConfig) SetIsNotVirtualResource()
func (*ActionConfig) SetIsVirtualResource ¶
func (ac *ActionConfig) SetIsVirtualResource()
func (*ActionConfig) SetPrivate ¶
func (ac *ActionConfig) SetPrivate()
func (*ActionConfig) SetPublic ¶
func (ac *ActionConfig) SetPublic()
func (*ActionConfig) SetTutorialLink ¶
func (ac *ActionConfig) SetTutorialLink(link string)
type ActionFactory ¶
type ActionFactory struct {
Type int
}
func NewActionFactoryByAction ¶
func NewActionFactoryByAction(action *Action) *ActionFactory
func NewActionFactoryByResource ¶
func NewActionFactoryByResource(resource *Resource) *ActionFactory
func NewFlowActionFactoryByFlowAction ¶
func NewFlowActionFactoryByFlowAction(flowAction *FlowAction) *ActionFactory
func (*ActionFactory) Build ¶
func (f *ActionFactory) Build() (common.DataConnector, error)
type ActionForExport ¶
type ActionForExport struct { ID string `json:"actionID"` UID uuid.UUID `json:"uid"` TeamID string `json:"teamID"` App string `json:"-"` Version int `json:"-"` Resource string `json:"resourceID,omitempty"` DisplayName string `json:"displayName"` Type string `json:"actionType"` IsVirtualResource bool `json:"isVirtualResource"` Template map[string]interface{} `json:"content"` Transformer map[string]interface{} `json:"transformer"` TriggerMode string `json:"triggerMode"` Config *ActionConfig `json:"config"` CreatedAt time.Time `json:"createdAt,omitempty"` CreatedBy string `json:"createdBy,omitempty"` UpdatedAt time.Time `json:"updatedAt,omitempty"` UpdatedBy string `json:"updatedBy,omitempty"` }
func NewActionForExport ¶
func NewActionForExport(action *Action) *ActionForExport
func NewActionForExportByMap ¶
func NewActionForExportByMap(data interface{}) (*ActionForExport, error)
func (*ActionForExport) AppendVirtualResourceToTemplate ¶
func (resp *ActionForExport) AppendVirtualResourceToTemplate(value interface{})
func (*ActionForExport) ExportDisplayName ¶
func (resp *ActionForExport) ExportDisplayName() string
func (*ActionForExport) ExportForFeedback ¶
func (resp *ActionForExport) ExportForFeedback() interface{}
func (*ActionForExport) ExportResourceID ¶
func (resp *ActionForExport) ExportResourceID() string
func (*ActionForExport) ExportResourceIDInInt ¶
func (resp *ActionForExport) ExportResourceIDInInt() int
func (*ActionForExport) ExportTeamID ¶
func (resp *ActionForExport) ExportTeamID() string
type ActionSummaryForExport ¶
type ActionSummaryForExport struct { ID string `json:"actionID"` UID uuid.UUID `json:"uid"` TeamID string `json:"teamID"` Version int `json:"version"` Resource string `json:"resourceID,omitempty"` DisplayName string `json:"name"` Icon string `json:"icon"` Type string `json:"type"` IsVirtualResource bool `json:"isVirtualResource"` CreatedAt time.Time `json:"createdAt,omitempty"` CreatedBy string `json:"createdBy,omitempty"` UpdatedAt time.Time `json:"updatedAt,omitempty"` UpdatedBy string `json:"updatedBy,omitempty"` }
func ExportAllActionASActionSummary ¶
func ExportAllActionASActionSummary(actions []*Action) []*ActionSummaryForExport
func NewActionSummaryForExportByAction ¶
func NewActionSummaryForExportByAction(action *Action) *ActionSummaryForExport
type AdvancedConfig ¶
type AdvancedConfig struct { Runtime string `json:"runtime"` Pages []string `json:"pages"` DelayWhenLoaded string `json:"delayWhenLoaded"` DisplayLoadingPage bool `json:"displayLoadingPage"` IsPeriodically bool `json:"isPeriodically"` PeriodInterval string `json:"periodInterval"` Mock string `json:"mock"` }
type App ¶
type App struct { ID int `json:"id" gorm:"column:id;type:bigserial;primary_key;unique"` UID uuid.UUID `json:"uid" gorm:"column:uid;type:uuid;not null"` TeamID int `json:"teamID" gorm:"column:team_id;type:bigserial"` Name string `json:"name" gorm:"column:name;type:varchar"` ReleaseVersion int `json:"releaseVersion" gorm:"column:release_version;type:bigserial"` MainlineVersion int `json:"mainlineVersion" gorm:"column:mainline_version;type:bigserial"` Config string `json:"config" gorm:"column:config;type:jsonb"` CreatedAt time.Time `json:"createdAt" gorm:"column:created_at;type:timestamp"` CreatedBy int `json:"createdBy" gorm:"column:created_by;type:bigserial"` UpdatedAt time.Time `json:"updatedAt" gorm:"column:updated_at;type:timestamp"` UpdatedBy int `json:"updatedBy" gorm:"column:updated_by;type:bigserial"` EditedBy string `json:"editedBy" gorm:"column:edited_by;type:jsonb"` }
func NewAppForDuplicate ¶
func (*App) BumpMainlineVersion ¶
func (app *App) BumpMainlineVersion()
func (*App) BumpMainlineVersionOverReleaseVersion ¶
func (app *App) BumpMainlineVersionOverReleaseVersion()
func (*App) ExportAppName ¶
func (*App) ExportAppType ¶
func (*App) ExportConfig ¶
func (*App) ExportCreatedBy ¶
func (*App) ExportEditedBy ¶
func (app *App) ExportEditedBy() []*AppEditedBy
func (*App) ExportMainlineVersion ¶
func (*App) ExportModifiedAllUserIDs ¶
func (*App) ExportReleaseVersion ¶
func (*App) ExportTeamID ¶
func (*App) ExportUpdatedAt ¶
func (*App) ExportUpdatedBy ¶
func (*App) ImportEditedBy ¶
func (app *App) ImportEditedBy(appEditedBys []*AppEditedBy)
func (*App) InitCreatedAt ¶
func (app *App) InitCreatedAt()
func (*App) InitForFork ¶
func (*App) InitUpdatedAt ¶
func (app *App) InitUpdatedAt()
func (*App) IsPublishWithAIAgent ¶
func (*App) IsPublishedToMarketplace ¶
func (*App) PushEditedBy ¶
func (app *App) PushEditedBy(currentEditedBy *AppEditedBy)
func (*App) ReleaseMainlineVersion ¶
func (app *App) ReleaseMainlineVersion()
func (*App) RewritePublicSettings ¶
WARRING! this is an view-level method, do not use this method to sync database changes, just for export data.
func (*App) SetNotPublishedToMarketplace ¶
func (*App) SetPrivate ¶
func (*App) SetPublishedToMarketplace ¶
func (*App) SyncMainlineVersionWithTreeStateLatestVersion ¶
func (*App) UpdateAppByConfigAppRawRequest ¶
func (*App) UpdateAppConfig ¶
type AppActivity ¶
type AppActivity struct { Modifier string `json:"modifier"` ModifiedAt time.Time `json:"modifiedAt"` }
func NewAppActivity ¶
func NewAppActivity() *AppActivity
func NewAppActivityWithPayload ¶
func NewAppActivityWithPayload(userName string, updatedAt time.Time) *AppActivity
type AppConfig ¶
type AppConfig struct { Public bool `json:"public"` // switch for public app (which can view by anonymous user) WaterMark bool `json:"waterMark"` Description string `json:"description"` PublishedToMarketplace bool `json:"publishedToMarketplace"` PublishWithAIAgent bool `json:"publishWithAIAgent"` Cover string `json:"cover"` AppType int `json:"appType"` }
func NewAppConfig ¶
func NewAppConfig() *AppConfig
func NewAppConfigByDefault ¶
func NewAppConfigByDefault() *AppConfig
func (*AppConfig) DisableWaterMark ¶
func (appConfig *AppConfig) DisableWaterMark()
func (*AppConfig) EnableWaterMark ¶
func (appConfig *AppConfig) EnableWaterMark()
func (*AppConfig) ExportAppType ¶
func (*AppConfig) ExportAppTypeToString ¶
func (*AppConfig) ExportToJSONString ¶
func (*AppConfig) SetAppType ¶
func (*AppConfig) SetAppTypeByString ¶
func (*AppConfig) SetNotPublishWithAIAgent ¶
func (appConfig *AppConfig) SetNotPublishWithAIAgent()
func (*AppConfig) SetNotPublishedToMarketplace ¶
func (appConfig *AppConfig) SetNotPublishedToMarketplace()
func (*AppConfig) SetPublishWithAIAgent ¶
func (appConfig *AppConfig) SetPublishWithAIAgent()
func (*AppConfig) SetublishedToMarketplace ¶
func (appConfig *AppConfig) SetublishedToMarketplace()
func (*AppConfig) UpdateAppConfigByConfigAppRawRequest ¶
type AppConfigForExport ¶
type AppConfigForExport struct { Public bool `json:"public"` // switch for public app (which can view by anonymous user) WaterMark bool `json:"waterMark"` Description string `json:"description"` PublishedToMarketplace bool `json:"publishedToMarketplace"` PublishWithAIAgent bool `json:"publishWithAIAgent"` Cover string `json:"cover"` AppType string `json:"appType"` Components []string `json:"components"` Actions []*ActionSummaryForExport `json:"actions"` }
func NewAppConfigForExport ¶
func NewAppConfigForExport(appConfig *AppConfig, treeStates []*TreeState, actions []*Action) *AppConfigForExport
func NewAppConfigForExportWithoutComponentsAndActions ¶
func NewAppConfigForExportWithoutComponentsAndActions(appConfig *AppConfig) *AppConfigForExport
type AppEditedBy ¶
func NewAppEditedByUser ¶
func NewAppEditedByUser(user *User) *AppEditedBy
func NewAppEditedByUserID ¶
func NewAppEditedByUserID(userID int) *AppEditedBy
func (*AppEditedBy) ExportToJSONString ¶
func (a *AppEditedBy) ExportToJSONString() string
type AppForExport ¶
type AppForExport struct { ID string `json:"appId"` // generated by database primary key serial UID uuid.UUID `json:"uid"` TeamID string `json:"teamID"` Name string `json:"appName" validate:"required"` ReleaseVersion int `json:"releaseVersion"` // release version used for mark the app release version. MainlineVersion int `json:"mainlineVersion"` // mainline version keep the newest app version in database. Deployed bool `json:"deployed"` Config *AppConfigForExport `json:"config"` CreatedBy string `json:"-" ` CreatedAt time.Time `json:"-"` UpdatedBy string `json:"updatedBy"` UpdatedAt time.Time `json:"updatedAt"` AppActivity *AppActivity `json:"appActivity"` EditedBy []*UserForEditedBy `json:"editedBy"` }
func NewAppForExport ¶
func NewAppForExport(a *App, usersLT map[int]*User) *AppForExport
func NewAppForExportByMap ¶
func NewAppForExportByMap(data interface{}) (*AppForExport, error)
func (*AppForExport) CalculateIsDeployed ¶
func (appForExport *AppForExport) CalculateIsDeployed()
func (*AppForExport) ExportForFeedback ¶
func (resp *AppForExport) ExportForFeedback() interface{}
func (*AppForExport) ExportName ¶
func (resp *AppForExport) ExportName() string
type AppModifyHistory ¶
type AppModifyHistory struct { Operation int `json:"operation" gorm:"column:operation;type:smallint"` // same as websocket protol signal OperationTarget int `json:"operationTarget" gorm:"column:operation_target;type:smallint"` // same as websocket protol target OperationTargetName string `json:"operationTargetName" gorm:"column:operation_target_name;type:varchar"` // smae as app name or components display name OperationBroadcastType string `json:"operationBroadcastType" gorm:"column:operation_broadcast_type;type:varchar"` OperationBroadcastPayload interface{} `json:"operationBroadcastPayload" gorm:"column:operation_broadcast_payload;type:varchar"` OperationTargetModifiedAt time.Time `json:"operationTargetModifiedAt" gorm:"column:operation_target_modified_at;type:timestamp"` ModifiedBy int `json:"modifiedBy" gorm:"column:modified_by;type:timestamp"` ModifiedAt time.Time `json:"modifiedAt" gorm:"column:modified_at;type:timestamp"` }
func NewAppModifyHistory ¶
func NewRecoverAppSnapshotModifyHistory ¶
func NewRecoverAppSnapshotModifyHistory(modifyBy int, targetAppSnapshot *AppSnapshot) *AppModifyHistory
func NewTakeAppSnapshotModifyHistory ¶
func NewTakeAppSnapshotModifyHistory(modifyBy int) *AppModifyHistory
func (*AppModifyHistory) ExportModifiedBy ¶
func (appModifyHistory *AppModifyHistory) ExportModifiedBy() int
func (*AppModifyHistory) ExportToJSONString ¶
func (a *AppModifyHistory) ExportToJSONString() string
func (*AppModifyHistory) InitModifiedAt ¶
func (appModifyHistory *AppModifyHistory) InitModifiedAt()
type AppModifyHistoryForExport ¶
type AppModifyHistoryForExport struct { Operation int `json:"operation" gorm:"column:operation;type:smallint"` // same as websocket protol signal OperationTarget int `json:"operationTarget" gorm:"column:operation_target;type:smallint"` // same as websocket protol target OperationTargetName string `json:"operationTargetName" gorm:"column:operation_target_name;type:varchar"` // smae as app name or components display name OperationBroadcastType string `json:"operationBroadcastType" gorm:"column:operation_broadcast_type;type:varchar"` OperationBroadcastPayload interface{} `json:"operationBroadcastPayload" gorm:"column:operation_broadcast_payload;type:varchar"` OperationTargetModifiedAt time.Time `json:"operationTargetModifiedAt" gorm:"column:operation_target_modified_at;type:timestamp"` ModifiedBy *UserForModifiedBy `json:"modifiedBy" gorm:"column:modified_by;type:timestamp"` ModifiedAt time.Time `json:"modifiedAt" gorm:"column:modified_at;type:timestamp"` }
func NewAppModifyHistoryForExport ¶
func NewAppModifyHistoryForExport(appModifyHistory *AppModifyHistory, usersLT map[int]*User) *AppModifyHistoryForExport
type AppSnapshot ¶
type AppSnapshot struct { ID int `json:"id" gorm:"column:id;type:bigserial;primary_key;unique"` UID uuid.UUID `json:"uid" gorm:"column:uid;type:uuid;not null"` TeamID int `json:"teamID" gorm:"column:team_id;type:bigserial"` AppRefID int `json:"appID" gorm:"column:app_ref_id;type:bigserial"` TargetVersion int `json:"targetVersion" gorm:"column:target_version;type:bigserial"` TriggerMode int `json:"snapshotTriggerMode" gorm:"column:trigger_mode;type:smallint"` ModifyHistory string `json:"modifyHistory" gorm:"column:modify_history;type:jsonb"` CreatedAt time.Time `json:"createdAt" gorm:"column:created_at;type:timestamp"` }
func NewAppSnapshot ¶
func NewAppSnapshot(teamID int, appID int, targetVersion int, triggerMode int) *AppSnapshot
func (*AppSnapshot) DoesActiveSnapshotNeedArchive ¶
func (appSnapshot *AppSnapshot) DoesActiveSnapshotNeedArchive() bool
func (*AppSnapshot) ExportCreatedAt ¶
func (appSnapshot *AppSnapshot) ExportCreatedAt() time.Time
func (*AppSnapshot) ExportModifyHistory ¶
func (appSnapshot *AppSnapshot) ExportModifyHistory() []*AppModifyHistory
func (*AppSnapshot) ExportTargetVersion ¶
func (appSnapshot *AppSnapshot) ExportTargetVersion() int
func (*AppSnapshot) ImportModifyHistory ¶
func (appSnapshot *AppSnapshot) ImportModifyHistory(appModifyHistorys []*AppModifyHistory)
func (*AppSnapshot) InitCreatedAt ¶
func (appSnapshot *AppSnapshot) InitCreatedAt()
func (*AppSnapshot) InitModifyHistory ¶
func (appSnapshot *AppSnapshot) InitModifyHistory()
func (*AppSnapshot) InitUID ¶
func (appSnapshot *AppSnapshot) InitUID()
func (*AppSnapshot) PushModifyHistory ¶
func (appSnapshot *AppSnapshot) PushModifyHistory(currentAppModifyHistory *AppModifyHistory)
func (*AppSnapshot) SetTargetVersion ¶
func (appSnapshot *AppSnapshot) SetTargetVersion(targetVersion int)
func (*AppSnapshot) SetTriggerMode ¶
func (appSnapshot *AppSnapshot) SetTriggerMode(triggerMode int)
func (*AppSnapshot) SetTriggerModeAuto ¶
func (appSnapshot *AppSnapshot) SetTriggerModeAuto()
func (*AppSnapshot) SetTriggerModeManual ¶
func (appSnapshot *AppSnapshot) SetTriggerModeManual()
type AppSnapshotForExport ¶
type AppSnapshotForExport struct { ID string `json:"snapshotID"` TeamID string `json:"teamID"` AppRefID string `json:"appID"` TargetVersion int `json:"targetVersion"` TriggerMode int `json:"snapshotTriggerMode"` ModifyHistory []*AppModifyHistoryForExport `json:"modifyHistory"` CreatedAt time.Time `json:"createdAt"` }
func NewAppSnapshotForExport ¶
func NewAppSnapshotForExport(appSnapshot *AppSnapshot, usersLT map[int]*User) *AppSnapshotForExport
type ComponentNode ¶
type ComponentNode struct { Version float64 `json:"version"` // default is 0 DisplayName string `json:"displayName"` ParentNode string `json:"parentNode"` ShowName string `json:"showName"` ChildrenNode []*ComponentNode `json:"childrenNode"` Type string `json:"type"` ContainerType string `json:"containerType"` H float64 `json:"h"` W float64 `json:"w"` MinH float64 `json:"minH"` MinW float64 `json:"minW"` X float64 `json:"x"` Y float64 `json:"y"` Z float64 `json:"z"` Props map[string]interface{} `json:"props"` }
func BuildComponentTree ¶
func BuildComponentTree(treeState *TreeState, treeStateMap map[int]*TreeState, parentComponentNode *ComponentNode, dagNodeMarkTable map[int]bool) (*ComponentNode, error)
func ConstructComponentNodeByMap ¶
func ConstructComponentNodeByMap(data interface{}) *ComponentNode
func NewComponentNode ¶
func NewComponentNode() *ComponentNode
func NewComponentNodeFromJSON ¶
func NewComponentNodeFromJSON(cnodebyte []byte) (*ComponentNode, error)
func (*ComponentNode) AppendChildrenNode ¶
func (cnode *ComponentNode) AppendChildrenNode(node *ComponentNode)
func (*ComponentNode) Serialization ¶
func (cnode *ComponentNode) Serialization() ([]byte, error)
func (*ComponentNode) SerializationForDatabase ¶
func (cnode *ComponentNode) SerializationForDatabase() (string, error)
func (*ComponentNode) UpdateParentNode ¶
func (cnode *ComponentNode) UpdateParentNode(parentComponentNode *ComponentNode)
type ComponentStateForUpdate ¶
type ComponentStateForUpdate struct { Before interface{} `json:"before"` After interface{} `json:"after"` }
func ConstructComponentStateForUpdateByPayload ¶
func ConstructComponentStateForUpdateByPayload(data interface{}) (*ComponentStateForUpdate, error)
type DisplayNameState ¶
type DisplayNameState []string
func ResolveDisplayNameStateByPayload ¶
func ResolveDisplayNameStateByPayload(data interface{}) (DisplayNameState, error)
type DisplayNameStateForUpdate ¶
func ConstructDisplayNameStateForUpdateByPayload ¶
func ConstructDisplayNameStateForUpdateByPayload(data interface{}) (*DisplayNameStateForUpdate, error)
type FlowAction ¶
type FlowAction struct { ID int `gorm:"column:id;type:bigserial;primary_key"` UID uuid.UUID `gorm:"column:uid;type:uuid;not null"` TeamID int `gorm:"column:team_id;type:bigserial"` WorkflowID int `gorm:"column:workflow_id;type:bigint;not null"` Version int `gorm:"column:version;type:bigint;not null"` ResourceID int `gorm:"column:resource_id;type:bigint;not null"` Name string `gorm:"column:name;type:varchar;size:255;not null"` Type int `gorm:"column:type;type:smallint;not null"` TriggerMode string `gorm:"column:trigger_mode;type:varchar;size:16;not null"` Transformer string `gorm:"column:transformer;type:jsonb"` Template string `gorm:"column:template;type:jsonb"` RawTemplate string `gorm:"-" sql:"-"` Context map[string]interface{} `gorm:"-" sql:"-"` Config string `gorm:"column:config;type:jsonb"` CreatedAt time.Time `gorm:"column:created_at;type:timestamp;not null"` CreatedBy int `gorm:"column:created_by;type:bigint;not null"` UpdatedAt time.Time `gorm:"column:updated_at;type:timestamp;not null"` UpdatedBy int `gorm:"column:updated_by;type:bigint;not null"` }
func NewFlowAcitonByCreateFlowActionRequest ¶
func NewFlowAcitonByCreateFlowActionRequest(teamID int, workflowID int, userID int, req *request.CreateFlowActionRequest) (*FlowAction, error)
func NewFlowAcitonByRunFlowActionRequest ¶
func NewFlowAcitonByRunFlowActionRequest(teamID int, workflowID int, userID int, req *request.RunFlowActionRequest) *FlowAction
func NewFlowAcitonByUpdateFlowActionRequest ¶
func NewFlowAcitonByUpdateFlowActionRequest(teamID int, workflowID int, userID int, req *request.UpdateFlowActionRequest) (*FlowAction, error)
func NewFlowAction ¶
func NewFlowAction() *FlowAction
func (*FlowAction) AppendNewVersion ¶
func (action *FlowAction) AppendNewVersion(newVersion int)
func (*FlowAction) AppendRuntimeInfoForVirtualResource ¶
func (action *FlowAction) AppendRuntimeInfoForVirtualResource(authorization string, teamID int)
the action runtime does not pass the env info for virtual resource, so add them.
func (*FlowAction) CleanID ¶
func (action *FlowAction) CleanID()
func (*FlowAction) ExportConfig ¶
func (action *FlowAction) ExportConfig() *FlowActionConfig
func (*FlowAction) ExportConfigInMap ¶
func (action *FlowAction) ExportConfigInMap() map[string]interface{}
func (*FlowAction) ExportDisplayName ¶
func (action *FlowAction) ExportDisplayName() string
func (*FlowAction) ExportID ¶
func (action *FlowAction) ExportID() int
func (*FlowAction) ExportIcon ¶
func (action *FlowAction) ExportIcon() string
func (*FlowAction) ExportRawTemplateInMap ¶
func (action *FlowAction) ExportRawTemplateInMap() map[string]interface{}
func (*FlowAction) ExportResourceID ¶
func (action *FlowAction) ExportResourceID() int
func (*FlowAction) ExportTemplateInMap ¶
func (action *FlowAction) ExportTemplateInMap() map[string]interface{}
func (*FlowAction) ExportTransformerInMap ¶
func (action *FlowAction) ExportTransformerInMap() map[string]interface{}
func (*FlowAction) ExportType ¶
func (action *FlowAction) ExportType() int
func (*FlowAction) ExportTypeInString ¶
func (action *FlowAction) ExportTypeInString() string
func (*FlowAction) InitCreatedAt ¶
func (action *FlowAction) InitCreatedAt()
func (*FlowAction) InitForFork ¶
func (action *FlowAction) InitForFork(teamID int, workflowID int, version int, userID int)
func (*FlowAction) InitUID ¶
func (action *FlowAction) InitUID()
func (*FlowAction) InitUpdatedAt ¶
func (action *FlowAction) InitUpdatedAt()
func (*FlowAction) IsLocalVirtualFlowAction ¶
func (action *FlowAction) IsLocalVirtualFlowAction() bool
func (*FlowAction) IsRemoteVirtualFlowAction ¶
func (action *FlowAction) IsRemoteVirtualFlowAction() bool
func (*FlowAction) IsVirtualFlowAction ¶
func (action *FlowAction) IsVirtualFlowAction() bool
func (*FlowAction) MergeRunFlowActionContextToRawTemplate ¶
func (action *FlowAction) MergeRunFlowActionContextToRawTemplate(context map[string]interface{})
func (*FlowAction) SetContextByMap ¶
func (action *FlowAction) SetContextByMap(context map[string]interface{})
func (*FlowAction) SetResourceIDByAiAgent ¶
func (action *FlowAction) SetResourceIDByAiAgent(aiAgent *kozmoresourcemanagersdk.AIAgentForExport)
func (*FlowAction) SetTemplate ¶
func (action *FlowAction) SetTemplate(tempalte interface{})
func (*FlowAction) UpdateAppConfig ¶
func (action *FlowAction) UpdateAppConfig(actionConfig *FlowActionConfig, userID int)
func (*FlowAction) UpdateFlowAcitonByUpdateFlowActionRequest ¶
func (action *FlowAction) UpdateFlowAcitonByUpdateFlowActionRequest(teamID int, workflowID int, userID int, req *request.UpdateFlowActionRequest)
func (*FlowAction) UpdateWithRunFlowActionRequest ¶
func (action *FlowAction) UpdateWithRunFlowActionRequest(req *request.RunFlowActionRequest, userID int)
type FlowActionConfig ¶
type FlowActionConfig struct { IsVirtualResource bool `json:"isVirtualResource"` FlowAdvancedConfig *FlowAdvancedConfig `json:"advancedConfig"` // 2023_4_20: add advanced config for action FlowMockConfig *FlowMockConfig `json:"mockConfig"` }
func NewFlowActionConfig ¶
func NewFlowActionConfig() *FlowActionConfig
func (*FlowActionConfig) ExportToJSONString ¶
func (ac *FlowActionConfig) ExportToJSONString() string
func (*FlowActionConfig) SetIsNotVirtualResource ¶
func (ac *FlowActionConfig) SetIsNotVirtualResource()
func (*FlowActionConfig) SetIsVirtualResource ¶
func (ac *FlowActionConfig) SetIsVirtualResource()
type FlowAdvancedConfig ¶
type FlowAdvancedConfig struct { Runtime string `json:"runtime"` Pages []string `json:"pages"` DelayWhenLoaded string `json:"delayWhenLoaded"` DisplayLoadingPage bool `json:"displayLoadingPage"` IsPeriodically bool `json:"isPeriodically"` PeriodInterval string `json:"periodInterval"` Mock string `json:"mock"` }
type FlowMockConfig ¶
type FullAppForExport ¶
type FullAppForExport struct { AppInfo *AppForExport `json:"appInfo"` Actions []*ActionForExport `json:"actions"` Components *ComponentNode `json:"components"` DependenciesState map[string][]string `json:"dependenciesState"` DragShadowState map[string]interface{} `json:"dragShadowState"` DottedLineSquareState map[string]interface{} `json:"dottedLineSquareState"` DisplayNameState []string `json:"displayNameState"` }
func NewFullAppForExport ¶
func NewFullAppForExport(appInfo *AppForExport, actions []*ActionForExport, components *ComponentNode, dependenciesState map[string][]string, dragShadowState map[string]interface{}, dottedLineSquareState map[string]interface{}, displayNameState []string) *FullAppForExport
func (*FullAppForExport) ExportAppName ¶
func (resp *FullAppForExport) ExportAppName() string
func (*FullAppForExport) ExportForFeedback ¶
func (resp *FullAppForExport) ExportForFeedback() interface{}
type GoogleSheetsOAuth2Claims ¶
type GoogleSheetsOAuth2Claims struct { Team int `json:"team"` User int `json:"user"` Resource int `json:"resource"` Access int `json:"access"` URL string `json:"url"` jwt.RegisteredClaims }
func NewGoogleSheetsOAuth2Claims ¶
func NewGoogleSheetsOAuth2Claims() *GoogleSheetsOAuth2Claims
func (*GoogleSheetsOAuth2Claims) ExtractGoogleSheetsOAuth2TokenInfo ¶
func (i *GoogleSheetsOAuth2Claims) ExtractGoogleSheetsOAuth2TokenInfo(accessToken string) (teamID, userID, resourceID int, url string, err error)
func (*GoogleSheetsOAuth2Claims) ValidateAccessToken ¶
func (i *GoogleSheetsOAuth2Claims) ValidateAccessToken(accessToken string) (int, error)
type KVState ¶
type KVState struct { ID int `json:"id" gorm:"column:id;type:bigserial"` UID uuid.UUID `json:"uid" gorm:"column:uid;type:uuid;not null"` TeamID int `json:"teamID" gorm:"column:team_id;type:bigserial"` StateType int `json:"state_type" gorm:"column:state_type;type:bigint"` AppRefID int `json:"app_ref_id" gorm:"column:app_ref_id;type:bigint"` Version int `json:"version" gorm:"column:version;type:bigint"` Key string `json:"key" gorm:"column:key;type:text"` Value string `json:"value" gorm:"column:value;type:jsonb"` CreatedAt time.Time `json:"created_at" gorm:"column:created_at;type:timestamp"` CreatedBy int `json:"created_by" gorm:"column:created_by;type:bigint"` UpdatedAt time.Time `json:"updated_at" gorm:"column:updated_at;type:timestamp"` UpdatedBy int `json:"updated_by" gorm:"column:updated_by;type:bigint"` }
func NewKVStateByApp ¶
func (*KVState) AppendNewVersion ¶
func (*KVState) ExportVersion ¶
func (*KVState) InitCreatedAt ¶
func (kvState *KVState) InitCreatedAt()
func (*KVState) InitForFork ¶
func (*KVState) InitUpdatedAt ¶
func (kvState *KVState) InitUpdatedAt()
func (*KVState) UpdateByNewKVState ¶
type MockConfig ¶
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 RawUser ¶
type RawUser struct { ID string `json:"id" gorm:"column:id;type:bigserial;primary_key;index:users_ukey"` UID uuid.UUID `json:"uid" gorm:"column:uid;type:uuid;not null;index:users_ukey"` Nickname string `json:"nickname" gorm:"column:nickname;type:varchar;size:15"` PasswordDigest string `json:"passworddigest" gorm:"column:password_digest;type:varchar;size:60;not null"` Email string `json:"email" gorm:"column:email;type:varchar;size:255;not null"` Avatar string `json:"avatar" gorm:"column:avatar;type:varchar;size:255;not null"` SSOConfig string `json:"SSOConfig" gorm:"column:sso_config;type:jsonb"` // for single sign-on data Customization string `json:"customization" gorm:"column:customization;type:jsonb"` // for user itself customization config, including: Language, IsSubscribed CreatedAt time.Time `gorm:"column:created_at;type:timestamp"` UpdatedAt time.Time `gorm:"column:updated_at;type:timestamp"` }
type Resource ¶
type Resource struct { ID int `gorm:"column:id;type:bigserial;primary_key"` UID uuid.UUID `gorm:"column:uid;type:uuid;not null"` TeamID int `gorm:"column:team_id;type:bigserial"` Name string `gorm:"column:name;type:varchar;size:200;not null"` Type int `gorm:"column:type;type:smallint;not null"` Options string `gorm:"column:options;type:jsonb"` CreatedAt time.Time `gorm:"column:created_at;type:timestamp;not null"` CreatedBy int `gorm:"column:created_by;type:bigint;not null"` UpdatedAt time.Time `gorm:"column:updated_at;type:timestamp;not null"` UpdatedBy int `gorm:"column:updated_by;type:bigint;not null"` }
func NewResource ¶
func NewResource() *Resource
func NewResourceByCreateResourceRequest ¶
func NewResourceByCreateResourceRequest(teamID int, userID int, req *request.CreateResourceRequest) *Resource
func NewResourceByTestResourceConnectionRequest ¶
func NewResourceByTestResourceConnectionRequest(teamID int, userID int, req *request.TestResourceConnectionRequest) *Resource
func (*Resource) CanCreateOAuthToken ¶
func (*Resource) ExportOptionsInMap ¶
func (*Resource) ExportType ¶
func (*Resource) ExportTypeInString ¶
func (*Resource) ExportUpdatedAt ¶
func (*Resource) InitCreatedAt ¶
func (resource *Resource) InitCreatedAt()
func (*Resource) InitUpdatedAt ¶
func (resource *Resource) InitUpdatedAt()
func (*Resource) UpdateByUpdateResourceRequest ¶
func (resource *Resource) UpdateByUpdateResourceRequest(userID int, req *request.UpdateResourceRequest)
func (*Resource) UpdateGoogleSheetOAuth2Options ¶
func (resource *Resource) UpdateGoogleSheetOAuth2Options(userID int, options *ResourceOptionGoogleSheets)
type ResourceForExport ¶
type ResourceForExport struct { ID string `json:"resourceID"` UID uuid.UUID `json:"uid"` TeamID string `json:"teamID"` Name string `json:"resourceName" validate:"required"` Type string `json:"resourceType" validate:"required"` Options map[string]interface{} `json:"content" validate:"required"` CreatedAt time.Time `json:"createdAt,omitempty"` CreatedBy string `json:"createdBy,omitempty"` UpdatedAt time.Time `json:"updatedAt,omitempty"` UpdatedBy string `json:"updatedBy,omitempty"` }
func BatchNewResourceForExport ¶
func BatchNewResourceForExport(r []*Resource) []*ResourceForExport
func NewResourceForExport ¶
func NewResourceForExport(r *Resource) *ResourceForExport
func NewResourceForExportByMap ¶
func NewResourceForExportByMap(data interface{}) (*ResourceForExport, error)
func (*ResourceForExport) ExportForFeedback ¶
func (resp *ResourceForExport) ExportForFeedback() interface{}
func (*ResourceForExport) ExportName ¶
func (resp *ResourceForExport) ExportName() string
func (*ResourceForExport) ExportOptionsInString ¶
func (resp *ResourceForExport) ExportOptionsInString() string
type ResourceOptionGoogleSheets ¶
type ResourceOptionGoogleSheets struct { Authentication string `json:"authentication"` Options *GoogleSheetsOAuth2Options `json:"opts"` }
func NewResourceOptionGoogleSheetsByResource ¶
func NewResourceOptionGoogleSheetsByResource(resource *Resource) (*ResourceOptionGoogleSheets, error)
func (*ResourceOptionGoogleSheets) ExportInString ¶
func (i *ResourceOptionGoogleSheets) ExportInString() string
func (*ResourceOptionGoogleSheets) ExportRefreshToken ¶
func (i *ResourceOptionGoogleSheets) ExportRefreshToken() string
func (*ResourceOptionGoogleSheets) IsAvaliableAuthenticationMethod ¶
func (i *ResourceOptionGoogleSheets) IsAvaliableAuthenticationMethod() bool
func (*ResourceOptionGoogleSheets) SetAccessToken ¶
func (i *ResourceOptionGoogleSheets) SetAccessToken(accessToken string)
func (*ResourceOptionGoogleSheets) UpdateByExchangeTokenResponse ¶
func (i *ResourceOptionGoogleSheets) UpdateByExchangeTokenResponse(repo *oauthgoogle.ExchangeTokenResponse)
type SetState ¶
type SetState struct { ID int `json:"id" gorm:"column:id;type:bigserial"` UID uuid.UUID `json:"uid" gorm:"column:uid;type:uuid;not null"` TeamID int `json:"teamID" gorm:"column:team_id;type:bigserial"` StateType int `json:"state_type" gorm:"column:state_type;type:bigint"` AppRefID int `json:"app_ref_id" gorm:"column:app_ref_id;type:bigint"` Version int `json:"version" gorm:"column:version;type:bigint"` Value string `json:"value" gorm:"column:value;type:text"` CreatedAt time.Time `json:"created_at" gorm:"column:created_at;type:timestamp"` CreatedBy int `json:"created_by" gorm:"column:created_by;type:bigint"` UpdatedAt time.Time `json:"updated_at" gorm:"column:updated_at;type:timestamp"` UpdatedBy int `json:"updated_by" gorm:"column:updated_by;type:bigint"` }
func NewSetStateByApp ¶
func (*SetState) AppendNewVersion ¶
func (*SetState) ExportValue ¶
func (*SetState) ExportVersion ¶
func (*SetState) InitCreatedAt ¶
func (setState *SetState) InitCreatedAt()
func (*SetState) InitForFork ¶
func (*SetState) InitUpdatedAt ¶
func (setState *SetState) InitUpdatedAt()
func (*SetState) UpdateByNewSetState ¶
type Team ¶
type Team struct { ID int `json:"id"` UID uuid.UUID `json:"uid"` Name string `json:"name"` Identifier string `json:"identifier"` Icon string `json:"icon"` Permission string `json:"permission"` // for team permission config CreatedAt time.Time `` UpdatedAt time.Time `` }
func (*Team) ExportIDInString ¶
func (*Team) ExportUIDInString ¶
type TreeState ¶
type TreeState struct { ID int `json:"id" gorm:"column:id;type:bigserial"` UID uuid.UUID `json:"uid" gorm:"column:uid;type:uuid;not null"` TeamID int `json:"teamID" gorm:"column:team_id;type:bigserial"` StateType int `json:"state_type" gorm:"column:state_type;type:bigint"` ParentNode string `json:"parentNode" sql:"-" gorm:"-"` ParentNodeRefID int `json:"parent_node_ref_id" gorm:"column:parent_node_ref_id;type:bigint"` ChildrenNodeRefIDs string `json:"children_node_ref_ids" gorm:"column:children_node_ref_ids;type:jsonb"` AppRefID int `json:"app_ref_id" gorm:"column:app_ref_id;type:bigint"` Version int `json:"version" gorm:"column:version;type:bigint"` Name string `json:"name" gorm:"column:name;type:text"` Content string `json:"content" gorm:"column:content;type:jsonb"` CreatedAt time.Time `json:"created_at" gorm:"column:created_at;type:timestamp"` CreatedBy int `json:"created_by" gorm:"column:created_by;type:bigint"` UpdatedAt time.Time `json:"updated_at" gorm:"column:updated_at;type:timestamp"` UpdatedBy int `json:"updated_by" gorm:"column:updated_by;type:bigint"` }
func NewTreeState ¶
func NewTreeState() *TreeState
func NewTreeStateByApp ¶
func NewTreeStateByAppAndComponentState ¶
func NewTreeStateByAppAndComponentState(app *App, stateType int, componentNode *ComponentNode) (*TreeState, error)
func NewTreeStateByDeleteComponentsWebsocketMessage ¶
func NewTreeStateByDeleteComponentsWebsocketMessage(app *App, stateType int, data interface{}) (*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" <- data ], "teamID": "ILAfx4p1C7bN", "uid": "ILAfx4p1C7bN" }
func NewTreeStateByMoveStateWebsocketMessage ¶
func NewTreeStateByMoveStateWebsocketMessage(app *App, stateType int, data interface{}) (*TreeState, error)
data sample:
{ "signal": 6, "target": 1, "option": 1, "broadcast": { "type": "components/updateComponentContainerReducer", "payload": { "oldParentNodeDisplayName": "bodySection1-bodySectionContainer1", "newParentNodeDisplayName": "canvas1", "updateSlices": [ { "displayName": "text1", "x": 8, "y": 4, "w": 20, "h": 5 } ] } }, "payload": [ { "displayName": "text1", "parentNode": "canvas1", "childrenNode": null } ], "teamID": "ILAfx4p1C7dL", "uid": "ILAfx4p1C7dL" }
func NewTreeStateByWebsocketMessage ¶
data sample: ------------------------
| { | "signal": 5, | "target": 1, | "option": 0, | "broadcast": null, | "payload": [ | { ↓ "before": { <- data "displayName": "input1" }, ↓ "after": { <- data "w": 6, "h": 5, "minW": 1, "minH": 3, "x": 19, "y": 22, "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 (*TreeState) AppendChildrenNodeRefIDs ¶
func (*TreeState) AppendNewVersion ¶
func (*TreeState) ExportChildrenNodeRefIDs ¶
func (*TreeState) ExportContentAsComponentState ¶
func (treeState *TreeState) ExportContentAsComponentState() (*ComponentNode, error)
func (*TreeState) ExportName ¶
func (*TreeState) ExportStateType ¶
func (*TreeState) InitCreatedAt ¶
func (treeState *TreeState) InitCreatedAt()
func (*TreeState) InitForFork ¶
func (*TreeState) InitUpdatedAt ¶
func (treeState *TreeState) InitUpdatedAt()
func (*TreeState) RemapChildrenNodeRefIDs ¶
func (*TreeState) RemoveChildrenNodeRefIDs ¶
func (*TreeState) ResetChildrenNodeRefIDsByMap ¶
reset children ids by idmap[oldID]newID
func (*TreeState) ResetParentNodeRefIDByMap ¶
reset parent id by idmap[oldID]newID
func (*TreeState) SetParentNodeRefID ¶
func (*TreeState) UpdateByNewTreeState ¶
func (*TreeState) UpdateNameAndContent ¶
type User ¶
type User struct { ID int `json:"id" gorm:"column:id;type:bigserial;primary_key;index:users_ukey"` UID uuid.UUID `json:"uid" gorm:"column:uid;type:uuid;not null;index:users_ukey"` Nickname string `json:"nickname" gorm:"column:nickname;type:varchar;size:15"` PasswordDigest string `json:"passworddigest" gorm:"column:password_digest;type:varchar;size:60;not null"` Email string `json:"email" gorm:"column:email;type:varchar;size:255;not null"` Avatar string `json:"avatar" gorm:"column:avatar;type:varchar;size:255;not null"` SSOConfig string `json:"SSOConfig" gorm:"column:sso_config;type:jsonb"` // for single sign-on data Customization string `json:"customization" gorm:"column:customization;type:jsonb"` // for user itself customization config, including: Language, IsSubscribed CreatedAt time.Time `gorm:"column:created_at;type:timestamp"` UpdatedAt time.Time `gorm:"column:updated_at;type:timestamp"` }
func NewInvaliedUser ¶
func NewInvaliedUser() *User
func (*User) ExportIDToString ¶
type UserForEditedBy ¶
type UserForEditedBy struct { ID string `json:"userID"` Nickname string `json:"nickname"` Email string `json:"email"` Avatar string `json:"avatar"` EditedAt time.Time `json:"editedAt"` }
func NewUserForEditedBy ¶
func NewUserForEditedBy(user *User, editedAt time.Time) *UserForEditedBy
type UserForModifiedBy ¶
type UserForModifiedBy struct { ID string `json:"userID"` Nickname string `json:"nickname"` Email string `json:"email"` Avatar string `json:"avatar"` }
func NewUserForModifiedBy ¶
func NewUserForModifiedBy(user *User) *UserForModifiedBy
type WebsocketConnectionInfo ¶
type WebsocketConnectionInfo struct { Config *config.Config DefaultConnectionAddress string SouthAsiaConnectionAddress string EastAsiaConnectionAddress string CenterEuropeConnectionAddress string }
func NewWebsocketConnectionInfo ¶
func NewWebsocketConnectionInfo(conf *config.Config) *WebsocketConnectionInfo
func (*WebsocketConnectionInfo) GetAppRoomBinaryConnectionAddress ¶
func (i *WebsocketConnectionInfo) GetAppRoomBinaryConnectionAddress(teamID int, roomID int, zone string) string
func (*WebsocketConnectionInfo) GetAppRoomConnectionAddress ¶
func (i *WebsocketConnectionInfo) GetAppRoomConnectionAddress(teamID int, roomID int, zone string) string
func (*WebsocketConnectionInfo) GetConnectionAddressByCountryCode ¶
func (i *WebsocketConnectionInfo) GetConnectionAddressByCountryCode(countryCode string) string
func (*WebsocketConnectionInfo) GetDashboardConnectionAddress ¶
func (i *WebsocketConnectionInfo) GetDashboardConnectionAddress(teamID int, zone string) string
Source Files ¶
- action.go
- action_config.go
- action_factory.go
- action_for_export.go
- action_mock.go
- action_summary_for_export.go
- app.go
- app_config.go
- app_config_for_export.go
- app_edited_by.go
- app_for_export.go
- app_modify_history.go
- app_modify_history_for_export.go
- app_snapshot.go
- app_snapshot_for_export.go
- component_state.go
- display_name_state.go
- flow_action.go
- flow_action_config.go
- flow_action_mock.go
- full_app_for_export.go
- google_sheets_oauth2_claims.go
- kv_state.go
- resource.go
- resource_for_export.go
- resource_option_google_sheets.go
- set_state.go
- state.go
- storage_pagination.go
- team.go
- tree_state.go
- user.go
- websocket_connection_info.go