sk_anyvendor

package
v0.24.1-patch1 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2021 License: Apache-2.0 Imports: 1 Imported by: 5

Documentation

Index

Constants

View Source
const (
	SoloKitMatchPattern = "**/solo-kit.json"
)

Variables

View Source
var (
	// offer sane defaults for proto vendoring
	DefaultMatchPatterns = []string{anyvendor.ProtoMatchPattern, SoloKitMatchPattern}

	// matches ext.proto for solo hash gen
	ExtProtoMatcher = &anyvendor.GoModImport{
		Package: "github.com/solo-io/protoc-gen-ext",
		Patterns: []string{
			"extproto/*.proto",
			"external/google/**/*.proto",
		},
	}

	// matches validate.proto which is needed by envoy protos
	EnvoyValidateProtoMatcher = &anyvendor.GoModImport{
		Package:  "github.com/envoyproxy/protoc-gen-validate",
		Patterns: []string{"validate/*.proto"},
	}

	// matches all solo-kit protos, useful for any projects using solo-kit
	SoloKitProtoMatcher = &anyvendor.GoModImport{
		Package:  "github.com/solo-io/solo-kit",
		Patterns: []string{"api/**/*.proto", "api/" + SoloKitMatchPattern},
	}

	// default match options which should be used when creating a solo-kit project
	DefaultExternalMatchOptions = map[string][]string{
		ExtProtoMatcher.Package:           ExtProtoMatcher.Patterns,
		EnvoyValidateProtoMatcher.Package: EnvoyValidateProtoMatcher.Patterns,
		SoloKitProtoMatcher.Package:       SoloKitProtoMatcher.Patterns,
	}
)

Functions

This section is empty.

Types

type Imports

type Imports struct {
	// files which should be gathered from the local repo
	Local []string
	// files which should be gathered from other go.mod repos
	External map[string][]string
}

this type represents a solo-kit abstraction of the anyvendor API for vendoring non-go files.

func CreateDefaultMatchOptions

func CreateDefaultMatchOptions(local []string) *Imports

func (*Imports) ToAnyvendorConfig

func (i *Imports) ToAnyvendorConfig() *anyvendor.Config

Jump to

Keyboard shortcuts

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