Documentation
¶
Index ¶
- func ApiKeyAuthHandler(ctx context.Context, req *simba.Request[simba.NoBody, simba.NoParams], ...) (*simba.Response[simba.NoBody], error)
- func BasicAuthHandler(ctx context.Context, req *simba.Request[simba.NoBody, simba.NoParams], ...) (*simba.Response[simba.NoBody], error)
- func BearerTokenAuthHandler(ctx context.Context, req *simba.Request[simba.NoBody, simba.NoParams], ...) (*simba.Response[simba.NoBody], error)
- func NoTagsHandler(ctx context.Context, req *simba.Request[simba.NoBody, simba.NoParams]) (*simba.Response[simba.NoBody], error)
- func TagsHandler(ctx context.Context, req *simba.Request[RequestBody, Params]) (*simba.Response[ResponseBody], error)
- type ApiKeyAuthModel
- type BasicAuthModel
- type BearerTokenAuthModel
- type Params
- type Receiver
- type RequestBody
- type ResponseBody
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApiKeyAuthHandler ¶ added in v0.12.3
func ApiKeyAuthHandler(ctx context.Context, req *simba.Request[simba.NoBody, simba.NoParams], auth *ApiKeyAuthModel) (*simba.Response[simba.NoBody], error)
ApiKeyAuthHandler A dummy function to test the OpenAPI generation with api key auth. @ID apiKeyAuthHandler @Summary api key handler @Description this is a multiline
description for the handler
@Error 409 Resource already exists
func BasicAuthHandler ¶ added in v0.12.3
func BasicAuthHandler(ctx context.Context, req *simba.Request[simba.NoBody, simba.NoParams], auth *BasicAuthModel) (*simba.Response[simba.NoBody], error)
BasicAuthHandler A dummy function to test the OpenAPI generation with basic auth. @ID basicAuthHandler @Summary basic auth handler @Description this is a multiline
description for the handler
@Error 409 Resource already exists
func BearerTokenAuthHandler ¶ added in v0.12.3
func BearerTokenAuthHandler(ctx context.Context, req *simba.Request[simba.NoBody, simba.NoParams], auth *BearerTokenAuthModel) (*simba.Response[simba.NoBody], error)
BearerTokenAuthHandler A dummy function to test the OpenAPI generation with bearer token auth. @ID bearerTokenAuthHandler @Summary bearer token handler @Description this is a multiline
description for the handler
@Error 409 Resource already exists
func NoTagsHandler ¶ added in v0.12.3
func NoTagsHandler(ctx context.Context, req *simba.Request[simba.NoBody, simba.NoParams]) (*simba.Response[simba.NoBody], error)
NoTagsHandler A dummy function to test the OpenAPI generation without any tags in the comment.
func TagsHandler ¶ added in v0.12.3
func TagsHandler(ctx context.Context, req *simba.Request[RequestBody, Params]) (*simba.Response[ResponseBody], error)
TagsHandler A dummy function to test the OpenAPI generation with tags in the comment. @ID testHandler @Deprecated @Tag Test @Tag User @Summary test handler @Description this is a multiline
description for the handler @Error 409 Resource already exists
Types ¶
type ApiKeyAuthModel ¶ added in v0.12.3
type ApiKeyAuthModel struct {
APIKey string `header:"Authorization" description:"API key"`
}
func ApiKeyAuthFunc ¶ added in v0.12.3
func ApiKeyAuthFunc(r *http.Request) (*ApiKeyAuthModel, error)
ApiKeyAuthFunc A dummy function to test the OpenAPI generation with api key auth. @APIKeyAuth "User" "sessionid" "cookie" "Session cookie"
type BasicAuthModel ¶ added in v0.12.3
type BasicAuthModel struct {
Username string `header:"Authorization" description:"Basic auth username"`
}
func BasicAuthFunc ¶ added in v0.12.3
func BasicAuthFunc(r *http.Request) (*BasicAuthModel, error)
BasicAuthFunc A dummy function to test the OpenAPI generation with basic auth. @BasicAuth "admin" "admin access only"
type BearerTokenAuthModel ¶ added in v0.12.3
type BearerTokenAuthModel struct {
Token string `header:"Authorization" description:"Bearer token"`
}
func BearerAuthFunc ¶ added in v0.12.3
func BearerAuthFunc(r *http.Request) (*BearerTokenAuthModel, error)
BearerAuthFunc A dummy function to test the OpenAPI generation with bearer token auth. @BearerAuth "admin" "jwt" "Bearer token"
type Params ¶
type Params struct {
ID uuid.UUID `path:"id" description:"ID of the user" example:"1"`
Gender string `query:"gender" description:"Gender of the user" example:"male"`
RequestID string `header:"X-Request-ID" description:"Request ID" example:"1234"`
Active bool `query:"active" description:"Active status of the user" example:"true"`
Page int `query:"page" description:"Page number" example:"1" default:"1"`
Size int64 `query:"size" description:"Page size" example:"10" default:"10"`
Score float64 `query:"score" description:"User score" example:"9.5" default:"10.0"`
}
type Receiver ¶ added in v0.12.3
type Receiver struct{}
Receiver A dummy struct to test the OpenAPI generation with receiver functions.
func (*Receiver) NoTagsHandler ¶ added in v0.12.3
func (h *Receiver) NoTagsHandler(ctx context.Context, req *simba.Request[simba.NoBody, simba.NoParams]) (*simba.Response[simba.NoBody], error)
NoTagsHandler A dummy function to test the OpenAPI generation without any tags in the comment.
func (*Receiver) TagsHandler ¶ added in v0.12.3
func (h *Receiver) TagsHandler(ctx context.Context, req *simba.Request[RequestBody, Params]) (*simba.Response[ResponseBody], error)
TagsHandler A dummy function to test the OpenAPI generation with tags in the comment with receiver functions. @ID testHandler @Deprecated @Tag Test @Tag User @Summary test handler @Description this is a multiline
description for the handler @Error 409 Resource already exists
type RequestBody ¶
type ResponseBody ¶ added in v0.12.3
type ResponseBody struct {
ID uuid.UUID `json:"id" description:"ID of the user" example:"1"`
Name string `json:"name" description:"Name of the user" example:"John Doe"`
Age int `json:"age" description:"Age of the user" example:"30"`
Description string `json:"description" description:"description of the user" example:"A test user"`
}