Documentation
¶
Index ¶
- func ValidateStartsWithLetter(fl external.ValidationFieldLevel) bool
- type BodyInfo
- type BodyInfo2
- type BodyResponse
- type CustomError
- type E2EClassSecController
- type E2EController
- func (ec *E2EController) ContextAccess() error
- func (ec *E2EController) CustomError() CustomError
- func (ec *E2EController) CustomError503() CustomError
- func (ec *E2EController) CustomPtrError() *CustomError
- func (ec *E2EController) DefaultError() error
- func (ec *E2EController) DefaultErrorWithPayload() (*string, error)
- func (ec *E2EController) Delete() error
- func (ec *E2EController) Error503() error
- func (ec *E2EController) Get() error
- func (ec *E2EController) GetHeaderStartWithLetter(headerParam string) (string, error)
- func (ec *E2EController) GetWithAllParams(queryParam string, pathParam string, headerParam string) (string, error)
- func (ec *E2EController) GetWithAllParamsPtr(queryParam *string, pathParam *string, headerParam *string) (string, error)
- func (ec *E2EController) GetWithAllParamsRequiredPtr(queryParam *string, pathParam *string, headerParam *string) (string, error)
- func (ec *E2EController) Patch() error
- func (ec *E2EController) Post() error
- func (ec *E2EController) PostWithAllParamsWithBody(queryParam string, headerParam string, theBody BodyInfo) (BodyInfo, error)
- func (ec *E2EController) PostWithAllParamsWithBodyPtr(queryParam *string, headerParam *string, theBody *BodyInfo) (*BodyInfo, error)
- func (ec *E2EController) PostWithAllParamsWithBodyRequiredPtr(theBody *BodyInfo) (*BodyInfo, error)
- func (ec *E2EController) Put() error
- func (ec *E2EController) SimpleGet() (string, error)
- func (ec *E2EController) SimpleGetEmpty(queryParam string) error
- func (ec *E2EController) SimpleGetEmptyString() (string, error)
- func (ec *E2EController) SimpleGetNullString() (*string, error)
- func (ec *E2EController) SimpleGetObject() (BodyResponse, error)
- func (ec *E2EController) SimpleGetObjectNull() (*BodyResponse, error)
- func (ec *E2EController) SimpleGetObjectPtr() (*BodyResponse, error)
- func (ec *E2EController) SimpleGetPtrString() (*string, error)
- func (ec *E2EController) WithDefaultConfigSecurity(headerParam string) (string, error)
- func (ec *E2EController) WithOneSecurity(headerParam string) (string, error)
- func (ec *E2EController) WithTwoSecurity(headerParam string) (string, error)
- func (ec *E2EController) WithTwoSecuritySameMethod(headerParam string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateStartsWithLetter ¶ added in v1.0.4
func ValidateStartsWithLetter(fl external.ValidationFieldLevel) bool
Custom validation function to check if a string starts with a letter
Types ¶
type BodyResponse ¶ added in v1.0.5
type BodyResponse struct {
Data string `json:"data"`
}
type CustomError ¶ added in v1.0.5
type CustomError struct { Message string `json:"message"` // contains filtered or unexported fields }
type E2EClassSecController ¶ added in v1.0.5
type E2EClassSecController struct {
external.GleeceController // Embedding the GleeceController to inherit its methods
}
@Route(/e2e) @Security(securitySchemaName, { scopes: ["class"] })
func (*E2EClassSecController) WithDefaultClassSecurity ¶ added in v1.0.5
func (ec *E2EClassSecController) WithDefaultClassSecurity(headerParam string) (string, error)
@Method(GET) @Header(headerParam, { name: "x-test-scopes" }) @Route(/with-default-class-security)
func (*E2EClassSecController) WithOverrideClassSecurity ¶ added in v1.0.5
func (ec *E2EClassSecController) WithOverrideClassSecurity(headerParam string) (string, error)
@Method(GET) @Route(/with-default-override-class-security) @Header(headerParam, { name: "x-test-scopes" }) @Security(securitySchemaName, { scopes: ["method"] })
type E2EController ¶
type E2EController struct {
external.GleeceController // Embedding the GleeceController to inherit its methods
}
@Route(/e2e)
func (*E2EController) ContextAccess ¶ added in v1.0.5
func (ec *E2EController) ContextAccess() error
@Method(GET) @Route(/context-access)
func (*E2EController) CustomError ¶ added in v1.0.5
func (ec *E2EController) CustomError() CustomError
@Method(GET) @Route(/custom-error)
func (*E2EController) CustomError503 ¶ added in v1.0.5
func (ec *E2EController) CustomError503() CustomError
@Method(GET) @Route(/custom-error-503)
func (*E2EController) CustomPtrError ¶ added in v1.0.5
func (ec *E2EController) CustomPtrError() *CustomError
@Method(GET) @Route(/custom-error-ptr)
func (*E2EController) DefaultError ¶ added in v1.0.5
func (ec *E2EController) DefaultError() error
@Method(GET) @Route(/default-error)
func (*E2EController) DefaultErrorWithPayload ¶ added in v1.0.5
func (ec *E2EController) DefaultErrorWithPayload() (*string, error)
@Method(GET) @Route(/default-error-with-payload)
func (*E2EController) Delete ¶ added in v1.0.6
func (ec *E2EController) Delete() error
@Method(DELETE) @Route(/http-method)
func (*E2EController) Error503 ¶ added in v1.0.5
func (ec *E2EController) Error503() error
@Method(GET) @Route(/503-error-code)
func (*E2EController) Get ¶ added in v1.0.6
func (ec *E2EController) Get() error
@Method(GET) @Route(/http-method)
func (*E2EController) GetHeaderStartWithLetter ¶ added in v1.0.4
func (ec *E2EController) GetHeaderStartWithLetter(headerParam string) (string, error)
@Method(GET) This text is not part of the OpenAPI spec @Route(/get-header-start-with-letter) @Header(headerParam, { validate: "required,validate_starts_with_letter" })
func (*E2EController) GetWithAllParams ¶
func (ec *E2EController) GetWithAllParams(queryParam string, pathParam string, headerParam string) (string, error)
@Method(GET) This text is not part of the OpenAPI spec @Route(/get-with-all-params/{pathParam}) @Query(queryParam) @Path(pathParam) @Header(headerParam)
func (*E2EController) GetWithAllParamsPtr ¶
func (ec *E2EController) GetWithAllParamsPtr(queryParam *string, pathParam *string, headerParam *string) (string, error)
@Method(GET) This text is not part of the OpenAPI spec @Route(/get-with-all-params-ptr/{pathParam}) @Query(queryParam) @Path(pathParam) @Header(headerParam)
func (*E2EController) GetWithAllParamsRequiredPtr ¶
func (ec *E2EController) GetWithAllParamsRequiredPtr(queryParam *string, pathParam *string, headerParam *string) (string, error)
@Method(GET) This text is not part of the OpenAPI spec @Route(/get-with-all-params-required-ptr/{pathParam}) @Query(queryParam, { validate: "required" }) @Path(pathParam, { validate: "required" }) @Header(headerParam, { validate: "required" })
func (*E2EController) Patch ¶ added in v1.0.6
func (ec *E2EController) Patch() error
@Method(PATCH) @Route(/http-method)
func (*E2EController) Post ¶ added in v1.0.6
func (ec *E2EController) Post() error
@Method(POST) @Route(/http-method)
func (*E2EController) PostWithAllParamsWithBody ¶
func (ec *E2EController) PostWithAllParamsWithBody(queryParam string, headerParam string, theBody BodyInfo) (BodyInfo, error)
@Method(POST) This text is not part of the OpenAPI spec @Route(/post-with-all-params-body) @Query(queryParam) @Body(theBody) @Header(headerParam)
func (*E2EController) PostWithAllParamsWithBodyPtr ¶
func (ec *E2EController) PostWithAllParamsWithBodyPtr(queryParam *string, headerParam *string, theBody *BodyInfo) (*BodyInfo, error)
@Method(POST) This text is not part of the OpenAPI spec @Route(/post-with-all-params-body-ptr) @Query(queryParam) @Body(theBody) @Header(headerParam)
func (*E2EController) PostWithAllParamsWithBodyRequiredPtr ¶
func (ec *E2EController) PostWithAllParamsWithBodyRequiredPtr(theBody *BodyInfo) (*BodyInfo, error)
@Method(POST) This text is not part of the OpenAPI spec @Route(/post-with-all-params-body-required-ptr) @Body(theBody, { validate: "required" })
func (*E2EController) Put ¶ added in v1.0.6
func (ec *E2EController) Put() error
@Method(PUT) @Route(/http-method)
func (*E2EController) SimpleGet ¶
func (ec *E2EController) SimpleGet() (string, error)
@Method(GET) This text is not part of the OpenAPI spec @Route(/simple-get)
func (*E2EController) SimpleGetEmpty ¶ added in v1.0.5
func (ec *E2EController) SimpleGetEmpty(queryParam string) error
@Method(GET) @Route(/simple-get-empty) @Query(queryParam)
func (*E2EController) SimpleGetEmptyString ¶ added in v1.0.5
func (ec *E2EController) SimpleGetEmptyString() (string, error)
@Method(GET) This text is not part of the OpenAPI spec @Route(/simple-get-empty-string)
func (*E2EController) SimpleGetNullString ¶ added in v1.0.5
func (ec *E2EController) SimpleGetNullString() (*string, error)
@Method(GET) This text is not part of the OpenAPI spec @Route(/simple-get-null-string)
func (*E2EController) SimpleGetObject ¶ added in v1.0.5
func (ec *E2EController) SimpleGetObject() (BodyResponse, error)
@Method(GET) This text is not part of the OpenAPI spec @Route(/simple-get-object)
func (*E2EController) SimpleGetObjectNull ¶ added in v1.0.5
func (ec *E2EController) SimpleGetObjectNull() (*BodyResponse, error)
@Method(GET) This text is not part of the OpenAPI spec @Route(/simple-get-object-null)
func (*E2EController) SimpleGetObjectPtr ¶ added in v1.0.5
func (ec *E2EController) SimpleGetObjectPtr() (*BodyResponse, error)
@Method(GET) This text is not part of the OpenAPI spec @Route(/simple-get-object-ptr)
func (*E2EController) SimpleGetPtrString ¶ added in v1.0.5
func (ec *E2EController) SimpleGetPtrString() (*string, error)
@Method(GET) This text is not part of the OpenAPI spec @Route(/simple-get-ptr-string)
func (*E2EController) WithDefaultConfigSecurity ¶ added in v1.0.5
func (ec *E2EController) WithDefaultConfigSecurity(headerParam string) (string, error)
@Method(GET) @Header(headerParam, { name: "x-test-scopes" }) @Route(/with-default-config-security)
func (*E2EController) WithOneSecurity ¶ added in v1.0.5
func (ec *E2EController) WithOneSecurity(headerParam string) (string, error)
@Method(GET) @Route(/with-one-security) @Header(headerParam, { name: "x-test-scopes" }) @Security(securitySchemaName, { scopes: ["other"] })
func (*E2EController) WithTwoSecurity ¶ added in v1.0.5
func (ec *E2EController) WithTwoSecurity(headerParam string) (string, error)
@Method(GET) @Route(/with-two-security) @Header(headerParam, { name: "x-test-scopes" }) @Security(securitySchemaName, { scopes: ["other"] }) @Security(securitySchemaName2, { scopes: ["write", "read"] })
func (*E2EController) WithTwoSecuritySameMethod ¶ added in v1.0.5
func (ec *E2EController) WithTwoSecuritySameMethod(headerParam string) (string, error)
@Method(GET) @Route(/with-two-security-same-method) @Header(headerParam, { name: "x-test-scopes" }) @Security(securitySchemaName, { scopes: ["other"] }) @Security(securitySchemaName, { scopes: ["write", "read"] })