response

package
v0.0.0-...-9e48597 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateGetAllAppsResponse

func GenerateGetAllAppsResponse(allApps []*model.App, usersLT map[int]*model.User) []*model.AppForExport

Types

type AppListResponse

type AppListResponse struct {
	AppList       []*model.AppForExport `json:"appList"`
	TotalPages    int                   `json:"-"`
	TotalAppCount int64                 `json:"-"`
	HasMore       bool                  `json:"hasMore"`
}

func NewAppListResponse

func NewAppListResponse(appList []*model.App, pagination *storage.Pagination, userLT map[int]*model.User) (*AppListResponse, error)

func (*AppListResponse) ExportForFeedback

func (resp *AppListResponse) ExportForFeedback() interface{}

type AppMapForExport

type AppMapForExport struct {
	AppList map[int]*model.AppForExport `json:"appList"`
}

func NewAppMapForExport

func NewAppMapForExport(appList []*model.App, userLT map[int]*model.User) *AppMapForExport

func (*AppMapForExport) ExportForFeedback

func (resp *AppMapForExport) ExportForFeedback() interface{}

type CreateActionByBatchResponse

type CreateActionByBatchResponse struct {
	Actions []*CreateActionResponse `json:"actions"`
}

func NewCreateActionByBatchResponse

func NewCreateActionByBatchResponse(actions []*model.Action) *CreateActionByBatchResponse

func (*CreateActionByBatchResponse) ExportForFeedback

func (resp *CreateActionByBatchResponse) ExportForFeedback() interface{}

type CreateActionResponse

