Documentation ¶
Index ¶
- type Definition
- func (def *Definition) FromAbsoluteFile(filePath arch.PathAbsolute) (arch.Spec, error)
- func (def *Definition) FromCode(builders ...cfg.Factory) (arch.Spec, error)
- func (def *Definition) FromDefaultFile() (arch.Spec, error)
- func (def *Definition) FromRelativeFile(path arch.PathRelative) (arch.Spec, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Definition ¶
type Definition struct {
// contains filtered or unexported fields
}
func NewDefinition ¶
func NewDefinition( projectPath arch.PathAbsolute, usedContext arch.UsedContext, reader reader, validator validator, assembler assembler, ) *Definition
func (*Definition) FromAbsoluteFile ¶
func (def *Definition) FromAbsoluteFile(filePath arch.PathAbsolute) (arch.Spec, error)
FromAbsoluteFile will find and parse config file in any directory, but all paths defined inside config will be related to project directory anyway see also: FromRelativeFile
func (*Definition) FromCode ¶
FromCode will transform GO code struct into config and then build spec from this config for example:
- FromAbsoluteFile -> will read .yml as `config` and build arch.Spec from it
- FromCode -> will transform preConfig into `config` and build arch.Spec from it
func (*Definition) FromDefaultFile ¶
func (def *Definition) FromDefaultFile() (arch.Spec, error)
FromDefaultFile will parse config from "{projectDirectory}/.go-arch-lint.yml" see also: FromRelativeFile, FromAbsoluteFile
func (*Definition) FromRelativeFile ¶
func (def *Definition) FromRelativeFile(path arch.PathRelative) (arch.Spec, error)
FromRelativeFile will find and parse config file RELATIVE to your project directory you can also use FromDefaultFile() (for use default file ".go-arch-lint.yml")
Source Files ¶
Click to show internal directories.
Click to hide internal directories.