registry

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2021 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultRegistryName = "official"
View Source
const DefaultRegistryURL = "https://github.com/buildpacks/registry-index"
View Source
const GitCommitTemplate = `{{ if .Yanked }}YANK{{else}}ADD{{end}} {{.Namespace}}/{{.Name}}@{{.Version}}`
View Source
const GithubIssueBodyTemplate = `` /* 127-byte string literal not displayed */
View Source
const GithubIssueTitleTemplate = "{{ if .Yanked }}YANK{{ else }}ADD{{ end }} {{.Namespace}}/{{.Name}}@{{.Version}}"

Variables

This section is empty.

Functions

func CreateBrowserCmd

func CreateBrowserCmd(browserURL, os string) (*exec.Cmd, error)

func GetIssueURL

func GetIssueURL(githubURL string) (*url.URL, error)

func GitCommit

func GitCommit(b Buildpack, username string, registryCache Cache) error

GitCommit commits a Buildpack to a registry Cache.

func IndexPath

func IndexPath(rootDir, ns, name string) (string, error)

IndexPath resolves the path for a specific namespace and name of buildpack

func ParseNamespaceName

func ParseNamespaceName(id string) (ns string, name string, err error)

ParseNamespaceName parses a buildpack ID into Namespace and Name

func Validate

func Validate(b Buildpack) error

Validate that a buildpack reference contains required information

Types

type Buildpack

type Buildpack struct {
	Namespace string `json:"ns"`
	Name      string `json:"name"`
	Version   string `json:"version"`
	Yanked    bool   `json:"yanked"`
	Address   string `json:"addr,omitempty"`
}

Buildpack contains information about a buildpack stored in a Registry

type Cache

type Cache struct {
	Root string
	// contains filtered or unexported fields
}

Cache is a RegistryCache

func NewDefaultRegistryCache

func NewDefaultRegistryCache(logger logging.Logger, home string) (Cache, error)

NewDefaultRegistryCache creates a new registry cache with default options

func NewRegistryCache

func NewRegistryCache(logger logging.Logger, home, registryURL string) (Cache, error)

NewRegistryCache creates a new registry cache

func (*Cache) Commit

func (r *Cache) Commit(b Buildpack, username, msg string) error

Commit a Buildpack change

func (*Cache) CreateCache

func (r *Cache) CreateCache() error

CreateCache creates the cache on the filesystem

func (*Cache) Initialize

func (r *Cache) Initialize() error

Initialize a local Registry Cache

func (*Cache) LocateBuildpack

func (r *Cache) LocateBuildpack(bp string) (Buildpack, error)

LocateBuildpack stored in registry

func (*Cache) Refresh

func (r *Cache) Refresh() error

Refresh local Registry Cache

type Entry

type Entry struct {
	Buildpacks []Buildpack `json:"buildpacks"`
}

Entry is a list of buildpacks stored in a registry

type GithubIssue

type GithubIssue struct {
	Title string
	Body  string
}

func CreateGithubIssue

func CreateGithubIssue(b Buildpack) (GithubIssue, error)

Jump to

Keyboard shortcuts

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