type CreateActionResponse struct {
	ActionID          string                 `json:"actionID"`
	UID               uuid.UUID              `json:"uid"`
	TeamID            string                 `json:"teamID"`
	AppID             string                 `json:"appID"`
	Version           int                    `json:"version"`
	ResourceID        string                 `json:"resourceID,omitempty"`
	DisplayName       string                 `json:"displayName"`
	ActionType        string                 `json:"actionType"`
	IsVirtualResource bool                   `json:"isVirtualResource"`
	Content           map[string]interface{} `json:"content"`
	Transformer       map[string]interface{} `json:"transformer"`
	TriggerMode       string                 `json:"triggerMode"`
	Config            map[string]interface{} `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 NewCreateActionResponse

func NewCreateActionResponse(action *model.Action) *CreateActionResponse

func (*CreateActionResponse) ExportForFeedback

func (resp *CreateActionResponse) ExportForFeedback() interface{}

type CreateFlowActionResponse

type CreateFlowActionResponse struct {
	FlowActionID      string                 `json:"flowActionID"`
	UID               uuid.UUID              `json:"uid"`
	TeamID            string                 `json:"teamID"`
	WorkflowID        string                 `json:"workflowID"`
	Version           int                    `json:"version"`
	ResourceID        string                 `json:"resourceID,omitempty"`
	DisplayName       string                 `json:"displayName"`
	ActionType        string                 `json:"flowActionType"`
	IsVirtualResource bool                   `json:"isVirtualResource"`
	Content           map[string]interface{} `json:"content"`
	Transformer       map[string]interface{} `json:"transformer"`
	TriggerMode       string                 `json:"triggerMode"`
	Config            map[string]interface{} `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 NewCreateFlowActionResponse

func NewCreateFlowActionResponse(flowAction *model.FlowAction) *CreateFlowActionResponse

func (*CreateFlowActionResponse) ExportForFeedback

func (resp *CreateFlowActionResponse) ExportForFeedback() interface{}

type CreateOAuthTokenResponse

type CreateOAuthTokenResponse struct {
	AccessToken string `json:"accessToken"`
}

func NewCreateOAuthTokenResponse

func NewCreateOAuthTokenResponse(token string) *CreateOAuthTokenResponse

func (*CreateOAuthTokenResponse) ExportForFeedback

func (resp *CreateOAuthTokenResponse) ExportForFeedback() interface{}

type CreateResourceResponse

type CreateResourceResponse 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 NewCreateResourceResponse

func NewCreateResourceResponse(resource *model.Resource) *CreateResourceResponse

func (*CreateResourceResponse) ExportForFeedback

func (resp *CreateResourceResponse) ExportForFeedback() interface{}

type DeleteActionResponse

type DeleteActionResponse struct {
	ID string `json:"actionID"`
}

func NewDeleteActionResponse

func NewDeleteActionResponse(id int) *DeleteActionResponse

func (*DeleteActionResponse) ExportForFeedback

func (resp *DeleteActionResponse) ExportForFeedback() interface{}

type DeleteAppResponse

type DeleteAppResponse struct {
	ID string `json:"appID"`
}

func NewDeleteAppResponse

func NewDeleteAppResponse(id int) *DeleteAppResponse

func (*DeleteAppResponse) ExportForFeedback

func (resp *DeleteAppResponse) ExportForFeedback() interface{}

type DeleteFlowActionResponse

type DeleteFlowActionResponse struct {
	ID string `json:"flowActionID"`
}

func NewDeleteFlowActionResponse

func NewDeleteFlowActionResponse(id int) *DeleteFlowActionResponse

func (*DeleteFlowActionResponse) ExportForFeedback

func (resp *DeleteFlowActionResponse) ExportForFeedback() interface{}

type DeleteResourceResponse

type DeleteResourceResponse struct {
	ID string `json:"resourceID"`
}

func NewDeleteResourceResponse

func NewDeleteResourceResponse(id int) *DeleteResourceResponse

func (*DeleteResourceResponse) ExportForFeedback

func (resp *DeleteResourceResponse) ExportForFeedback() interface{}

type DuplicateWorkflowActionsResponse

type DuplicateWorkflowActionsResponse struct {
	IDMap map[int]int `json:"idMap"`
}

func NewDuplicateWorkflowActionsResponse

func NewDuplicateWorkflowActionsResponse(idMap map[int]int) *DuplicateWorkflowActionsResponse

func (*DuplicateWorkflowActionsResponse) ExportForFeedback

func (resp *DuplicateWorkflowActionsResponse) ExportForFeedback() interface{}

type EmptyBuilderDescResponse

type EmptyBuilderDescResponse struct {
	AppNum         int    `json:"appNum"`
	ResourceNum    int    `json:"resourceNum"`
	ActionNum      int    `json:"actionNum"`
	LastModifiedAt string `json:"lastModifiedAt"` // is "" by first time enter builder.
}

func NewEmptyBuilderDescResponse

func NewEmptyBuilderDescResponse(appNum int, resourceNum int, actionNum int) *EmptyBuilderDescResponse

func (*EmptyBuilderDescResponse) ExportForFeedback

func (resp *EmptyBuilderDescResponse) ExportForFeedback() interface{}

type GetActionResponse

type GetActionResponse struct {
	ActionID          string                 `json:"actionID"`
	UID               uuid.UUID              `json:"uid"`
	TeamID            string                 `json:"teamID"`
	AppID             string                 `json:"appID"`
	Version           int                    `json:"version"`
	ResourceID        string                 `json:"resourceID,omitempty"`
	DisplayName       string                 `json:"displayName"`
	ActionType        string                 `json:"actionType"`
	IsVirtualResource bool                   `json:"isVirtualResource"`
	Content           map[string]interface{} `json:"content"`
	Transformer       map[string]interface{} `json:"transformer"`
	TriggerMode       string                 `json:"triggerMode"`
	Config            map[string]interface{} `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 NewGetActionResponse

func NewGetActionResponse(action *model.Action) *GetActionResponse

func (*GetActionResponse) AppendVirtualResourceToTemplate

func (req *GetActionResponse) AppendVirtualResourceToTemplate(value interface{})

func (*GetActionResponse) ExportForFeedback

func (resp *GetActionResponse) ExportForFeedback() interface{}

type GetBuilderDescResponse

type GetBuilderDescResponse struct {
	AppNum         int       `json:"appNum"`
	ResourceNum    int       `json:"resourceNum"`
	ActionNum      int       `json:"actionNum"`
	LastModifiedAt time.Time `json:"lastModifiedAt"`
}

func NewGetBuilderDescResponse

func NewGetBuilderDescResponse(appNum int, resourceNum int, actionNum int, lastModifiedAt time.Time) *GetBuilderDescResponse

func (*GetBuilderDescResponse) ExportForFeedback

func (resp *GetBuilderDescResponse) ExportForFeedback() interface{}

type GetFlowActionResponse

type GetFlowActionResponse struct {
	FlowActionID      string                 `json:"flowActionID"`
	UID               uuid.UUID              `json:"uid"`
	TeamID            string                 `json:"teamID"`
	WorkflowID        string                 `json:"workflowID"`
	Version           int                    `json:"version"`
	ResourceID        string                 `json:"resourceID,omitempty"`
	DisplayName       string                 `json:"displayName"`
	FlowActionType    string                 `json:"flowActionType"`
	IsVirtualResource bool                   `json:"isVirtualResource"`
	Content           map[string]interface{} `json:"content"`
	Transformer       map[string]interface{} `json:"transformer"`
	TriggerMode       string                 `json:"triggerMode"`
	Config            map[string]interface{} `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 NewGetFlowActionResponse

func NewGetFlowActionResponse(flowAction *model.FlowAction) *GetFlowActionResponse

func (*GetFlowActionResponse) AppendVirtualResourceToTemplate

func (req *GetFlowActionResponse) AppendVirtualResourceToTemplate(value interface{})

func (*GetFlowActionResponse) ExportForFeedback

func (resp *GetFlowActionResponse) ExportForFeedback() interface{}

type GetResourceResponse

type GetResourceResponse 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 NewGetResourceResponse

func NewGetResourceResponse(resource *model.Resource) *GetResourceResponse

func (*GetResourceResponse) ExportForFeedback

func (resp *GetResourceResponse) ExportForFeedback() interface{}

type GetSnapshotListResponse

type GetSnapshotListResponse struct {
	SnapshotList []*model.AppSnapshotForExport `json:"snapshotList"`
	TotalPages   int                           `json:"totalPages"`
}

func NewGetSnapshotListResponse

func NewGetSnapshotListResponse(appSnapshots []*model.AppSnapshot, totalPages int, usersLT map[int]*model.User) *GetSnapshotListResponse

func (*GetSnapshotListResponse) ExportForFeedback

func (resp *GetSnapshotListResponse) ExportForFeedback() interface{}

type GetWorkflowAllFlowActionsResponse

type GetWorkflowAllFlowActionsResponse struct {
	AllFlowActions []*GetFlowActionResponse `json:"allFlowActions"`
}

func NewEmptyGetWorkflowAllFlowActionsResponse

func NewEmptyGetWorkflowAllFlowActionsResponse() *GetWorkflowAllFlowActionsResponse

func NewGetWorkflowAllFlowActionsResponse

func NewGetWorkflowAllFlowActionsResponse(flowActions []*model.FlowAction, virtualResourceLT map[int]map[string]interface{}) *GetWorkflowAllFlowActionsResponse

func (*GetWorkflowAllFlowActionsResponse) ExportForFeedback

func (resp *GetWorkflowAllFlowActionsResponse) ExportForFeedback() interface{}

type GoogleSheetsOAuth2Response

type GoogleSheetsOAuth2Response struct {
	URL string `json:"url"`
}

func NewGoogleSheetsOAuth2Response

func NewGoogleSheetsOAuth2Response(accessType int, accessToken string) *GoogleSheetsOAuth2Response

func (*GoogleSheetsOAuth2Response) ExportForFeedback

func (resp *GoogleSheetsOAuth2Response) ExportForFeedback() interface{}

type IsPublicAppResponse

type IsPublicAppResponse struct {
	IsPublic bool `json:"isPublic"`
}

func NewIsPublicAppResponse

func NewIsPublicAppResponse(isPublic bool) *IsPublicAppResponse

func (*IsPublicAppResponse) ExportForFeedback

func (resp *IsPublicAppResponse) ExportForFeedback() interface{}

type ReleaseAppResponse

type ReleaseAppResponse struct {
	Version         int `json:"version"`
	ReleaseVersion  int `json:"releaseVersion"`
	MainlineVersion int `json:"mainlineVersion"`
}

func NewReleaseAppResponse

func NewReleaseAppResponse(app *model.App) *ReleaseAppResponse

func (*ReleaseAppResponse) ExportForFeedback

func (resp *ReleaseAppResponse) ExportForFeedback() interface{}

type Response

type Response interface {
	ExportForFeedback() interface{}
}

type UpdateActionByBatchResponse

type UpdateActionByBatchResponse struct {
	Actions []*UpdateActionResponse `json:"actions"`
}

func NewUpdateActionByBatchResponse

func NewUpdateActionByBatchResponse(actions []*model.Action) *UpdateActionByBatchResponse

func (*UpdateActionByBatchResponse) ExportForFeedback

func (resp *UpdateActionByBatchResponse) ExportForFeedback() interface{}

type UpdateActionResponse

type UpdateActionResponse struct {
	ActionID          string                 `json:"actionID"`
	UID               uuid.UUID              `json:"uid"`
	TeamID            string                 `json:"teamID"`
	AppID             string                 `json:"appID"`
	Version           int                    `json:"version"`
	ResourceID        string                 `json:"resourceID,omitempty"`
	DisplayName       string                 `json:"displayName"`
	ActionType        string                 `json:"actionType"`
	IsVirtualResource bool                   `json:"isVirtualResource"`
	Content           map[string]interface{} `json:"content"`
	Transformer       map[string]interface{} `json:"transformer"`
	TriggerMode       string                 `json:"triggerMode"`
	Config            map[string]interface{} `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 NewUpdateActionResponse

func NewUpdateActionResponse(action *model.Action) *UpdateActionResponse

func (*UpdateActionResponse) ExportForFeedback

func (resp *UpdateActionResponse) ExportForFeedback() interface{}

type UpdateFlowActionByBatchResponse

type UpdateFlowActionByBatchResponse struct {
	FlowActions []*UpdateFlowActionResponse `json:"flowActions"`
}

func NewUpdateFlowActionByBatchResponse

func NewUpdateFlowActionByBatchResponse(FlowActions []*model.FlowAction) *UpdateFlowActionByBatchResponse

func (*UpdateFlowActionByBatchResponse) ExportForFeedback

func (resp *UpdateFlowActionByBatchResponse) ExportForFeedback() interface{}

type UpdateFlowActionResponse

type UpdateFlowActionResponse struct {
	FlowActionID      string                 `json:"flowActionID"`
	UID               uuid.UUID              `json:"uid"`
	TeamID            string                 `json:"teamID"`
	WorkflowID        string                 `json:"workflowID"`
	Version           int                    `json:"version"`
	ResourceID        string                 `json:"resourceID,omitempty"`
	DisplayName       string                 `json:"displayName"`
	FlowActionType    string                 `json:"flowActionType"`
	IsVirtualResource bool                   `json:"isVirtualResource"`
	Content           map[string]interface{} `json:"content"`
	Transformer       map[string]interface{} `json:"transformer"`
	TriggerMode       string                 `json:"triggerMode"`
	Config            map[string]interface{} `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 NewUpdateFlowActionResponse

func NewUpdateFlowActionResponse(flowAction *model.FlowAction) *UpdateFlowActionResponse

func (*UpdateFlowActionResponse) ExportForFeedback

func (resp *UpdateFlowActionResponse) ExportForFeedback() interface{}

type UpdateResourceResponse

type UpdateResourceResponse 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 NewUpdateResourceResponse

func NewUpdateResourceResponse(resource *model.Resource) *UpdateResourceResponse

func (*UpdateResourceResponse) ExportForFeedback

func (resp *UpdateResourceResponse) ExportForFeedback() interface{}

type WSURLResponse

type WSURLResponse struct {
	WSURL string `json:"wsURL"`
}

func NewWSURLResponse

func NewWSURLResponse(url string) *WSURLResponse

func (*WSURLResponse) ExportForFeedback

func (resp *WSURLResponse) ExportForFeedback() interface{}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL