config

package
v0.0.0-...-7533f67 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Build

type Build struct {
	Source   string   `toml:"source"`
	Packages []string `toml:"packages,omitempty"`
}

type Config

type Config struct {
	Name         string       `toml:"name"`
	Build        *Build       `toml:"build,omitempty"`
	Exports      []Export     `toml:"export"`
	Dependencies []Dependency `toml:"dependency"`
	Externs      []Extern     `toml:"extern"`
}

func LoadConfig

func LoadConfig(filename string) (*Config, error)

func (*Config) Dependency

func (c *Config) Dependency(name string) *Dependency

func (*Config) Export

func (c *Config) Export(path string) *Export

func (*Config) ResolvePackage

func (c *Config) ResolvePackage(path string) Package

func (*Config) ResolveVersions

func (c *Config) ResolveVersions(required map[string]*modfile.Require) error

type Dependency

type Dependency struct {
	Name    string `toml:"name"`
	Path    string `toml:"path,omitempty"`
	Version string `toml:"version,omitempty"`
}

type Export

type Export struct {
	Path    string `toml:"path"`
	Module  string `toml:"module,omitempty"`
	Group   string `toml:"group"`
	Version string `toml:"version"`

	Include []string `toml:"include,omitempty"`
	Exclude []string `toml:"exclude,omitempty"`

	ExplicitNull bool   `toml:"explicit-null,omitempty"`
	Prune        bool   `toml:"prune,omitempty"`
	Merge        *Merge `toml:"merge,omitempty"`
}

func (*Export) Dependency

func (e *Export) Dependency() string

func (*Export) Export

func (e *Export) Export() *Export

func (*Export) Is

func (e *Export) Is(v *spec.APIGroupVersion) bool

type Extern

type Extern struct {
	Path    string `toml:"path"`
	Package string `toml:"package"`
	Module  string `toml:"module,omitempty"`
	Group   string `toml:"group"`
	Version string `toml:"version"`
}

func (*Extern) Dependency

func (e *Extern) Dependency() string

func (*Extern) Export

func (e *Extern) Export() *Export

type Merge

type Merge struct {
	Module  string   `toml:"module"`
	Version string   `toml:"version,omitempty"`
	Include []string `toml:"include,omitempty"`
}

type Package

type Package interface {
	Dependency() string
	Export() *Export
}

Jump to

Keyboard shortcuts

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