Documentation
¶
Index ¶
- type Action
- type AppActivity
- type AppDto
- type AppService
- type AppServiceImpl
- func (impl *AppServiceImpl) CreateApp(app AppDto) (AppDto, error)
- func (impl *AppServiceImpl) DeleteApp(appID int) error
- func (impl *AppServiceImpl) DuplicateApp(appID, userID int, name string) (AppDto, error)
- func (impl *AppServiceImpl) FetchAppByID(appID int) (AppDto, error)
- func (impl *AppServiceImpl) GetAllApps() ([]AppDto, error)
- func (impl *AppServiceImpl) GetMegaData(appID, version int) (Editor, error)
- func (impl *AppServiceImpl) ReleaseApp(appID int) (int, error)
- func (impl *AppServiceImpl) UpdateApp(app AppDto) (AppDto, error)
- func (impl *AppServiceImpl) UpdateAppModifyTime(app *AppDto) error
- type ComponentNode
- type Editor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct {
ID int `json:"actionId"`
App int `json:"-"`
Version int `json:"-"`
Resource int `json:"resourceId,omitempty"`
DisplayName string `json:"displayName"`
Type string `json:"actionType"`
Template map[string]interface{} `json:"content"`
Transformer map[string]interface{} `json:"transformer"`
TriggerMode string `json:"triggerMode"`
CreatedAt time.Time `json:"createdAt,omitempty"`
CreatedBy int `json:"createdBy,omitempty"`
UpdatedAt time.Time `json:"updatedAt,omitempty"`
UpdatedBy int `json:"updatedBy,omitempty"`
}
type AppActivity ¶
type AppDto ¶
type AppDto struct {
ID int `json:"appId"` // generated by database primary key serial
Name string `json:"appName" validate:"required"`
ReleaseVersion int `json:"release_version"` // release version used for mark the app release version.
MainlineVersion int `json:"mainline_version"` // mainline version keep the newest app version in database.
CreatedBy int `json:"-" `
CreatedAt time.Time `json:"-"`
UpdatedBy int `json:"updatedBy"`
UpdatedAt time.Time `json:"updatedAt"`
AppActivity AppActivity `json:"appActivity"`
}
func (*AppDto) ConstructByMap ¶
func (appd *AppDto) ConstructByMap(data interface{})
func (*AppDto) ConstructWithID ¶
func (*AppDto) ConstructWithUpdateBy ¶
type AppService ¶
type AppService interface {
CreateApp(app AppDto) (AppDto, error)
UpdateApp(app AppDto) (AppDto, error)
FetchAppByID(appID int) (AppDto, error)
DeleteApp(appID int) error
GetAllApps() ([]AppDto, error)
DuplicateApp(appID, userID int, name string) (AppDto, error)
ReleaseApp(appID int) (int, error)
GetMegaData(appID, version int) (Editor, error)
}
type AppServiceImpl ¶
type AppServiceImpl struct {
// contains filtered or unexported fields
}
func NewAppServiceImpl ¶
func NewAppServiceImpl(logger *zap.SugaredLogger, appRepository repository.AppRepository, userRepository repository.UserRepository, kvstateRepository repository.KVStateRepository, treestateRepository repository.TreeStateRepository, setstateRepository repository.SetStateRepository, actionRepository repository.ActionRepository) *AppServiceImpl
func (*AppServiceImpl) CreateApp ¶
func (impl *AppServiceImpl) CreateApp(app AppDto) (AppDto, error)
func (*AppServiceImpl) DeleteApp ¶
func (impl *AppServiceImpl) DeleteApp(appID int) error
func (*AppServiceImpl) DuplicateApp ¶
func (impl *AppServiceImpl) DuplicateApp(appID, userID int, name string) (AppDto, error)
func (*AppServiceImpl) FetchAppByID ¶
func (impl *AppServiceImpl) FetchAppByID(appID int) (AppDto, error)
func (*AppServiceImpl) GetAllApps ¶
func (impl *AppServiceImpl) GetAllApps() ([]AppDto, error)
func (*AppServiceImpl) GetMegaData ¶
func (impl *AppServiceImpl) GetMegaData(appID, version int) (Editor, error)
func (*AppServiceImpl) ReleaseApp ¶
func (impl *AppServiceImpl) ReleaseApp(appID int) (int, error)
func (*AppServiceImpl) UpdateApp ¶
func (impl *AppServiceImpl) UpdateApp(app AppDto) (AppDto, error)
func (*AppServiceImpl) UpdateAppModifyTime ¶
func (impl *AppServiceImpl) UpdateAppModifyTime(app *AppDto) error
call this method when action (over HTTP) and state (over websocket) changed
type ComponentNode ¶
type ComponentNode struct {
DisplayName string `json:"displayName"`
ParentNode string `json:"parentNode"`
ShowName string `json:"showName"`
Cerror bool `json:"error"`
IsDragging bool `json:"isDragging"`
IsResizing bool `json:"isResizing"`
ChildrenNode []*ComponentNode `json:"childrenNode"`
Ctype string `json:"type"`
ContainerType string `json:"containerType"`
VerticalResize bool `json:"verticalResize"`
H float64 `json:"h"`
W float64 `json:"w"`
MinH float64 `json:"minH"`
MinW float64 `json:"minW"`
UnitW float64 `json:"unitW"`
UnitH float64 `json:"unitH"`
X float64 `json:"x"`
Y float64 `json:"y"`
Z float64 `json:"z"`
Props map[string]interface{} `json:"props"`
PanelConfig map[string]interface{} `json:"panelConfig"`
}
type Editor ¶
type Editor struct {
AppInfo AppDto `json:"appInfo"`
Actions []Action `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"`
}
Click to show internal directories.
Click to hide internal directories.