registry

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultAPIVersion = "0.1.0"
	DefaultKind       = "ksonnet.io/registry"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LibraryRef

type LibraryRef struct {
	Version string `json:"version"`
	Path    string `json:"path"`
}

type LibraryRefSpecs

type LibraryRefSpecs map[string]*LibraryRef

type Manager

type Manager interface {
	RegistrySpecDir() string
	RegistrySpecFilePath() string
	FetchRegistrySpec() (*Spec, error)
	MakeRegistryRefSpec() *app.RegistryRefSpec
	ResolveLibrarySpec(libID, libRefSpec string) (*parts.Spec, error)
	ResolveLibrary(libID, libAlias, version string, onFile ResolveFile, onDir ResolveDirectory) (*parts.Spec, *app.LibraryRefSpec, error)
}

type ResolveDirectory

type ResolveDirectory func(relPath string) error

type ResolveFile

type ResolveFile func(relPath string, contents []byte) error

type Spec

type Spec struct {
	APIVersion string              `json:"apiVersion"`
	Kind       string              `json:"kind"`
	GitVersion *app.GitVersionSpec `json:"gitVersion"`
	Libraries  LibraryRefSpecs     `json:"libraries"`
}

func Unmarshal added in v0.9.0

func Unmarshal(bytes []byte) (*Spec, error)

func (*Spec) Marshal

func (s *Spec) Marshal() ([]byte, error)

type Specs

type Specs []*Spec

Jump to

Keyboard shortcuts

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