registry

package
v0.0.0-...-4f87869 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const BlobRequestTemplate = `` /* 411-byte string literal not displayed */
View Source
const ManifestV2RequestTemplate = `` /* 716-byte string literal not displayed */
View Source
const SearchProjectRequestTemplate = `` /* 322-byte string literal not displayed */

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoint

type Endpoint struct {
	Schema string
	Host   string
}

type ManifestsConfig

type ManifestsConfig struct {
	Architecture  string                   `json:"architecture"`
	OS            string                   `json:"os"`
	Config        map[string]interface{}   `json:"config"`
	History       []map[string]interface{} `json:"history"`
	DockerVersion string                   `json:"docker_version"`
}

type ManifestsV2

type ManifestsV2 struct {
	Digest        string           `json:"digest"`
	SchemaVersion int              `json:"schemaVersion"`
	MediaType     string           `json:"mediaType"`
	Manifests     []SubManifestsV2 `json:"manifests"`
	Size          int              `json:"size"`
	RawBase64     string           `json:"rawBase64"`
	RawSha256Sum  string           `json:"rawSha256Sum"`
}

type MediaType

type MediaType struct {
	MediaType string `json:"mediaType"`
	Size      int    `json:"size"`
	Digest    string `json:"digest"`
}

type Platform

type Platform struct {
	Architecture string `json:"architecture"`
	OS           string `json:"os"`
}

type Project

type Project struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	StartCount  int    `json:"star_count"`
	Trusted     bool   `json:"is_trusted"`
	Automated   bool   `json:"is_automated"`
	Official    bool   `json:"is_official"`
}

type ProjectSearchResult

type ProjectSearchResult struct {
	PagesTotalNum int       `json:"num_pages"`
	TotalSize     int       `json:"num_results"`
	PageSize      int       `json:"page_size"`
	PageNo        int       `json:"page"`
	Projects      []Project `json:"results"`
}

type Registry

type Registry struct {
	Auth          *common.Auth
	Endpoint      *Endpoint
	Client        *http.Client
	HandlerFacade *handler.Facade
}

func NewClient

func NewClient(c *http.Client, endpoint *Endpoint, auth *common.Auth) *Registry

func (*Registry) Do

func (r *Registry) Do(template string, input *handler.ApiRequestInput, fn ResponseFunc) error

func (*Registry) Login

func (r *Registry) Login() error

func (*Registry) ManifestV2

func (r *Registry) ManifestV2(imageFullName string) (*ManifestsV2, error)

func (*Registry) Manifests

func (r *Registry) Manifests(imageName string) (string, error)

func (*Registry) Ping

func (r *Registry) Ping() error

func (*Registry) SearchProject

func (r *Registry) SearchProject(nameQuery string, n int) ([]Project, error)

func (*Registry) Tags

func (r *Registry) Tags(repoName string) (string, error)

func (*Registry) TagsPaginated

func (r *Registry) TagsPaginated(repoName string, pageNo int, pageSize int) (string, error)

type ResponseFunc

type ResponseFunc func(resp *http.Response)

type SubManifestsV2

type SubManifestsV2 struct {
	Digest        string      `json:"digest"`
	SchemaVersion int         `json:"schemaVersion"`
	MediaType     string      `json:"mediaType"`
	Config        *MediaType  `json:"config"`
	Layers        []MediaType `json:"layers"`
	Platform      *Platform   `json:"platform"`
	Size          int         `json:"size"`
	RawBase64     string      `json:"rawBase64"`
	RawSha256Sum  string      `json:"rawSha256Sum"`
}

Jump to

Keyboard shortcuts

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