Documentation
¶
Index ¶
- func APIError(err error) huma.StatusError
- func CurrentActor(ctx context.Context) types.Actor
- func CurrentUserFromContext(ctx context.Context) (*types.Actor, bool)
- func DefaultOperationSecurity() []map[string][]string
- func DownloadResponse(reader io.ReadCloser, size int64, filename string) *huma.StreamResponse
- func FeatureDisabledError(id types.FeatureID) *types.FeatureDisabledError
- func MapOneAPIResponse[S, D any](source S, mappingMessage func(error) string) (types.ApiResponse[D], error)
- func Operation(operationID, method, path, summary, description string, tags ...string) huma.Operation
- func PaginationParams(start, limit int, sortCol, sortDir, search string) pagination.QueryParams
- func PaginationResponse(p pagination.Response) types.PaginationResponse
- func ParseMultipartJSONPart[T any](form multipart.Form, partName string) (T, error)
- func PasswordPolicyProblem(err error) huma.StatusError
- func ReadWorkspaceUploads(form multipart.Form, maxFileSizeBytes int64) (map[int][]byte, error)
- func RegisterSecured[I, O any](api huma.API, op huma.Operation, permission string, ...)
- func RequireUser(ctx context.Context) (*types.Actor, error)
- func SessionMetaFromContext(ctx context.Context, userAgent string) types.SessionMeta
- func TranslateRemoteProxyError(err error) error
- func WorkspaceMultipartRequestBody(manifestDescription string) *huma.RequestBody
- type ActivityAppContext
- type Out
- type Page
- type ProblemError
- type RemoteJSONProxy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIError ¶
func APIError(err error) huma.StatusError
func DownloadResponse ¶
func DownloadResponse(reader io.ReadCloser, size int64, filename string) *huma.StreamResponse
func FeatureDisabledError ¶
func FeatureDisabledError(id types.FeatureID) *types.FeatureDisabledError
func MapOneAPIResponse ¶
func PaginationParams ¶
func PaginationParams(start, limit int, sortCol, sortDir, search string) pagination.QueryParams
A limit of -1 means "show all items" (no pagination).
func PaginationResponse ¶
func PaginationResponse(p pagination.Response) types.PaginationResponse
func ParseMultipartJSONPart ¶
func PasswordPolicyProblem ¶
func PasswordPolicyProblem(err error) huma.StatusError
func ReadWorkspaceUploads ¶
func RegisterSecured ¶
func SessionMetaFromContext ¶
func SessionMetaFromContext(ctx context.Context, userAgent string) types.SessionMeta
func WorkspaceMultipartRequestBody ¶
func WorkspaceMultipartRequestBody(manifestDescription string) *huma.RequestBody
Types ¶
type ActivityAppContext ¶
type ActivityAppContext struct {
// contains filtered or unexported fields
}
func NewActivityAppContext ¶
type Out ¶
type Out[T any] struct { Body types.ApiResponse[T] }
func MessageOutput ¶
func MessageOutput(message, activityID string) *Out[types.MessageResponse]
type ProblemError ¶
type ProblemError struct {
*huma.ErrorModel
Details any `json:"details,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.