spec

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 14, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArchV1Allow

type ArchV1Allow struct {
	V1DepOnAnyVendor bool `yaml:"depOnAnyVendor" json:"depOnAnyVendor"`
	// contains filtered or unexported fields
}

func (ArchV1Allow) IsDependOnAnyVendor

func (opt ArchV1Allow) IsDependOnAnyVendor() speca.ReferableBool

func (ArchV1Allow) Reference

func (opt ArchV1Allow) Reference() models.Reference

type ArchV1Component

type ArchV1Component struct {
	V1LocalPath string `yaml:"in" json:"in"`
	// contains filtered or unexported fields
}

func (ArchV1Component) Reference

func (c ArchV1Component) Reference() models.Reference

func (ArchV1Component) RelativePaths

func (c ArchV1Component) RelativePaths() []speca.ReferableString

type ArchV1Document

type ArchV1Document struct {
	V1Version            int                                    `yaml:"version" json:"version"`
	V1Allow              ArchV1Allow                            `yaml:"allow" json:"allow"`
	V1Vendors            map[arch.VendorName]ArchV1Vendor       `yaml:"vendors" json:"vendors"`
	V1Exclude            []string                               `yaml:"exclude" json:"exclude"`
	V1ExcludeFilesRegExp []string                               `yaml:"excludeFiles" json:"excludeFiles"`
	V1Components         map[arch.ComponentName]ArchV1Component `yaml:"components" json:"components"`
	V1Dependencies       map[arch.ComponentName]ArchV1Rules     `yaml:"deps" json:"deps"`
	V1CommonComponents   []string                               `yaml:"commonComponents" json:"commonComponents"`
	V1CommonVendors      []string                               `yaml:"commonVendors" json:"commonVendors"`
	// contains filtered or unexported fields
}

func (ArchV1Document) CommonComponents

func (doc ArchV1Document) CommonComponents() arch.CommonComponents

func (ArchV1Document) CommonVendors

func (doc ArchV1Document) CommonVendors() arch.CommonVendors

func (ArchV1Document) Components

func (doc ArchV1Document) Components() arch.Components

func (ArchV1Document) Dependencies

func (doc ArchV1Document) Dependencies() arch.Dependencies

func (ArchV1Document) ExcludedDirectories

func (doc ArchV1Document) ExcludedDirectories() arch.ExcludedDirectories

func (ArchV1Document) ExcludedFilesRegExp

func (doc ArchV1Document) ExcludedFilesRegExp() arch.ExcludedFilesRegExp

func (ArchV1Document) Options

func (doc ArchV1Document) Options() arch.Options

func (ArchV1Document) Reference

func (doc ArchV1Document) Reference() models.Reference

func (ArchV1Document) Vendors

func (doc ArchV1Document) Vendors() arch.Vendors

func (ArchV1Document) Version

func (doc ArchV1Document) Version() speca.ReferableInt

func (ArchV1Document) WorkingDirectory

func (doc ArchV1Document) WorkingDirectory() speca.ReferableString

type ArchV1Rules

type ArchV1Rules struct {
	V1MayDependOn    []string `yaml:"mayDependOn" json:"mayDependOn"`
	V1CanUse         []string `yaml:"canUse" json:"canUse"`
	V1AnyProjectDeps bool     `yaml:"anyProjectDeps" json:"anyProjectDeps"`
	V1AnyVendorDeps  bool     `yaml:"anyVendorDeps" json:"anyVendorDeps"`
	// contains filtered or unexported fields
}

func (ArchV1Rules) AnyProjectDeps

func (rule ArchV1Rules) AnyProjectDeps() speca.ReferableBool

func (ArchV1Rules) AnyVendorDeps

func (rule ArchV1Rules) AnyVendorDeps() speca.ReferableBool

func (ArchV1Rules) CanUse

func (rule ArchV1Rules) CanUse() []speca.ReferableString

func (ArchV1Rules) MayDependOn

func (rule ArchV1Rules) MayDependOn() []speca.ReferableString

func (ArchV1Rules) Reference

func (rule ArchV1Rules) Reference() models.Reference

type ArchV1Vendor

type ArchV1Vendor struct {
	V1ImportPath string `yaml:"in" json:"in"`
	// contains filtered or unexported fields
}

func (ArchV1Vendor) ImportPaths

func (v ArchV1Vendor) ImportPaths() []speca.ReferableString

func (ArchV1Vendor) Reference

func (v ArchV1Vendor) Reference() models.Reference

type ArchV2Allow

type ArchV2Allow struct {
	V2DepOnAnyVendor bool `yaml:"depOnAnyVendor" json:"depOnAnyVendor"`
	// contains filtered or unexported fields
}

func (ArchV2Allow) IsDependOnAnyVendor

func (opt ArchV2Allow) IsDependOnAnyVendor() speca.ReferableBool

