Documentation ¶
Index ¶
- Constants
- type Config
- func (*Config) Descriptor() ([]byte, []int)
- func (m *Config) GetImports() []*Import
- func (m *Config) GetLocal() *Local
- func (m *Config) GetSettings() *FactorySettings
- func (*Config) ProtoMessage()
- func (m *Config) Reset()
- func (m *Config) String() string
- func (m *Config) Validate() error
- func (m *Config) XXX_DiscardUnknown()
- func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Config) XXX_Merge(src proto.Message)
- func (m *Config) XXX_Size() int
- func (m *Config) XXX_Unmarshal(b []byte) error
- type ConfigValidationError
- type FactorySettings
- func (*FactorySettings) Descriptor() ([]byte, []int)
- func (m *FactorySettings) GetCwd() string
- func (m *FactorySettings) GetSkipPatterns() []string
- func (*FactorySettings) ProtoMessage()
- func (m *FactorySettings) Reset()
- func (m *FactorySettings) String() string
- func (m *FactorySettings) Validate() error
- func (m *FactorySettings) XXX_DiscardUnknown()
- func (m *FactorySettings) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *FactorySettings) XXX_Merge(src proto.Message)
- func (m *FactorySettings) XXX_Size() int
- func (m *FactorySettings) XXX_Unmarshal(b []byte) error
- type FactorySettingsValidationError
- func (e FactorySettingsValidationError) Cause() error
- func (e FactorySettingsValidationError) Error() string
- func (e FactorySettingsValidationError) ErrorName() string
- func (e FactorySettingsValidationError) Field() string
- func (e FactorySettingsValidationError) Key() bool
- func (e FactorySettingsValidationError) Reason() string
- type GoModImport
- func (*GoModImport) Descriptor() ([]byte, []int)
- func (m *GoModImport) GetPackage() string
- func (m *GoModImport) GetPatterns() []string
- func (*GoModImport) ProtoMessage()
- func (m *GoModImport) Reset()
- func (m *GoModImport) String() string
- func (m *GoModImport) Validate() error
- func (m *GoModImport) XXX_DiscardUnknown()
- func (m *GoModImport) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GoModImport) XXX_Merge(src proto.Message)
- func (m *GoModImport) XXX_Size() int
- func (m *GoModImport) XXX_Unmarshal(b []byte) error
- type GoModImportValidationError
- func (e GoModImportValidationError) Cause() error
- func (e GoModImportValidationError) Error() string
- func (e GoModImportValidationError) ErrorName() string
- func (e GoModImportValidationError) Field() string
- func (e GoModImportValidationError) Key() bool
- func (e GoModImportValidationError) Reason() string
- type Import
- func (*Import) Descriptor() ([]byte, []int)
- func (m *Import) GetGoMod() *GoModImport
- func (m *Import) GetImportType() isImport_ImportType
- func (*Import) ProtoMessage()
- func (m *Import) Reset()
- func (m *Import) String() string
- func (m *Import) Validate() error
- func (m *Import) XXX_DiscardUnknown()
- func (m *Import) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Import) XXX_Merge(src proto.Message)
- func (*Import) XXX_OneofWrappers() []interface{}
- func (m *Import) XXX_Size() int
- func (m *Import) XXX_Unmarshal(b []byte) error
- type ImportValidationError
- type Import_GoMod
- type Local
- func (*Local) Descriptor() ([]byte, []int)
- func (m *Local) GetPatterns() []string
- func (*Local) ProtoMessage()
- func (m *Local) Reset()
- func (m *Local) String() string
- func (m *Local) Validate() error
- func (m *Local) XXX_DiscardUnknown()
- func (m *Local) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Local) XXX_Merge(src proto.Message)
- func (m *Local) XXX_Size() int
- func (m *Local) XXX_Unmarshal(b []byte) error
- type LocalValidationError
Constants ¶
const ( // default directory into which proto, and other files will be vendored. // Originally this was meant to be the vendor directory, but clashes with the go vendor directory // meant it would be easier for this to inhabit it's own folder // See this section for more info: https://tip.golang.org/doc/go1.14#go-command // This tool should not force to projects to build using vendor. DefaultDepDir = "vendor_any" ProtoMatchPattern = "**/*.proto" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // files to be vendored from current repo Local *Local `protobuf:"bytes,1,opt,name=local,proto3" json:"local,omitempty"` // list of external imports to be vendored in Imports []*Import `protobuf:"bytes,2,rep,name=imports,proto3" json:"imports,omitempty"` Settings *FactorySettings `protobuf:"bytes,3,opt,name=settings,proto3" json:"settings,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Config object used for running anyvendor. The top level config consists of 2 main sections.
Local is a set of matchers will be taken directly from the local module, and vendored in. Imports is a list of import types which will be run, and then vendored.
func (*Config) Descriptor ¶
func (*Config) GetImports ¶
func (*Config) GetSettings ¶ added in v0.0.2
func (m *Config) GetSettings() *FactorySettings
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) Validate ¶
Validate checks the field values on Config with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
func (*Config) XXX_DiscardUnknown ¶
func (m *Config) XXX_DiscardUnknown()
func (*Config) XXX_Marshal ¶
func (*Config) XXX_Unmarshal ¶
type ConfigValidationError ¶
type ConfigValidationError struct {
// contains filtered or unexported fields
}
ConfigValidationError is the validation error returned by Config.Validate if the designated constraints aren't met.
func (ConfigValidationError) Cause ¶
func (e ConfigValidationError) Cause() error
Cause function returns cause value.
func (ConfigValidationError) Error ¶
func (e ConfigValidationError) Error() string
Error satisfies the builtin error interface
func (ConfigValidationError) ErrorName ¶
func (e ConfigValidationError) ErrorName() string
ErrorName returns error name.
func (ConfigValidationError) Field ¶
func (e ConfigValidationError) Field() string
Field function returns field value.
func (ConfigValidationError) Key ¶
func (e ConfigValidationError) Key() bool
Key function returns key value.
func (ConfigValidationError) Reason ¶
func (e ConfigValidationError) Reason() string
Reason function returns reason value.
type FactorySettings ¶ added in v0.0.2
type FactorySettings struct { // Example: [**/node_modules/**] // Any paths which start the string `node_modules` will be skipped over by the copier. SkipPatterns []string `protobuf:"bytes,1,rep,name=skip_patterns,json=skipPatterns,proto3" json:"skip_patterns,omitempty"` // Current working directory Cwd string `protobuf:"bytes,2,opt,name=cwd,proto3" json:"cwd,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
a message for settings which is passed to the factories at startup
func (*FactorySettings) Descriptor ¶ added in v0.0.2
func (*FactorySettings) Descriptor() ([]byte, []int)
func (*FactorySettings) GetCwd ¶ added in v0.0.2
func (m *FactorySettings) GetCwd() string
func (*FactorySettings) GetSkipPatterns ¶ added in v0.0.2
func (m *FactorySettings) GetSkipPatterns() []string
func (*FactorySettings) ProtoMessage ¶ added in v0.0.2
func (*FactorySettings) ProtoMessage()
func (*FactorySettings) Reset ¶ added in v0.0.2
func (m *FactorySettings) Reset()
func (*FactorySettings) String ¶ added in v0.0.2
func (m *FactorySettings) String() string
func (*FactorySettings) Validate ¶ added in v0.0.2
func (m *FactorySettings) Validate() error
Validate checks the field values on FactorySettings with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
func (*FactorySettings) XXX_DiscardUnknown ¶ added in v0.0.2
func (m *FactorySettings) XXX_DiscardUnknown()
func (*FactorySettings) XXX_Marshal ¶ added in v0.0.2
func (m *FactorySettings) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*FactorySettings) XXX_Merge ¶ added in v0.0.2
func (m *FactorySettings) XXX_Merge(src proto.Message)
func (*FactorySettings) XXX_Size ¶ added in v0.0.2
func (m *FactorySettings) XXX_Size() int
func (*FactorySettings) XXX_Unmarshal ¶ added in v0.0.2
func (m *FactorySettings) XXX_Unmarshal(b []byte) error
type FactorySettingsValidationError ¶ added in v0.0.2
type FactorySettingsValidationError struct {
// contains filtered or unexported fields
}
FactorySettingsValidationError is the validation error returned by FactorySettings.Validate if the designated constraints aren't met.
func (FactorySettingsValidationError) Cause ¶ added in v0.0.2
func (e FactorySettingsValidationError) Cause() error
Cause function returns cause value.
func (FactorySettingsValidationError) Error ¶ added in v0.0.2
func (e FactorySettingsValidationError) Error() string
Error satisfies the builtin error interface
func (FactorySettingsValidationError) ErrorName ¶ added in v0.0.2
func (e FactorySettingsValidationError) ErrorName() string
ErrorName returns error name.
func (FactorySettingsValidationError) Field ¶ added in v0.0.2
func (e FactorySettingsValidationError) Field() string
Field function returns field value.
func (FactorySettingsValidationError) Key ¶ added in v0.0.2
func (e FactorySettingsValidationError) Key() bool
Key function returns key value.
func (FactorySettingsValidationError) Reason ¶ added in v0.0.2
func (e FactorySettingsValidationError) Reason() string
Reason function returns reason value.
type GoModImport ¶
type GoModImport struct { Patterns []string `protobuf:"bytes,1,rep,name=patterns,proto3" json:"patterns,omitempty"` Package string `protobuf:"bytes,2,opt,name=package,proto3" json:"package,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
A go mod import represents a set of imports from a go module
patterns is a set glob matchers to find files in a go module.
package is the name of the go module which these should be pulled from.
The GoModImport uses the command `go list -f '{{.Path}}' -m all` to find all of the package names
func (*GoModImport) Descriptor ¶
func (*GoModImport) Descriptor() ([]byte, []int)
func (*GoModImport) GetPackage ¶
func (m *GoModImport) GetPackage() string
func (*GoModImport) GetPatterns ¶
func (m *GoModImport) GetPatterns() []string
func (*GoModImport) ProtoMessage ¶
func (*GoModImport) ProtoMessage()
func (*GoModImport) Reset ¶
func (m *GoModImport) Reset()
func (*GoModImport) String ¶
func (m *GoModImport) String() string
func (*GoModImport) Validate ¶
func (m *GoModImport) Validate() error
Validate checks the field values on GoModImport with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
func (*GoModImport) XXX_DiscardUnknown ¶
func (m *GoModImport) XXX_DiscardUnknown()
func (*GoModImport) XXX_Marshal ¶
func (m *GoModImport) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GoModImport) XXX_Merge ¶
func (m *GoModImport) XXX_Merge(src proto.Message)
func (*GoModImport) XXX_Size ¶
func (m *GoModImport) XXX_Size() int
func (*GoModImport) XXX_Unmarshal ¶
func (m *GoModImport) XXX_Unmarshal(b []byte) error
type GoModImportValidationError ¶
type GoModImportValidationError struct {
// contains filtered or unexported fields
}
GoModImportValidationError is the validation error returned by GoModImport.Validate if the designated constraints aren't met.
func (GoModImportValidationError) Cause ¶
func (e GoModImportValidationError) Cause() error
Cause function returns cause value.
func (GoModImportValidationError) Error ¶
func (e GoModImportValidationError) Error() string
Error satisfies the builtin error interface
func (GoModImportValidationError) ErrorName ¶
func (e GoModImportValidationError) ErrorName() string
ErrorName returns error name.
func (GoModImportValidationError) Field ¶
func (e GoModImportValidationError) Field() string
Field function returns field value.
func (GoModImportValidationError) Key ¶
func (e GoModImportValidationError) Key() bool
Key function returns key value.
func (GoModImportValidationError) Reason ¶
func (e GoModImportValidationError) Reason() string
Reason function returns reason value.
type Import ¶
type Import struct { // Types that are valid to be assigned to ImportType: // *Import_GoMod ImportType isImport_ImportType `protobuf_oneof:"ImportType"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Import) Descriptor ¶
func (*Import) GetGoMod ¶
func (m *Import) GetGoMod() *GoModImport
func (*Import) GetImportType ¶
func (m *Import) GetImportType() isImport_ImportType
func (*Import) ProtoMessage ¶
func (*Import) ProtoMessage()
func (*Import) Validate ¶
Validate checks the field values on Import with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
func (*Import) XXX_DiscardUnknown ¶
func (m *Import) XXX_DiscardUnknown()
func (*Import) XXX_Marshal ¶
func (*Import) XXX_OneofWrappers ¶
func (*Import) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*Import) XXX_Unmarshal ¶
type ImportValidationError ¶
type ImportValidationError struct {
// contains filtered or unexported fields
}
ImportValidationError is the validation error returned by Import.Validate if the designated constraints aren't met.
func (ImportValidationError) Cause ¶
func (e ImportValidationError) Cause() error
Cause function returns cause value.
func (ImportValidationError) Error ¶
func (e ImportValidationError) Error() string
Error satisfies the builtin error interface
func (ImportValidationError) ErrorName ¶
func (e ImportValidationError) ErrorName() string
ErrorName returns error name.
func (ImportValidationError) Field ¶
func (e ImportValidationError) Field() string
Field function returns field value.
func (ImportValidationError) Key ¶
func (e ImportValidationError) Key() bool
Key function returns key value.
func (ImportValidationError) Reason ¶
func (e ImportValidationError) Reason() string
Reason function returns reason value.
type Import_GoMod ¶
type Import_GoMod struct {
GoMod *GoModImport `protobuf:"bytes,2,opt,name=go_mod,json=goMod,proto3,oneof"`
}
type Local ¶
type Local struct { Patterns []string `protobuf:"bytes,1,rep,name=patterns,proto3" json:"patterns,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
A set of glob patters to be grabbed from the current module
func (*Local) Descriptor ¶
func (*Local) GetPatterns ¶
func (*Local) ProtoMessage ¶
func (*Local) ProtoMessage()
func (*Local) Validate ¶
Validate checks the field values on Local with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
func (*Local) XXX_DiscardUnknown ¶
func (m *Local) XXX_DiscardUnknown()
func (*Local) XXX_Marshal ¶
func (*Local) XXX_Unmarshal ¶
type LocalValidationError ¶
type LocalValidationError struct {
// contains filtered or unexported fields
}
LocalValidationError is the validation error returned by Local.Validate if the designated constraints aren't met.
func (LocalValidationError) Cause ¶
func (e LocalValidationError) Cause() error
Cause function returns cause value.
func (LocalValidationError) Error ¶
func (e LocalValidationError) Error() string
Error satisfies the builtin error interface
func (LocalValidationError) ErrorName ¶
func (e LocalValidationError) ErrorName() string
ErrorName returns error name.
func (LocalValidationError) Field ¶
func (e LocalValidationError) Field() string
Field function returns field value.
func (LocalValidationError) Key ¶
func (e LocalValidationError) Key() bool
Key function returns key value.
func (LocalValidationError) Reason ¶
func (e LocalValidationError) Reason() string
Reason function returns reason value.