Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v0.8.0
type Config struct {
// Server settings
Server
// Request settings
Request
// Docs settings
Docs
// Logger settings
Logger *slog.Logger
}
Config is a struct that holds the application settings
type Docs ¶ added in v0.12.0
type Docs struct {
// GenerateOpenAPIDocs will determine if the API documentation (YAML or JSON) will be generated
GenerateOpenAPIDocs bool `default:"true"`
// MountDocsEndpoint will determine if the documentation UI will be mounted
MountDocsEndpoint bool `default:"true"`
// OpenAPIFileType is the type of the OpenAPI file (YAML or JSON)
OpenAPIFileType string `default:"application/yaml"`
// OpenAPIPath is the path to the OpenAPI YAML file
OpenAPIPath string `default:"/openapi.yml"`
// DocsPath is the path to the API documentation
DocsPath string `default:"/docs"`
// ServiceName is the name of the service
ServiceName string `default:"Simba Application"`
}
type Request ¶ added in v0.8.0
type Request struct {
// AllowUnknownFields will set the behavior for unknown fields in the Request body,
// resulting in a 400 Bad Request response if a field is present that cannot be
// mapped to the model struct.
AllowUnknownFields enums.AllowOrNot `default:"Disallow"`
// LogRequestBody will determine if the Request body will be logged
// If set to "disabled", the Request body will not be logged, which is also the default
LogRequestBody enums.EnableDisable `default:"Disabled"`
// RequestIdMode determines how the Request ID will be handled
RequestIdMode enums.RequestIdMode `default:"AcceptFromHeader"`
}
Request holds the Config for the Request processing
Click to show internal directories.
Click to hide internal directories.