Documentation ¶
Index ¶
- func ResourceSpecFiles(rcConfig *config.ResourceSet) ([]string, error)
- type Compiler
- func (c *Compiler) Build(ctx context.Context, apiName string) error
- func (c *Compiler) BuildAll(ctx context.Context) error
- func (c *Compiler) LintOutput(ctx context.Context, apiName string) error
- func (c *Compiler) LintOutputAll(ctx context.Context) error
- func (c *Compiler) LintResources(ctx context.Context, apiName string) error
- func (c *Compiler) LintResourcesAll(ctx context.Context) error
- type CompilerOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResourceSpecFiles ¶
func ResourceSpecFiles(rcConfig *config.ResourceSet) ([]string, error)
ResourceSpecFiles returns all matching spec files for a config.Resource.
Types ¶
type Compiler ¶
type Compiler struct {
// contains filtered or unexported fields
}
A Compiler checks and builds versioned API resource inputs into aggregated OpenAPI versioned outputs, as determined by an API project configuration.
func (*Compiler) Build ¶
Build builds an aggregate versioned OpenAPI spec for a specific API by name in the project.
func (*Compiler) LintOutput ¶
LintOutput applies configured linting rules to the build output.
func (*Compiler) LintOutputAll ¶
LintOutputAll lints output of all APIs in the project.
func (*Compiler) LintResources ¶
LintResources checks the inputs of an API's resources with the configured linter.
type CompilerOption ¶
CompilerOption applies a configuration option to a Compiler.
func LinterFactory ¶
func LinterFactory(f func(ctx context.Context, lc *config.Linter) (linter.Linter, error)) CompilerOption
LinterFactory configures a Compiler to use a custom factory function for instantiating Linters.