Documentation ¶
Index ¶
- Constants
- func AssetAPI(externalSecure bool) func(context.Context) string
- func AssetAPIFromDomain(externalSecure bool, externalPort uint16) func(context.Context) string
- func DefaultErrorHandler(w http.ResponseWriter, r *http.Request, err error, code int)
- func DownloadHandleFunc(s AssetsService, downloader Downloader) func(http.ResponseWriter, *http.Request)
- func GetAsset(w http.ResponseWriter, r *http.Request, resourceOwner, objectName string, ...) error
- func NewHandler(commands *command.Commands, verifier *authz.TokenVerifier, ...) http.Handler
- func UploadHandleFunc(s AssetsService, uploader Uploader) func(http.ResponseWriter, *http.Request)
- type Downloader
- type ErrorHandler
- type Handler
- func (h *Handler) AuthInterceptor() *http_mw.AuthInterceptor
- func (h *Handler) Commands() *command.Commands
- func (h *Handler) ErrorHandler() ErrorHandler
- func (h *Handler) GetDefaultLabelPolicyFont() Downloader
- func (h *Handler) GetDefaultLabelPolicyIcon() Downloader
- func (h *Handler) GetDefaultLabelPolicyIconDark() Downloader
- func (h *Handler) GetDefaultLabelPolicyLogo() Downloader
- func (h *Handler) GetDefaultLabelPolicyLogoDark() Downloader
- func (h *Handler) GetFile() Downloader
- func (h *Handler) GetMyUserAvatar() Downloader
- func (h *Handler) GetOrgLabelPolicyFont() Downloader
- func (h *Handler) GetOrgLabelPolicyIcon() Downloader
- func (h *Handler) GetOrgLabelPolicyIconDark() Downloader
- func (h *Handler) GetOrgLabelPolicyLogo() Downloader
- func (h *Handler) GetOrgLabelPolicyLogoDark() Downloader
- func (h *Handler) GetPreviewDefaultLabelPolicyFont() Downloader
- func (h *Handler) GetPreviewDefaultLabelPolicyIcon() Downloader
- func (h *Handler) GetPreviewDefaultLabelPolicyIconDark() Downloader
- func (h *Handler) GetPreviewDefaultLabelPolicyLogo() Downloader
- func (h *Handler) GetPreviewDefaultLabelPolicyLogoDark() Downloader
- func (h *Handler) GetPreviewOrgLabelPolicyFont() Downloader
- func (h *Handler) GetPreviewOrgLabelPolicyIcon() Downloader
- func (h *Handler) GetPreviewOrgLabelPolicyIconDark() Downloader
- func (h *Handler) GetPreviewOrgLabelPolicyLogo() Downloader
- func (h *Handler) GetPreviewOrgLabelPolicyLogoDark() Downloader
- func (h *Handler) Storage() static.Storage
- func (h *Handler) UploadDefaultLabelPolicyFont() Uploader
- func (h *Handler) UploadDefaultLabelPolicyIcon() Uploader
- func (h *Handler) UploadDefaultLabelPolicyIconDark() Uploader
- func (h *Handler) UploadDefaultLabelPolicyLogo() Uploader
- func (h *Handler) UploadDefaultLabelPolicyLogoDark() Uploader
- func (h *Handler) UploadMyUserAvatar() Uploader
- func (h *Handler) UploadOrgLabelPolicyFont() Uploader
- func (h *Handler) UploadOrgLabelPolicyIcon() Uploader
- func (h *Handler) UploadOrgLabelPolicyIconDark() Uploader
- func (h *Handler) UploadOrgLabelPolicyLogo() Uploader
- func (h *Handler) UploadOrgLabelPolicyLogoDark() Uploader
- type Uploader
Constants ¶
View Source
const (
HandlerPrefix = "/assets/v1"
)
Variables ¶
This section is empty.
Functions ¶
func AssetAPIFromDomain ¶
func DefaultErrorHandler ¶
func DownloadHandleFunc ¶
func DownloadHandleFunc(s AssetsService, downloader Downloader) func(http.ResponseWriter, *http.Request)
func NewHandler ¶
func UploadHandleFunc ¶
func UploadHandleFunc(s AssetsService, uploader Uploader) func(http.ResponseWriter, *http.Request)
Types ¶
type Downloader ¶
type ErrorHandler ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func (*Handler) AuthInterceptor ¶
func (h *Handler) AuthInterceptor() *http_mw.AuthInterceptor
func (*Handler) ErrorHandler ¶
func (h *Handler) ErrorHandler() ErrorHandler
func (*Handler) GetDefaultLabelPolicyFont ¶
func (h *Handler) GetDefaultLabelPolicyFont() Downloader
func (*Handler) GetDefaultLabelPolicyIcon ¶
func (h *Handler) GetDefaultLabelPolicyIcon() Downloader
func (*Handler) GetDefaultLabelPolicyIconDark ¶
func (h *Handler) GetDefaultLabelPolicyIconDark() Downloader
func (*Handler) GetDefaultLabelPolicyLogo ¶
func (h *Handler) GetDefaultLabelPolicyLogo() Downloader
func (*Handler) GetDefaultLabelPolicyLogoDark ¶
func (h *Handler) GetDefaultLabelPolicyLogoDark() Downloader
func (*Handler) GetFile ¶
func (h *Handler) GetFile() Downloader
func (*Handler) GetMyUserAvatar ¶
func (h *Handler) GetMyUserAvatar() Downloader
func (*Handler) GetOrgLabelPolicyFont ¶
func (h *Handler) GetOrgLabelPolicyFont() Downloader
func (*Handler) GetOrgLabelPolicyIcon ¶
func (h *Handler) GetOrgLabelPolicyIcon() Downloader
func (*Handler) GetOrgLabelPolicyIconDark ¶
func (h *Handler) GetOrgLabelPolicyIconDark() Downloader
func (*Handler) GetOrgLabelPolicyLogo ¶
func (h *Handler) GetOrgLabelPolicyLogo() Downloader
func (*Handler) GetOrgLabelPolicyLogoDark ¶
func (h *Handler) GetOrgLabelPolicyLogoDark() Downloader
func (*Handler) GetPreviewDefaultLabelPolicyFont ¶
func (h *Handler) GetPreviewDefaultLabelPolicyFont() Downloader
func (*Handler) GetPreviewDefaultLabelPolicyIcon ¶
func (h *Handler) GetPreviewDefaultLabelPolicyIcon() Downloader
func (*Handler) GetPreviewDefaultLabelPolicyIconDark ¶
func (h *Handler) GetPreviewDefaultLabelPolicyIconDark() Downloader
func (*Handler) GetPreviewDefaultLabelPolicyLogo ¶
func (h *Handler) GetPreviewDefaultLabelPolicyLogo() Downloader
func (*Handler) GetPreviewDefaultLabelPolicyLogoDark ¶
func (h *Handler) GetPreviewDefaultLabelPolicyLogoDark() Downloader
func (*Handler) GetPreviewOrgLabelPolicyFont ¶
func (h *Handler) GetPreviewOrgLabelPolicyFont() Downloader
func (*Handler) GetPreviewOrgLabelPolicyIcon ¶
func (h *Handler) GetPreviewOrgLabelPolicyIcon() Downloader
func (*Handler) GetPreviewOrgLabelPolicyIconDark ¶
func (h *Handler) GetPreviewOrgLabelPolicyIconDark() Downloader
func (*Handler) GetPreviewOrgLabelPolicyLogo ¶
func (h *Handler) GetPreviewOrgLabelPolicyLogo() Downloader
func (*Handler) GetPreviewOrgLabelPolicyLogoDark ¶
func (h *Handler) GetPreviewOrgLabelPolicyLogoDark() Downloader
func (*Handler) UploadDefaultLabelPolicyFont ¶
func (*Handler) UploadDefaultLabelPolicyIcon ¶
func (*Handler) UploadDefaultLabelPolicyIconDark ¶
func (*Handler) UploadDefaultLabelPolicyLogo ¶
func (*Handler) UploadDefaultLabelPolicyLogoDark ¶
func (*Handler) UploadMyUserAvatar ¶
func (*Handler) UploadOrgLabelPolicyFont ¶
func (*Handler) UploadOrgLabelPolicyIcon ¶
func (*Handler) UploadOrgLabelPolicyIconDark ¶
func (*Handler) UploadOrgLabelPolicyLogo ¶
func (*Handler) UploadOrgLabelPolicyLogoDark ¶
type Uploader ¶
type Uploader interface { UploadAsset(ctx context.Context, info string, asset *command.AssetUpload, commands *command.Commands) error ObjectName(data authz.CtxData) (string, error) ResourceOwner(instance authz.Instance, data authz.CtxData) string ContentTypeAllowed(contentType string) bool MaxFileSize() int64 ObjectType() static.ObjectType }
Click to show internal directories.
Click to hide internal directories.