registry

package
v0.35.1 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: Apache-2.0 Imports: 23 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 added in v0.13.0

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

func GetIssueURL added in v0.13.0

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

func GitCommit added in v0.14.0

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

GitCommit commits a Buildpack to a registry Cache.

func IndexPath added in v0.14.0

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

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

func ParseNamespaceName added in v0.13.0

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

ParseNamespaceName parses a buildpack ID into Namespace and Name

func Validate added in v0.13.0

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
	RegistryDir 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 added in v0.14.0

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

Commit a Buildpack change

func (*Cache) CreateCache added in v0.14.0

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 added in v0.13.0

type GithubIssue struct {
	Title string
	Body  string
}

func CreateGithubIssue added in v0.13.0

func CreateGithubIssue(b Buildpack) (GithubIssue, error)

Jump to

Keyboard shortcuts

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