depclient

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2020 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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