depclient

package
v6.26.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

Types

type Client

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

func New

func New(config Config) (*Client, error)

func (*Client) ReadManifest

func (c *Client) ReadManifest(ctx context.Context, data []byte) (Manifest, error)

ReadManifest unmarshals content of Gopkg.toml.

type Config

type Config struct {
	Logger micrologger.Logger
}

type Manifest

type Manifest struct {
	Constraints  []ManifestProject    `toml:"constraint,omitempty"`
	Overrides    []ManifestProject    `toml:"override,omitempty"`
	Ignored      []string             `toml:"ignored,omitempty"`
	Required     []string             `toml:"required,omitempty"`
	NoVerify     []string             `toml:"noverify,omitempty"`
	PruneOptions ManifestPruneOptions `toml:"prune,omitempty"`
}

Manifest type is copied and adjusted from https://github.com/golang/dep/blob/v0.5.0/manifest.go#L60-L84.

type ManifestProject

type ManifestProject struct {
	Name     string `toml:"name"`
	Branch   string `toml:"branch,omitempty"`
	Revision string `toml:"revision,omitempty"`
	Version  string `toml:"version,omitempty"`
	Source   string `toml:"source,omitempty"`
}

type ManifestPruneOptions

type ManifestPruneOptions struct {
	UnusedPackages bool `toml:"unused-packages,omitempty"`
	NonGoFiles     bool `toml:"non-go,omitempty"`
	GoTests        bool `toml:"go-tests,omitempty"`

	//Projects []map[string]interface{} `toml:"project,omitempty"`
	Projects []map[string]interface{}
}

Jump to

Keyboard shortcuts

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