anyvendor

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: Apache-2.0 Imports: 14 Imported by: 6

Documentation

Index

Constants

View Source
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) Descriptor() ([]byte, []int)

func (*Config) GetImports

func (m *Config) GetImports() []*Import

func (*Config) GetLocal

func (m *Config) GetLocal() *Local

func (*Config) GetSettings added in v0.0.2

func (m *Config) GetSettings() *FactorySettings

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) Reset

func (m *Config) Reset()

func (*Config) String

func (m *Config) String() string

func (*Config) Validate

func (m *Config) Validate() error

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 (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Config) XXX_Merge

func (m *Config) XXX_Merge(src proto.Message)

func (*Config) XXX_Size

func (m *Config) XXX_Size() int

func (*Config) XXX_Unmarshal

func (m *Config) XXX_Unmarshal(b []byte) error

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

Cause function returns cause value.

func (FactorySettingsValidationError) Error added in v0.0.2

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

Field function returns field value.

func (FactorySettingsValidationError) Key added in v0.0.2

Key function returns key value.

func (FactorySettingsValidationError) Reason added in v0.0.2

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

Cause function returns cause value.

func (GoModImportValidationError) Error

Error satisfies the builtin error interface

func (GoModImportValidationError) ErrorName

func (e GoModImportValidationError) ErrorName() string

ErrorName returns error name.

func (GoModImportValidationError) Field

Field function returns field value.

func (GoModImportValidationError) Key

Key function returns key value.

func (GoModImportValidationError) Reason

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) Descriptor() ([]byte, []int)

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) Reset

func (m *Import) Reset()

func (*Import) String

func (m *Import) String() string

func (*Import) Validate

func (m *Import) Validate() error

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 (m *Import) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Import) XXX_Merge

func (m *Import) XXX_Merge(src proto.Message)

func (*Import) XXX_OneofWrappers

func (*Import) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*Import) XXX_Size

func (m *Import) XXX_Size() int

func (*Import) XXX_Unmarshal

func (m *Import) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*Local) GetPatterns

func (m *Local) GetPatterns() []string

func (*Local) ProtoMessage

func (*Local) ProtoMessage()

func (*Local) Reset

func (m *Local) Reset()

func (*Local) String

func (m *Local) String() string

func (*Local) Validate

func (m *Local) Validate() error

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 (m *Local) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Local) XXX_Merge

func (m *Local) XXX_Merge(src proto.Message)

func (*Local) XXX_Size

func (m *Local) XXX_Size() int

func (*Local) XXX_Unmarshal

func (m *Local) XXX_Unmarshal(b []byte) error

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.

Jump to

Keyboard shortcuts

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