Documentation ¶
Index ¶
- type ContentUploadMetadata
- type ResourceManagerService
- func (i *ResourceManagerService[T]) Delete(w http.ResponseWriter, r *http.Request, p httprouter.Params)
- func (i *ResourceManagerService[T]) Get(w http.ResponseWriter, r *http.Request, p httprouter.Params)
- func (i *ResourceManagerService[T]) Put(w http.ResponseWriter, r *http.Request, p httprouter.Params)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContentUploadMetadata ¶
type ContentUploadMetadata struct { *ResourceManagerService[*entity.Attachment] // contains filtered or unexported fields }
func NewAttachment ¶
func NewAttachment( repo content.Repository[*entity.Attachment], blobRepo blob.Repository, mainRefParam string, hideUrl bool, namespace string, urlFormat mycontent_crud.URLFormat, cacheControl string, ) *ContentUploadMetadata
Behave exatctly like the other API, but Can only do repository "Put" via Upload API Can on
func (*ContentUploadMetadata) Get ¶
func (i *ContentUploadMetadata) Get(w http.ResponseWriter, r *http.Request, p httprouter.Params)
func (*ContentUploadMetadata) Upload ¶
func (i *ContentUploadMetadata) Upload(w http.ResponseWriter, r *http.Request, p httprouter.Params)
type ResourceManagerService ¶
type ResourceManagerService[T any] struct { // contains filtered or unexported fields }
func New ¶
func New[T any]( repo content.Repository[T], allocate func() T, validate func(T) *types.CommonError, wrap func(T) mycontent.Data, mainRefParam string, urlFormat mycontent_crud.URLFormat, ) *ResourceManagerService[T]
func NewWithHook ¶
func NewWithHook[T any]( repo content.Repository[T], allocate func() T, validate func(T) *types.CommonError, wrap func(T) mycontent.Data, mainRefParam string, updateHook mycontent.UpdateHook[T], urlFormat mycontent_crud.URLFormat, ) *ResourceManagerService[T]
func (*ResourceManagerService[T]) Delete ¶
func (i *ResourceManagerService[T]) Delete(w http.ResponseWriter, r *http.Request, p httprouter.Params)
func (*ResourceManagerService[T]) Get ¶
func (i *ResourceManagerService[T]) Get(w http.ResponseWriter, r *http.Request, p httprouter.Params)
func (*ResourceManagerService[T]) Put ¶
func (i *ResourceManagerService[T]) Put(w http.ResponseWriter, r *http.Request, p httprouter.Params)
Click to show internal directories.
Click to hide internal directories.