Documentation
¶
Index ¶
- func BuildPostProcessV2(kindSchemas map[string]string) func(*spec.Swagger) (*spec.Swagger, error)
- func BuildPostProcessV3(kindSchemas map[string]string) func(*spec3.OpenAPI) (*spec3.OpenAPI, error)
- func ConfigureOpenAPI(cfg *genericapiserver.Config, kindSchemas map[string]string, ...)
- func KindSchemasFromConfig(rc *config.ResourceConfig) map[string]string
- func NewCommandStartCozyServer(ctx context.Context, defaults *CozyServerOptions) *cobra.Command
- type CozyServerOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildPostProcessV2 ¶ added in v1.2.0
----------------------------------------------------------------------------- OpenAPI **v2** (swagger) post-processor ----------------------------------------------------------------------------- BuildPostProcessV2 returns a Swagger post-processor that clones base Application schemas into per-kind schemas and rewrites $ref pointers.
func BuildPostProcessV3 ¶ added in v1.2.0
----------------------------------------------------------------------------- OpenAPI **v3** post-processor ----------------------------------------------------------------------------- BuildPostProcessV3 returns an OpenAPI v3 post-processor that clones base Application schemas into per-kind schemas and rewrites $ref pointers.
func ConfigureOpenAPI ¶ added in v1.2.0
func ConfigureOpenAPI(cfg *genericapiserver.Config, kindSchemas map[string]string, title, version string)
ConfigureOpenAPI sets up OpenAPI v2 and v3 on a GenericAPIServer Config, including the post-processors that clone Application schemas to per-kind schemas.
func KindSchemasFromConfig ¶ added in v1.2.0
func KindSchemasFromConfig(rc *config.ResourceConfig) map[string]string
KindSchemasFromConfig extracts the kind→OpenAPISchema mapping from a ResourceConfig.
func NewCommandStartCozyServer ¶ added in v0.37.0
func NewCommandStartCozyServer(ctx context.Context, defaults *CozyServerOptions) *cobra.Command
NewCommandStartCozyServer provides a CLI handler for the 'start apps-server' command
Types ¶
type CozyServerOptions ¶ added in v0.37.0
type CozyServerOptions struct {
RecommendedOptions *genericoptions.RecommendedOptions
StdOut io.Writer
StdErr io.Writer
AlternateDNS []string
Client client.Client
// Add a field to store the configuration
ResourceConfig *config.ResourceConfig
}
CozyServerOptions holds the state for the Cozy API server
func NewCozyServerOptions ¶ added in v0.37.0
func NewCozyServerOptions(out, errOut io.Writer) *CozyServerOptions
NewCozyServerOptions returns a new instance of CozyServerOptions
func (*CozyServerOptions) Complete ¶ added in v0.37.0
func (o *CozyServerOptions) Complete() error
Complete fills in the fields that are not set
func (*CozyServerOptions) Config ¶ added in v0.37.0
func (o *CozyServerOptions) Config() (*apiserver.Config, error)
Config returns the configuration for the API server based on CozyServerOptions
func (CozyServerOptions) RunCozyServer ¶ added in v0.37.0
func (o CozyServerOptions) RunCozyServer(ctx context.Context) error
RunCozyServer launches a new CozyServer based on CozyServerOptions
func (CozyServerOptions) Validate ¶ added in v0.37.0
func (o CozyServerOptions) Validate(args []string) error
Validate checks the correctness of the options