config

package
v0.0.0-...-a0b8de0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2021 License: BSD-3-Clause Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultConfigPath   = "~/.config/iris/config.json"
	DefaultProfilesPath = "~/.config/iris/profiles"
	DefaultProfile      = "main"
	DefaultDataDir      = "/opt/iris"
	DefaultPath         = "github.com/lab47/aperture-packages"
)

Variables

View Source
var ErrNoEntry = errors.New("no store entry for id")

Functions

func Platform

func Platform() (string, string, string)

func SystemConstraints

func SystemConstraints() map[string]string

Types

type Config

type Config struct {

	// Actual Config
	DataDir      string `json:"data-dir"`
	Path         string `json:"aperture-path"`
	ProfilesPath string `json:"profiles-path"`
	Profile      string `json:"profile"`
	// contains filtered or unexported fields
}

func LoadConfig

func LoadConfig() (*Config, error)

func (*Config) BuildPath

func (c *Config) BuildPath() string

func (*Config) ConfigDir

func (c *Config) ConfigDir() string

func (*Config) Constraints

func (c *Config) Constraints() map[string]string

func (*Config) GlobalPackagesPath

func (c *Config) GlobalPackagesPath() string

func (*Config) GlobalProfilePath

func (c *Config) GlobalProfilePath() string

func (*Config) MapPaths

func (c *Config) MapPaths(ctx context.Context, pp []*PackagePath) ([]string, error)

func (*Config) NamedPath

func (c *Config) NamedPath() []PathPart

func (*Config) PackagePath

func (c *Config) PackagePath() ([]*PackagePath, error)

func (*Config) Private

func (c *Config) Private() ed25519.PrivateKey

func (*Config) Public

func (c *Config) Public() ed25519.PublicKey

func (*Config) Repo

func (c *Config) Repo() repo.Repo

func (*Config) RootsPath

func (c *Config) RootsPath() string

func (*Config) Sign

func (c *Config) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) (signature []byte, err error)

func (*Config) SignerId

func (c *Config) SignerId() (string, error)

func (*Config) StatePath

func (c *Config) StatePath() string

func (*Config) Store

func (c *Config) Store() *Store

func (*Config) StorePath

func (c *Config) StorePath() string

type ConfigRepo

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

func (*ConfigRepo) Config

func (c *ConfigRepo) Config() (*metadata.RepoConfig, error)

func (*ConfigRepo) Lookup

func (c *ConfigRepo) Lookup(name string) (repo.Entry, error)

type EDSigner

type EDSigner interface {
	Public() ed25519.PublicKey
	Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) (signature []byte, err error)
}

type PackagePath

type PackagePath struct {
	Name     string
	Type     string
	Location string
	Version  string

	// Populated by PathMap to indicate the version that was actually used for Version
	ResolvedVersion string
}

func CalcPath

func CalcPath(name, ref string) (*PackagePath, error)

type PathMap

type PathMap struct {
	Dir string
}

func (*PathMap) Map

func (p *PathMap) Map(ctx context.Context, pp *PackagePath) (string, error)

Map takes a PackagePath and maps it to a local filesystem path, performing any operations necessary to make that happen.

type PathPart

type PathPart struct {
	Name string
	Path string
}

type Store

type Store struct {
	Paths []string

	Default string
}

func (*Store) ExpectedPath

func (s *Store) ExpectedPath(id string) string

func (*Store) Locate

func (s *Store) Locate(id string) (string, error)

func (*Store) Pivot

func (s *Store) Pivot(path string)

func (*Store) PrependPath

func (s *Store) PrependPath(path string)

Jump to

Keyboard shortcuts

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