Documentation ¶
Index ¶
- Variables
- func AttachController(ctx context.Context, c *Controller) context.Context
- func Echo(e *echo.Group)
- func PublicApiAsset() echo.HandlerFunc
- func PublicApiItemList() echo.HandlerFunc
- func PublicApiItemOrAsset() echo.HandlerFunc
- type Asset
- type Controller
- type Item
- type ItemAsset
- type ItemFields
- type ListParam
- type ListResult
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidProject = rerror.NewE(i18n.T("invalid project"))
Functions ¶
func AttachController ¶
func AttachController(ctx context.Context, c *Controller) context.Context
func PublicApiAsset ¶
func PublicApiAsset() echo.HandlerFunc
func PublicApiItemList ¶
func PublicApiItemList() echo.HandlerFunc
func PublicApiItemOrAsset ¶
func PublicApiItemOrAsset() echo.HandlerFunc
Types ¶
type Asset ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func GetController ¶
func GetController(ctx context.Context) *Controller
func NewController ¶
func NewController(project repo.Project, usecases *interfaces.Container, aur asset.URLResolver) *Controller
type Item ¶
type Item struct { ID string Fields ItemFields }
func (Item) MarshalJSON ¶
type ItemAsset ¶
type ItemAsset struct { Type string `json:"type"` ID string `json:"id,omitempty"` URL string `json:"url,omitempty"` }
func NewItemAsset ¶
func NewItemAsset(a *asset.Asset, urlResolver asset.URLResolver) ItemAsset
type ItemFields ¶
func NewItemFields ¶
func (ItemFields) DropEmptyFields ¶
func (i ItemFields) DropEmptyFields() ItemFields
type ListParam ¶
type ListParam struct {
Pagination *usecasex.Pagination
}
type ListResult ¶
type ListResult[T any] struct { Results []T `json:"results"` TotalCount int64 `json:"totalCount"` HasMore *bool `json:"hasMore,omitempty"` // offset base Limit *int64 `json:"limit,omitempty"` Offset *int64 `json:"offset,omitempty"` Page *int64 `json:"page,omitempty"` // cursor base NextCursor *string `json:"nextCursor,omitempty"` }
func NewListResult ¶
func NewListResult[T any](results []T, pi *usecasex.PageInfo, p *usecasex.Pagination) ListResult[T]
Click to show internal directories.
Click to hide internal directories.