repo

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package repo handles a list of repositories from a registry

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Opts

type Opts func(*repoConfig)

func WithHeaders

func WithHeaders(header http.Header) Opts

func WithHost

func WithHost(host string) Opts

func WithMT

func WithMT(mt string) Opts

func WithRaw

func WithRaw(raw []byte) Opts

type RepoList

type RepoList struct {
	RepoRegistryList
	// contains filtered or unexported fields
}

RepoList is the response for a repository listing.

func New

func New(opts ...Opts) (*RepoList, error)

New is used to create a repository listing.

func (RepoList) GetOrig

func (r RepoList) GetOrig() interface{}

func (RepoList) MarshalJSON

func (r RepoList) MarshalJSON() ([]byte, error)

func (RepoList) RawBody

func (r RepoList) RawBody() ([]byte, error)

func (RepoList) RawHeaders

func (r RepoList) RawHeaders() (http.Header, error)

type RepoRegistryList

type RepoRegistryList struct {
	Repositories []string `json:"repositories"`
}

RepoRegistryList is a list of repositories from the _catalog API

func (RepoRegistryList) GetRepos

func (rl RepoRegistryList) GetRepos() ([]string, error)

GetRepos returns the repositories

func (RepoRegistryList) MarshalPretty

func (rl RepoRegistryList) MarshalPretty() ([]byte, error)

MarshalPretty is used for printPretty template formatting

Jump to

Keyboard shortcuts

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