Documentation
¶
Overview ¶
Package generated provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.0 DO NOT EDIT.
Index ¶
- func GetSpec() (swagger *openapi3.T, err error)
- func GetSpecJSON() ([]byte, error)
- func GetSwagger() (*openapi3.T, error)deprecated
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- func RegisterHandlers(router gin.IRouter, si ServerInterface)
- func RegisterHandlersWithOptions(router gin.IRouter, si ServerInterface, options GinServerOptions)
- type CreateInstanceJSONRequestBody
- type ErrorResponse
- type GinServerOptions
- type MiddlewareFunc
- type ReleaseChannelResponse
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) CreateInstance(c *gin.Context)
- func (siw *ServerInterfaceWrapper) DeleteInstance(c *gin.Context)
- func (siw *ServerInterfaceWrapper) GetChannel(c *gin.Context)
- func (siw *ServerInterfaceWrapper) GetInstance(c *gin.Context)
- func (siw *ServerInterfaceWrapper) ListChannels(c *gin.Context)
- func (siw *ServerInterfaceWrapper) ListInstances(c *gin.Context)
- func (siw *ServerInterfaceWrapper) UpdateInstance(c *gin.Context)
- type Unleash
- type UnleashConfigRequest
- type UnleashConfigRequestLogLevel
- type UpdateInstanceJSONRequestBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSpec ¶
GetSpec returns the OpenAPI specification corresponding to the generated code in this file. External references in the spec are resolved through PathToRawSpec; externally-referenced files must be embedded in their corresponding Go packages (via the import-mapping feature). URL-based external refs are not supported.
func GetSpecJSON ¶
GetSpecJSON returns the raw JSON bytes of the embedded OpenAPI specification: decompressed but not unmarshaled. External references are not resolved here; the bytes are the spec exactly as embedded by codegen. The result is cached at package init time, so repeated calls are cheap.
func GetSwagger
deprecated
func PathToRawSpec ¶
Constructs a synthetic filesystem for resolving external references when loading openapi specifications.
func RegisterHandlers ¶
func RegisterHandlers(router gin.IRouter, si ServerInterface)
RegisterHandlers creates http.Handler with routing matching OpenAPI spec.
func RegisterHandlersWithOptions ¶
func RegisterHandlersWithOptions(router gin.IRouter, si ServerInterface, options GinServerOptions)
RegisterHandlersWithOptions creates http.Handler with additional options
Types ¶
type CreateInstanceJSONRequestBody ¶
type CreateInstanceJSONRequestBody = UnleashConfigRequest
CreateInstanceJSONRequestBody defines body for CreateInstance for application/json ContentType.
type ErrorResponse ¶
type ErrorResponse struct {
// Details Additional error details
Details *map[string]string `json:"details,omitempty"`
// Error Error code/identifier
Error string `json:"error"`
// Message Human-readable error message
Message string `json:"message"`
// StatusCode HTTP status code
StatusCode int `json:"status_code"`
}
ErrorResponse Standard error response structure
type GinServerOptions ¶
type GinServerOptions struct {
BaseURL string
Middlewares []MiddlewareFunc
ErrorHandler func(*gin.Context, error, int)
}
GinServerOptions provides options for the Gin server.
type MiddlewareFunc ¶
type ReleaseChannelResponse ¶
type ReleaseChannelResponse struct {
// CreatedAt Timestamp when the release channel was created (RFC3339 format)
CreatedAt time.Time `json:"created_at"`
// CurrentVersion Current version tracked by the release channel status
CurrentVersion string `json:"current_version"`
// Description **Deprecated:** This field is reserved for future use and always returns an empty string.
// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
Description *string `json:"description,omitempty"`
// Image Full container image reference including tag
Image string `json:"image"`
// LastUpdated Timestamp when the release channel image was last changed (RFC3339 format)
LastUpdated *time.Time `json:"last_updated,omitempty"`
// Name Unique identifier of the release channel (e.g., "stable", "rapid")
Name string `json:"name"`
// Schedule **Deprecated:** This field is reserved for future use and always returns an empty string.
// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
Schedule *string `json:"schedule,omitempty"`
// Type **Deprecated:** This field is reserved for future use and always returns an empty string.
// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
Type *string `json:"type,omitempty"`
// Version **Deprecated:** Use 'image' instead. This field returns the same value as 'image'.
// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
Version *string `json:"version,omitempty"`
}
ReleaseChannelResponse Release channel information for Unleash version management
type ServerInterface ¶
type ServerInterface interface {
// List all release channels
// (GET /v1/releasechannels)
ListChannels(c *gin.Context)
// Get a release channel by name
// (GET /v1/releasechannels/{name})
GetChannel(c *gin.Context, name string)
// List all Unleash instances
// (GET /v1/unleash)
ListInstances(c *gin.Context)
// Create a new Unleash instance
// (POST /v1/unleash)
CreateInstance(c *gin.Context)
// Delete an Unleash instance
// (DELETE /v1/unleash/{name})
DeleteInstance(c *gin.Context, name string)
// Get Unleash instance by name
// (GET /v1/unleash/{name})
GetInstance(c *gin.Context, name string)
// Update an existing Unleash instance
// (PUT /v1/unleash/{name})
UpdateInstance(c *gin.Context, name string)
}
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
HandlerMiddlewares []MiddlewareFunc
ErrorHandler func(*gin.Context, error, int)
}
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) CreateInstance ¶
func (siw *ServerInterfaceWrapper) CreateInstance(c *gin.Context)
CreateInstance operation middleware
func (*ServerInterfaceWrapper) DeleteInstance ¶
func (siw *ServerInterfaceWrapper) DeleteInstance(c *gin.Context)
DeleteInstance operation middleware
func (*ServerInterfaceWrapper) GetChannel ¶
func (siw *ServerInterfaceWrapper) GetChannel(c *gin.Context)
GetChannel operation middleware
func (*ServerInterfaceWrapper) GetInstance ¶
func (siw *ServerInterfaceWrapper) GetInstance(c *gin.Context)
GetInstance operation middleware
func (*ServerInterfaceWrapper) ListChannels ¶
func (siw *ServerInterfaceWrapper) ListChannels(c *gin.Context)
ListChannels operation middleware
func (*ServerInterfaceWrapper) ListInstances ¶
func (siw *ServerInterfaceWrapper) ListInstances(c *gin.Context)
ListInstances operation middleware
func (*ServerInterfaceWrapper) UpdateInstance ¶
func (siw *ServerInterfaceWrapper) UpdateInstance(c *gin.Context)
UpdateInstance operation middleware
type Unleash ¶
type Unleash struct {
ApiVersion *string `json:"apiVersion,omitempty"`
Kind *string `json:"kind,omitempty"`
Metadata *struct {
CreationTimestamp *time.Time `json:"creationTimestamp,omitempty"`
Name *string `json:"name,omitempty"`
Namespace *string `json:"namespace,omitempty"`
} `json:"metadata,omitempty"`
// Spec Desired state of the Unleash instance
Spec *struct {
// CustomImage Custom container image override
CustomImage *string `json:"customImage,omitempty"`
// Federation Federation configuration
Federation *struct {
AllowedClusters *[]string `json:"allowedClusters,omitempty"`
AllowedTeams *[]string `json:"allowedTeams,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
} `json:"federation,omitempty"`
// ReleaseChannel Release channel configuration for automatic version updates
ReleaseChannel *struct {
// Name Name of the release channel
Name *string `json:"name,omitempty"`
} `json:"releaseChannel,omitempty"`
} `json:"spec,omitempty"`
// Status Observed state of the Unleash instance
Status *struct {
// Connected Connection status to database
Connected *bool `json:"connected,omitempty"`
// Version Current running version
Version *string `json:"version,omitempty"`
} `json:"status,omitempty"`
}
Unleash Unleash CRD (Custom Resource Definition) representing an Unleash feature flag server instance. This is a Kubernetes resource managed by the unleasherator operator.
type UnleashConfigRequest ¶
type UnleashConfigRequest struct {
// AllowedClusters Comma-separated list of allowed clusters for federation
AllowedClusters *string `json:"allowed_clusters,omitempty"`
// AllowedTeams Comma-separated list of allowed teams for federation
AllowedTeams *string `json:"allowed_teams,omitempty"`
// DatabasePoolIdleTimeoutMs Database connection idle timeout in milliseconds
DatabasePoolIdleTimeoutMs *int `json:"database_pool_idle_timeout_ms,omitempty"`
// DatabasePoolMax Maximum number of database connections
DatabasePoolMax *int `json:"database_pool_max,omitempty"`
// EnableFederation Enable federation support (always enabled for managed instances)
EnableFederation *bool `json:"enable_federation,omitempty"`
// LogLevel Log level for the Unleash instance
LogLevel *UnleashConfigRequestLogLevel `json:"log_level,omitempty"`
// Name Name of the Unleash instance
Name *string `json:"name,omitempty"`
// ReleaseChannelName Name of the release channel to use for automatic version updates
ReleaseChannelName *string `json:"release_channel_name,omitempty"`
}
UnleashConfigRequest Request body for creating or updating an Unleash instance
type UnleashConfigRequestLogLevel ¶
type UnleashConfigRequestLogLevel string
UnleashConfigRequestLogLevel Log level for the Unleash instance
const ( Debug UnleashConfigRequestLogLevel = "debug" Error UnleashConfigRequestLogLevel = "error" Fatal UnleashConfigRequestLogLevel = "fatal" Info UnleashConfigRequestLogLevel = "info" Warn UnleashConfigRequestLogLevel = "warn" )
Defines values for UnleashConfigRequestLogLevel.
func (UnleashConfigRequestLogLevel) Valid ¶
func (e UnleashConfigRequestLogLevel) Valid() bool
Valid indicates whether the value is a known member of the UnleashConfigRequestLogLevel enum.
type UpdateInstanceJSONRequestBody ¶
type UpdateInstanceJSONRequestBody = UnleashConfigRequest
UpdateInstanceJSONRequestBody defines body for UpdateInstance for application/json ContentType.