Documentation ¶
Overview ¶
Package config contains APIs used to work with injector configuration files, which are formed by FilenameOrchestrionToolGo and FilenameOrchestrionYML files.
Index ¶
Constants ¶
const FilenameOrchestrionToolGo = "orchestrion.tool.go"
const FilenameOrchestrionYML = "orchestrion.yml"
Variables ¶
var ErrInvalidGoPackage = errors.New("no .go files in package")
Functions ¶
func HasConfig ¶
HasConfig determines whether the specified package contains injector configuration, and optionally validates it.
func ValidateObject ¶
ValidateObject checks the provided object for conformance to the embedded JSON schema. Returns an error if the object does not conform to the schema.
Types ¶
type Config ¶
Config represents an injector's configuration. It can be obtained using Loader.Load.
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
Loader is a facility to load configuration from available sources.
func NewLoader ¶
NewLoader creates a new Loader in the specified directory. The directory is used to resolve relative paths and must be a valid Go package directory, meaning it must contain at least one `.go` file. If [Loader.validate] is true, the YAML documents will be validated against the JSON schema.