Documentation
¶
Index ¶
- type DeleteConfigRequest
- type DeleteConfigRequestAlias
- type DeleteConfigResponse
- type DeleteConfigResponseAlias
- type GetConfigRequest
- type GetConfigRequestAlias
- type GetConfigResponse
- type GetConfigResponseAlias
- type Handler
- func (h *Handler) DeleteConfig(c *gin.Context)
- func (h *Handler) GetConfig(c *gin.Context)
- func (h *Handler) ListConfigs(c *gin.Context)
- func (h *Handler) ListPublished(c *gin.Context)
- func (h *Handler) Publish(c *gin.Context)
- func (h *Handler) Rollback(c *gin.Context)
- func (h *Handler) SaveConfig(c *gin.Context)
- func (h *Handler) Unpublish(c *gin.Context)
- func (h *Handler) VersionDetail(c *gin.Context)
- func (h *Handler) Versions(c *gin.Context)
- type ListConfigsRequest
- type ListConfigsRequestAlias
- type ListConfigsResponse
- type ListConfigsResponseAlias
- type ListPublishedRequest
- type ListPublishedRequestAlias
- type ListPublishedResponse
- type ListPublishedResponseAlias
- type PublishRequest
- type PublishRequestAlias
- type PublishResponse
- type PublishResponseAlias
- type RollbackRequest
- type RollbackRequestAlias
- type RollbackResponse
- type RollbackResponseAlias
- type SaveConfigRequest
- type SaveConfigRequestAlias
- type SaveConfigResponse
- type SaveConfigResponseAlias
- type Service
- func (s *Service) DeleteConfig(ctx context.Context, req *DeleteConfigRequest) (*DeleteConfigResponse, error)
- func (s *Service) GetConfig(ctx context.Context, req *GetConfigRequest) (*GetConfigResponse, error)
- func (s *Service) ListConfigs(ctx context.Context, req *ListConfigsRequest) (*ListConfigsResponse, error)
- func (s *Service) ListPublished(ctx context.Context, req *ListPublishedRequest) (*ListPublishedResponse, error)
- func (s *Service) Publish(ctx context.Context, req *PublishRequest) (*PublishResponse, error)
- func (s *Service) Rollback(ctx context.Context, req *RollbackRequest) (*RollbackResponse, error)
- func (s *Service) SaveConfig(ctx context.Context, req *SaveConfigRequest) (*SaveConfigResponse, error)
- func (s *Service) Unpublish(ctx context.Context, req *UnpublishRequest) (*UnpublishResponse, error)
- func (s *Service) VersionDetail(ctx context.Context, req *VersionDetailRequest) (*VersionDetailResponse, error)
- func (s *Service) Versions(ctx context.Context, req *VersionsRequest) (*VersionsResponse, error)
- type UnpublishRequest
- type UnpublishRequestAlias
- type UnpublishResponse
- type UnpublishResponseAlias
- type VersionDetailRequest
- type VersionDetailRequestAlias
- type VersionDetailResponse
- type VersionDetailResponseAlias
- type VersionsRequest
- type VersionsRequestAlias
- type VersionsResponse
- type VersionsResponseAlias
- type WorkspaceConfig
- type WorkspaceConfigCanonical
- type WorkspaceConfigDeleteRequest
- type WorkspaceConfigDeleteResponse
- type WorkspaceConfigGetRequest
- type WorkspaceConfigGetResponse
- type WorkspaceConfigMeta
- type WorkspaceConfigSaveRequest
- type WorkspaceConfigSaveResponse
- type WorkspaceConfigsListRequest
- type WorkspaceConfigsListResponse
- type WorkspacePublishRequest
- type WorkspacePublishResponse
- type WorkspacePublishedListRequest
- type WorkspacePublishedListResponse
- type WorkspaceRollbackRequest
- type WorkspaceRollbackResponse
- type WorkspaceUnpublishRequest
- type WorkspaceUnpublishResponse
- type WorkspaceVersionDetailRequest
- type WorkspaceVersionDetailResponse
- type WorkspaceVersionRecord
- type WorkspaceVersionRecordAlias
- type WorkspaceVersionRecordCanonical
- type WorkspaceVersionsRequest
- type WorkspaceVersionsResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeleteConfigRequest ¶
type DeleteConfigRequest struct {
ObjectKey string `uri:"objectKey" binding:"required"`
}
DeleteConfigRequest is the request to delete a workspace config
type DeleteConfigRequestAlias ¶
type DeleteConfigRequestAlias = WorkspaceConfigDeleteRequest
Aliases for requests
type DeleteConfigResponse ¶
type DeleteConfigResponse struct {
Message string `json:"message"`
}
DeleteConfigResponse is the response from deleting workspace config
type DeleteConfigResponseAlias ¶
type DeleteConfigResponseAlias = WorkspaceConfigDeleteResponse
Aliases for requests
type GetConfigRequest ¶
type GetConfigRequest struct {
ObjectKey string `uri:"objectKey" binding:"required"`
}
GetConfigRequest is the request to get a workspace config
type GetConfigRequestAlias ¶
type GetConfigRequestAlias = WorkspaceConfigGetRequest
Aliases for requests
type GetConfigResponse ¶
type GetConfigResponse struct {
WorkspaceConfig WorkspaceConfig `json:"workspaceConfig"`
}
GetConfigResponse is the response with workspace config
type GetConfigResponseAlias ¶
type GetConfigResponseAlias = WorkspaceConfigGetResponse
Aliases for requests
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) DeleteConfig ¶
DeleteConfig handles the request to delete a workspace configuration
func (*Handler) ListConfigs ¶
ListConfigs handles the request to list all workspace configurations
func (*Handler) ListPublished ¶
ListPublished handles the request to list published workspace configurations
func (*Handler) Rollback ¶
Rollback handles the request to rollback a workspace to a specific version
func (*Handler) SaveConfig ¶
SaveConfig handles the request to save a workspace configuration
func (*Handler) VersionDetail ¶
VersionDetail handles the request to get workspace version detail
type ListConfigsRequest ¶
type ListConfigsRequest struct{}
ListConfigsRequest is the request to list all workspace configs
type ListConfigsRequestAlias ¶
type ListConfigsRequestAlias = WorkspaceConfigsListRequest
Aliases for requests
type ListConfigsResponse ¶
type ListConfigsResponse struct {
Items []WorkspaceConfig `json:"items"`
}
ListConfigsResponse is the response with workspace configs list
type ListConfigsResponseAlias ¶
type ListConfigsResponseAlias = WorkspaceConfigsListResponse
Aliases for requests
type ListPublishedRequest ¶
type ListPublishedRequest struct{}
ListPublishedRequest is the request to list published workspaces
type ListPublishedRequestAlias ¶
type ListPublishedRequestAlias = WorkspacePublishedListRequest
Aliases for requests
type ListPublishedResponse ¶
type ListPublishedResponse struct {
Items []WorkspaceConfig `json:"items"`
}
ListPublishedResponse is the response with published workspaces
type ListPublishedResponseAlias ¶
type ListPublishedResponseAlias = WorkspacePublishedListResponse
Aliases for requests
type PublishRequest ¶
type PublishRequest struct {
ObjectKey string `json:"objectKey" binding:"required"`
PublishedBy string `json:"publishedBy"`
}
PublishRequest is the request to publish a workspace
type PublishResponse ¶
type PublishResponse struct {
Published bool `json:"published"`
ObjectKey string `json:"objectKey"`
}
PublishResponse is the response from publishing workspace
type PublishResponseAlias ¶
type PublishResponseAlias = WorkspacePublishResponse
Aliases for requests
type RollbackRequest ¶
type RollbackRequest struct {
ObjectKey string `uri:"objectKey" binding:"required"`
VersionID string `uri:"versionId" binding:"required"`
}
RollbackRequest is the request to rollback a workspace
type RollbackRequestAlias ¶
type RollbackRequestAlias = WorkspaceRollbackRequest
Aliases for requests
type RollbackResponse ¶
RollbackResponse is the response from rolling back workspace
type RollbackResponseAlias ¶
type RollbackResponseAlias = WorkspaceRollbackResponse
Aliases for requests
type SaveConfigRequest ¶
type SaveConfigRequest struct {
ObjectKey string `uri:"objectKey" binding:"required"`
Title string `json:"title"`
Description string `json:"description"`
Layout interface{} `json:"layout"`
MenuOrder int `json:"menuOrder"`
Status string `json:"status"`
}
SaveConfigRequest is the request to save a workspace config
type SaveConfigRequestAlias ¶
type SaveConfigRequestAlias = WorkspaceConfigSaveRequest
Config operations
type SaveConfigResponse ¶
type SaveConfigResponse struct {
WorkspaceConfig WorkspaceConfig `json:"workspaceConfig"`
}
SaveConfigResponse is the response from saving workspace config
type SaveConfigResponseAlias ¶
type SaveConfigResponseAlias = WorkspaceConfigSaveResponse
Aliases for requests
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(svcCtx *svc.ServiceContext) *Service
func (*Service) DeleteConfig ¶
func (s *Service) DeleteConfig(ctx context.Context, req *DeleteConfigRequest) (*DeleteConfigResponse, error)
DeleteConfig deletes a workspace configuration
func (*Service) GetConfig ¶
func (s *Service) GetConfig(ctx context.Context, req *GetConfigRequest) (*GetConfigResponse, error)
GetConfig returns a workspace configuration by object key
func (*Service) ListConfigs ¶
func (s *Service) ListConfigs(ctx context.Context, req *ListConfigsRequest) (*ListConfigsResponse, error)
ListConfigs returns all workspace configurations
func (*Service) ListPublished ¶
func (s *Service) ListPublished(ctx context.Context, req *ListPublishedRequest) (*ListPublishedResponse, error)
ListPublished returns published workspace configurations
func (*Service) Publish ¶
func (s *Service) Publish(ctx context.Context, req *PublishRequest) (*PublishResponse, error)
Publish publishes a workspace configuration
func (*Service) Rollback ¶
func (s *Service) Rollback(ctx context.Context, req *RollbackRequest) (*RollbackResponse, error)
Rollback rolls back a workspace to a specific version
func (*Service) SaveConfig ¶
func (s *Service) SaveConfig(ctx context.Context, req *SaveConfigRequest) (*SaveConfigResponse, error)
SaveConfig saves (creates or updates) a workspace configuration
func (*Service) Unpublish ¶
func (s *Service) Unpublish(ctx context.Context, req *UnpublishRequest) (*UnpublishResponse, error)
Unpublish unpublishes a workspace configuration
func (*Service) VersionDetail ¶
func (s *Service) VersionDetail(ctx context.Context, req *VersionDetailRequest) (*VersionDetailResponse, error)
VersionDetail returns a specific workspace version
func (*Service) Versions ¶
func (s *Service) Versions(ctx context.Context, req *VersionsRequest) (*VersionsResponse, error)
Versions returns workspace version history
type UnpublishRequest ¶
type UnpublishRequest struct {
ObjectKey string `json:"objectKey" binding:"required"`
}
UnpublishRequest is the request to unpublish a workspace
type UnpublishRequestAlias ¶
type UnpublishRequestAlias = WorkspaceUnpublishRequest
Aliases for requests
type UnpublishResponse ¶
type UnpublishResponse struct {
Published bool `json:"published"`
ObjectKey string `json:"objectKey"`
}
UnpublishResponse is the response from unpublishing workspace
type UnpublishResponseAlias ¶
type UnpublishResponseAlias = WorkspaceUnpublishResponse
Aliases for requests
type VersionDetailRequest ¶
type VersionDetailRequest struct {
ObjectKey string `uri:"objectKey" binding:"required"`
VersionID string `uri:"versionId" binding:"required"`
}
VersionDetailRequest is the request to get workspace version detail
type VersionDetailRequestAlias ¶
type VersionDetailRequestAlias = WorkspaceVersionDetailRequest
Aliases for requests
type VersionDetailResponse ¶
type VersionDetailResponse struct {
WorkspaceVersionRecord WorkspaceVersionRecord `json:"workspaceVersionRecord"`
}
VersionDetailResponse is the response with workspace version detail
type VersionDetailResponseAlias ¶
type VersionDetailResponseAlias = WorkspaceVersionDetailResponse
Aliases for requests
type VersionsRequest ¶
type VersionsRequest struct {
ObjectKey string `form:"objectKey" binding:"required"`
From string `form:"from"`
To string `form:"to"`
}
VersionsRequest is the request to list workspace versions
type VersionsResponse ¶
type VersionsResponse struct {
Items []WorkspaceVersionRecord `json:"items"`
}
VersionsResponse is the response with workspace versions
type VersionsResponseAlias ¶
type VersionsResponseAlias = WorkspaceVersionsResponse
Aliases for requests
type WorkspaceConfig ¶
type WorkspaceConfig struct {
ObjectKey string `json:"objectKey"`
Title string `json:"title"`
Description string `json:"description,omitempty"`
Layout interface{} `json:"layout"`
Published bool `json:"published"`
PublishedAt string `json:"publishedAt,omitempty"`
PublishedBy string `json:"publishedBy,omitempty"`
MenuOrder int `json:"menuOrder"`
Status string `json:"status"`
Version int `json:"version,omitempty"`
CreatedAt string `json:"createdAt,omitempty"`
UpdatedAt string `json:"updatedAt,omitempty"`
Meta WorkspaceConfigMeta `json:"meta,omitempty"`
}
WorkspaceConfig represents a workspace configuration
type WorkspaceConfigCanonical ¶
type WorkspaceConfigCanonical struct {
ObjectKey string `json:"objectKey"`
Title string `json:"title,omitempty"`
Description string `json:"description,omitempty"`
Layout interface{} `json:"layout,omitempty"`
Published bool `json:"published"`
Status string `json:"status,omitempty"`
PublishedAt string `json:"publishedAt,omitempty"`
PublishedBy string `json:"publishedBy,omitempty"`
MenuOrder int `json:"menuOrder"`
Version int `json:"version,omitempty"`
Meta WorkspaceConfigMeta `json:"meta,omitempty"`
}
WorkspaceConfig represents a workspace configuration (canonical type from types.go)
type WorkspaceConfigDeleteRequest ¶
type WorkspaceConfigDeleteRequest struct {
ObjectKey string `uri:"objectKey"`
}
WorkspaceConfigDeleteRequest is the request to delete a workspace config
type WorkspaceConfigDeleteResponse ¶
type WorkspaceConfigDeleteResponse struct {
Message string `json:"message"`
}
WorkspaceConfigDeleteResponse is the response from deleting workspace config
type WorkspaceConfigGetRequest ¶
type WorkspaceConfigGetRequest struct {
ObjectKey string `uri:"objectKey"`
}
WorkspaceConfigGetRequest is the request to get a workspace config
type WorkspaceConfigGetResponse ¶
type WorkspaceConfigGetResponse struct {
WorkspaceConfigCanonical
}
WorkspaceConfigGetResponse is the response with workspace config
type WorkspaceConfigMeta ¶
type WorkspaceConfigMeta struct {
CreatedAt string `json:"createdAt,omitempty"`
UpdatedAt string `json:"updatedAt,omitempty"`
}
WorkspaceConfigMeta represents metadata for workspace configuration
type WorkspaceConfigSaveRequest ¶
type WorkspaceConfigSaveRequest struct {
ObjectKey string `uri:"objectKey"`
Title string `json:"title"`
Description string `json:"description"`
Layout interface{} `json:"layout,omitempty"`
Status string `json:"status"`
MenuOrder int `json:"menuOrder"`
}
WorkspaceConfigSaveRequest is the request to save a workspace config
type WorkspaceConfigSaveResponse ¶
type WorkspaceConfigSaveResponse struct {
WorkspaceConfigCanonical
}
WorkspaceConfigSaveResponse is the response from saving workspace config
type WorkspaceConfigsListRequest ¶
type WorkspaceConfigsListRequest struct {
}
WorkspaceConfigsListRequest is the request to list all workspace configs
type WorkspaceConfigsListResponse ¶
type WorkspaceConfigsListResponse struct {
Items []WorkspaceConfigCanonical `json:"items"`
}
WorkspaceConfigsListResponse is the response with workspace configs list
type WorkspacePublishRequest ¶
type WorkspacePublishRequest struct {
ObjectKey string `uri:"objectKey"`
PublishedBy string `json:"publishedBy"`
}
WorkspacePublishRequest is the request to publish a workspace
type WorkspacePublishResponse ¶
type WorkspacePublishResponse struct {
Published bool `json:"published"`
ObjectKey string `json:"objectKey"`
}
WorkspacePublishResponse is the response from publishing workspace
type WorkspacePublishedListRequest ¶
type WorkspacePublishedListRequest struct {
}
WorkspacePublishedListRequest is the request to list published workspaces
type WorkspacePublishedListResponse ¶
type WorkspacePublishedListResponse struct {
Items []WorkspaceConfigCanonical `json:"items"`
}
WorkspacePublishedListResponse is the response with published workspaces
type WorkspaceRollbackRequest ¶
type WorkspaceRollbackRequest struct {
ObjectKey string `uri:"objectKey"`
VersionId string `json:"versionId"`
}
WorkspaceRollbackRequest is the request to rollback a workspace
type WorkspaceRollbackResponse ¶
type WorkspaceRollbackResponse struct {
ObjectKey string `json:"objectKey"`
Version int `json:"version"`
}
WorkspaceRollbackResponse is the response from rolling back workspace
type WorkspaceUnpublishRequest ¶
type WorkspaceUnpublishRequest struct {
ObjectKey string `uri:"objectKey"`
}
WorkspaceUnpublishRequest is the request to unpublish a workspace
type WorkspaceUnpublishResponse ¶
type WorkspaceUnpublishResponse struct {
Published bool `json:"published"`
ObjectKey string `json:"objectKey"`
}
WorkspaceUnpublishResponse is the response from unpublishing workspace
type WorkspaceVersionDetailRequest ¶
type WorkspaceVersionDetailRequest struct {
ObjectKey string `uri:"objectKey"`
VersionId string `uri:"versionId"`
}
WorkspaceVersionDetailRequest is the request to get workspace version detail
type WorkspaceVersionDetailResponse ¶
type WorkspaceVersionDetailResponse struct {
WorkspaceVersionRecordCanonical
}
WorkspaceVersionDetailResponse is the response with workspace version detail
type WorkspaceVersionRecord ¶
type WorkspaceVersionRecord struct {
ID string `json:"id"`
ObjectKey string `json:"objectKey"`
Version int `json:"version"`
Config interface{} `json:"config"`
IsCurrentDraft bool `json:"isCurrentDraft"`
IsCurrentPublished bool `json:"isCurrentPublished"`
CreatedAt string `json:"createdAt"`
CreatedBy string `json:"createdBy"`
Comment string `json:"comment"`
}
WorkspaceVersionRecord represents a workspace version
type WorkspaceVersionRecordAlias ¶
type WorkspaceVersionRecordAlias = WorkspaceVersionRecordCanonical
Aliases for WorkspaceVersionRecord
type WorkspaceVersionRecordCanonical ¶
type WorkspaceVersionRecordCanonical struct {
Id string `json:"id"`
ObjectKey string `json:"objectKey"`
Version int `json:"version"`
Config interface{} `json:"config"`
IsCurrentDraft bool `json:"isCurrentDraft"`
IsCurrentPublished bool `json:"isCurrentPublished"`
CreatedAt string `json:"createdAt,omitempty"`
CreatedBy string `json:"createdBy,omitempty"`
Comment string `json:"comment,omitempty"`
}
WorkspaceVersionRecord represents a workspace version
type WorkspaceVersionsRequest ¶
type WorkspaceVersionsRequest struct {
ObjectKey string `uri:"objectKey"`
From string `form:"from"`
To string `form:"to"`
}
WorkspaceVersionsRequest is the request to list workspace versions
type WorkspaceVersionsResponse ¶
type WorkspaceVersionsResponse struct {
Items []WorkspaceVersionRecordCanonical `json:"items"`
CurrentDraftVersion int `json:"currentDraftVersion"`
CurrentPublishedVersion int `json:"currentPublishedVersion"`
}
WorkspaceVersionsResponse is the response with workspace versions