func (ArchV2Allow) Reference

func (opt ArchV2Allow) Reference() models.Reference

type ArchV2Component

type ArchV2Component struct {
	V2LocalPaths stringsList `yaml:"in" json:"in"`
	// contains filtered or unexported fields
}

func (ArchV2Component) Reference

func (c ArchV2Component) Reference() models.Reference

func (ArchV2Component) RelativePaths

func (c ArchV2Component) RelativePaths() []speca.ReferableString

type ArchV2Document

type ArchV2Document struct {
	V2Version            int                                    `yaml:"version" json:"version"`
	V2WorkDir            string                                 `yaml:"workdir" json:"workdir"`
	V2Allow              ArchV2Allow                            `yaml:"allow" json:"allow"`
	V2Vendors            map[arch.VendorName]ArchV2Vendor       `yaml:"vendors" json:"vendors"`
	V2Exclude            []string                               `yaml:"exclude" json:"exclude"`
	V2ExcludeFilesRegExp []string                               `yaml:"excludeFiles" json:"excludeFiles"`
	V2Components         map[arch.ComponentName]ArchV2Component `yaml:"components" json:"components"`
	V2Dependencies       map[arch.ComponentName]ArchV2Rules     `yaml:"deps" json:"deps"`
	V2CommonComponents   []string                               `yaml:"commonComponents" json:"commonComponents"`
	V2CommonVendors      []string                               `yaml:"commonVendors" json:"commonVendors"`
	// contains filtered or unexported fields
}

func (ArchV2Document) CommonComponents

func (doc ArchV2Document) CommonComponents() arch.CommonComponents

func (ArchV2Document) CommonVendors

func (doc ArchV2Document) CommonVendors() arch.CommonVendors

func (ArchV2Document) Components

func (doc ArchV2Document) Components() arch.Components

func (ArchV2Document) Dependencies

func (doc ArchV2Document) Dependencies() arch.Dependencies

func (ArchV2Document) ExcludedDirectories

func (doc ArchV2Document) ExcludedDirectories() arch.ExcludedDirectories

func (ArchV2Document) ExcludedFilesRegExp

func (doc ArchV2Document) ExcludedFilesRegExp() arch.ExcludedFilesRegExp

func (ArchV2Document) Options

func (doc ArchV2Document) Options() arch.Options

func (ArchV2Document) Reference

func (doc ArchV2Document) Reference() models.Reference

func (ArchV2Document) Vendors

func (doc ArchV2Document) Vendors() arch.Vendors

func (ArchV2Document) Version

func (doc ArchV2Document) Version() speca.ReferableInt

func (ArchV2Document) WorkingDirectory

func (doc ArchV2Document) WorkingDirectory() speca.ReferableString

type ArchV2Rules

type ArchV2Rules struct {
	V2MayDependOn    []string `yaml:"mayDependOn" json:"mayDependOn"`
	V2CanUse         []string `yaml:"canUse" json:"canUse"`
	V2AnyProjectDeps bool     `yaml:"anyProjectDeps" json:"anyProjectDeps"`
	V2AnyVendorDeps  bool     `yaml:"anyVendorDeps" json:"anyVendorDeps"`
	// contains filtered or unexported fields
}

func (ArchV2Rules) AnyProjectDeps

func (rule ArchV2Rules) AnyProjectDeps() speca.ReferableBool

func (ArchV2Rules) AnyVendorDeps

func (rule ArchV2Rules) AnyVendorDeps() speca.ReferableBool

func (ArchV2Rules) CanUse

func (rule ArchV2Rules) CanUse() []speca.ReferableString

func (ArchV2Rules) MayDependOn

func (rule ArchV2Rules) MayDependOn() []speca.ReferableString

func (ArchV2Rules) Reference

func (rule ArchV2Rules) Reference() models.Reference

type ArchV2Vendor

type ArchV2Vendor struct {
	V2ImportPaths stringsList `yaml:"in" json:"in"`
	// contains filtered or unexported fields
}

func (ArchV2Vendor) ImportPaths

func (v ArchV2Vendor) ImportPaths() []speca.ReferableString

func (ArchV2Vendor) Reference

func (v ArchV2Vendor) Reference() models.Reference

type JSONSchemaProvider

type JSONSchemaProvider interface {
	Provide(version int) (string, error)
}

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

func NewProvider

func NewProvider(
	yamlReferenceResolver YAMLSourceCodeReferenceResolver,
	jsonSchemaProvider JSONSchemaProvider,
	sourceCode []byte,
) *Provider

func (*Provider) Provide

func (sp *Provider) Provide() (arch.Document, []speca.Notice, error)

type YAMLSourceCodeReferenceResolver

type YAMLSourceCodeReferenceResolver interface {
	Resolve(yamlPath string) models.Reference
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL