Documentation ¶
Index ¶
- Constants
- type DefaultPreset
- func (dp *DefaultPreset) ForceFilters() bool
- func (dp *DefaultPreset) GetCacheDir() string
- func (dp *DefaultPreset) GetFilters() *Filters
- func (dp *DefaultPreset) GetFiltersForDependency(*Dependency) *Filters
- func (dp *DefaultPreset) GetPresetName() string
- func (dp *DefaultPreset) GetSpecFilename() string
- func (dp *DefaultPreset) GetSpecLockFilename() string
- func (dp *DefaultPreset) GetVendorDir() string
- type Dependency
- type DependencyLock
- type Filters
- func (f *Filters) AddExtension(extension ...string) *Filters
- func (f *Filters) AddIgnore(ignore ...string) *Filters
- func (f *Filters) AddTarget(target ...string) *Filters
- func (f *Filters) ApplyDep(preset Preset, dep *Dependency) *Filters
- func (f *Filters) ApplyFilters(filters *Filters) *Filters
- func (f *Filters) ApplyPreset(preset Preset) *Filters
- func (f *Filters) Clone() *Filters
- type Preset
- type Spec
- type SpecLock
Constants ¶
View Source
const VERSION = "0.2.0"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultPreset ¶
type DefaultPreset struct{}
DefaultPreset provides the default configuration for the vendor library.
func (*DefaultPreset) ForceFilters ¶
func (dp *DefaultPreset) ForceFilters() bool
func (*DefaultPreset) GetCacheDir ¶
func (dp *DefaultPreset) GetCacheDir() string
func (*DefaultPreset) GetFilters ¶
func (dp *DefaultPreset) GetFilters() *Filters
func (*DefaultPreset) GetFiltersForDependency ¶
func (dp *DefaultPreset) GetFiltersForDependency(*Dependency) *Filters
func (*DefaultPreset) GetPresetName ¶
func (dp *DefaultPreset) GetPresetName() string
func (*DefaultPreset) GetSpecFilename ¶
func (dp *DefaultPreset) GetSpecFilename() string
func (*DefaultPreset) GetSpecLockFilename ¶
func (dp *DefaultPreset) GetSpecLockFilename() string
func (*DefaultPreset) GetVendorDir ¶
func (dp *DefaultPreset) GetVendorDir() string
type Dependency ¶
type Dependency struct { URL string `yaml:"url"` Branch string `yaml:"branch"` Filters *Filters `yaml:",inline"` }
func NewDependency ¶
func NewDependency(url, branch string) *Dependency
func (*Dependency) ID ¶
func (d *Dependency) ID() string
func (*Dependency) Update ¶
func (d *Dependency) Update(other *Dependency)
type DependencyLock ¶
func NewDependencyLock ¶
func NewDependencyLock(url, commit string) *DependencyLock
type Filters ¶
type Filters struct { Extensions []string `yaml:"extensions,omitempty"` Targets []string `yaml:"targets,omitempty"` Ignores []string `yaml:"ignores,omitempty"` }
func NewFilters ¶
func NewFilters() *Filters
func (*Filters) AddExtension ¶
func (*Filters) ApplyFilters ¶
func (*Filters) ApplyPreset ¶
type Preset ¶
type Preset interface { // GetPresetName returns the name for this preset GetPresetName() string // GetVendorDir returns the name for the vendor folder GetVendorDir() string // GetSpecFilename returns the name of the spec file GetSpecFilename() string // GetSpecLockFilename returns the name of the spec lock file GetSpecLockFilename() string // GetFilters returns the global filters of the preset GetFilters() *Filters // GetFiltersForDependency returns the specific filters for a dependency GetFiltersForDependency(*Dependency) *Filters // ForceFilters flag returns wether the preset will force the overriding of // the spec or dependency filters to the preset ones ForceFilters() bool // GetCacheDir returns the path where the repository cache will be kept GetCacheDir() string }
Preset interface used to customize the behaviour of the vendor library. It allows customizing anything you need, like the names of the spec and lock file, also allows customizing the targeted and ignored paths.
type Spec ¶
type Spec struct { Version string `yaml:"version"` PresetName string `yaml:"preset"` VendorDir string `yaml:"vendor_dir,omitempty"` Filters *Filters `yaml:",inline"` Deps []*Dependency `yaml:"deps"` // contains filtered or unexported fields }
func (*Spec) AddDependency ¶
func (s *Spec) AddDependency(dependency *Dependency)
type SpecLock ¶
type SpecLock struct { Version string `yaml:"version"` Deps []*DependencyLock `yaml:"deps"` // contains filtered or unexported fields }
func LoadSpecLock ¶
func NewSpecLock ¶
func (*SpecLock) AddDependencyLock ¶
func (s *SpecLock) AddDependencyLock(lock *DependencyLock)
Click to show internal directories.
Click to hide internal directories.