entity

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2021 License: MIT Imports: 12 Imported by: 0

README

Documentation

Index

Constants

View Source
const (
	HeaderDockerUploadUUID = "Docker-Upload-UUID"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
}

func NewBase

func NewBase() Base

func (Base) CheckRedirect

func (e Base) CheckRedirect() (f func(req *http.Request, via []*http.Request) (err error))

func (Base) GetBody

func (e Base) GetBody() (body io.Reader, err error)

func (Base) GetHeader

func (e Base) GetHeader() (header map[string]string)

func (Base) GetMethod

func (e Base) GetMethod() (method string)

func (Base) GetQuery

func (e Base) GetQuery() (query interface{})

func (Base) Uri

func (e Base) Uri() (uri string)

type Blob

type Blob struct {
	Method          string        `json:"method"`
	RepositoryName  string        `json:"repository_name"`
	Digest          digest.Digest `json:"digest"`
	Part            bool          `json:"part"`
	Start           int           `json:"start"`
	End             int           `json:"end"`
	FollowRedirects bool          `json:"follow_redirects"`
}

func NewBlob

func NewBlob(method, repositoryName, dgs string, part bool, start, end int, followRedirects bool) Blob

func (Blob) CheckRedirect

func (e Blob) CheckRedirect() (f func(req *http.Request, via []*http.Request) (err error))

func (Blob) GetBody

func (e Blob) GetBody() (body io.Reader, err error)

func (Blob) GetHeader

func (e Blob) GetHeader() (header map[string]string)

func (Blob) GetMethod

func (e Blob) GetMethod() (method string)

func (Blob) GetQuery

func (e Blob) GetQuery() (query interface{})

func (Blob) Uri

func (e Blob) Uri() (uri string)

type BlobUpload

type BlobUpload struct {
	Method         string          `json:"method"`
	RepositoryName string          `json:"repository_name"`
	Location       string          `json:"location"`
	Uuid           string          `json:"uuid"`
	Binary         []byte          `json:"binary"`
	Chunked        bool            `json:"chunked"`
	Start          int             `json:"start"`
	End            int             `json:"end"`
	Query          BlobUploadQuery `json:"query"`
}

func NewBlobUpload

func NewBlobUpload(method, repositoryName, location, uuid string, binary []byte, chunked bool, start, end int, query BlobUploadQuery) BlobUpload

func (BlobUpload) CheckRedirect

func (e BlobUpload) CheckRedirect() (f func(req *http.Request, via []*http.Request) (err error))

func (BlobUpload) GetBody

func (e BlobUpload) GetBody() (body io.Reader, err error)

func (BlobUpload) GetHeader

func (e BlobUpload) GetHeader() (header map[string]string)

func (BlobUpload) GetMethod

func (e BlobUpload) GetMethod() (method string)

func (BlobUpload) GetQuery

func (e BlobUpload) GetQuery() (query interface{})

func (BlobUpload) Uri

func (e BlobUpload) Uri() (uri string)

type BlobUploadQuery

type BlobUploadQuery struct {
	Digest string `json:"digest"`
}

type Catalog

type Catalog struct {
	Query CatalogQuery `json:"query"`
}

func NewCatalog

func NewCatalog(query CatalogQuery) Catalog

func (Catalog) CheckRedirect

func (e Catalog) CheckRedirect() (f func(req *http.Request, via []*http.Request) (err error))

func (Catalog) GetBody

func (e Catalog) GetBody() (body io.Reader, err error)

func (Catalog) GetHeader

func (e Catalog) GetHeader() (header map[string]string)

func (Catalog) GetMethod

func (e Catalog) GetMethod() (method string)

func (Catalog) GetQuery

func (e Catalog) GetQuery() (query interface{})

func (Catalog) Uri

func (e Catalog) Uri() (uri string)

type CatalogQuery

type CatalogQuery struct {
	Number int `json:"number"`
	Last   int `json:"last"`
}

type Entity

type Entity interface {
	Uri() (url string)
	GetMethod() (method string)
	GetQuery() (query interface{})
	GetBody() (body io.Reader, err error)
	GetHeader() (header map[string]string)
	CheckRedirect() (f func(req *http.Request, via []*http.Request) (err error))
}

type InitiateBlobUpload

type InitiateBlobUpload struct {
	RepositoryName          string                  `json:"repository_name"`
	InitiateBlobUploadQuery InitiateBlobUploadQuery `json:"query"`
	MountBlobQuery          MountBlobQuery          `json:"mount_blob_query"`
	Binary                  []byte
}

func NewInitiateBlobUpload

func NewInitiateBlobUpload(repositoryName string, binary []byte, initiateBlobUploadQuery InitiateBlobUploadQuery, mountBlobQuery MountBlobQuery) InitiateBlobUpload

func (InitiateBlobUpload) CheckRedirect

func (e InitiateBlobUpload) CheckRedirect() (f func(req *http.Request, via []*http.Request) (err error))

func (InitiateBlobUpload) GetBody

func (e InitiateBlobUpload) GetBody() (body io.Reader, err error)

func (InitiateBlobUpload) GetHeader

func (e InitiateBlobUpload) GetHeader() (header map[string]string)

func (InitiateBlobUpload) GetMethod

func (e InitiateBlobUpload) GetMethod() (method string)

func (InitiateBlobUpload) GetQuery

func (e InitiateBlobUpload) GetQuery() (query interface{})

func (InitiateBlobUpload) Uri

func (e InitiateBlobUpload) Uri() (uri string)

type InitiateBlobUploadQuery

type InitiateBlobUploadQuery struct {
	Digest string `json:"digest"`
}

type Manifest

type Manifest struct {
	Name          string           `json:"name"`
	Reference     string           `json:"reference"`
	Method        string           `json:"method"`
	Manifest      schema2.Manifest `json:"manifest"`
	Tampering     bool             `json:"tampering"`
	TamperingBody io.Reader
}

func NewManifest

func NewManifest(repositoryName, reference, method string, manifest schema2.Manifest) Manifest

func NewManifestForTampering added in v0.0.6

func NewManifestForTampering(repositoryName, reference string, tamperingBody io.Reader) Manifest

func (Manifest) CheckRedirect

func (e Manifest) CheckRedirect() (f func(req *http.Request, via []*http.Request) (err error))

func (Manifest) GetBody

func (e Manifest) GetBody() (body io.Reader, err error)

func (Manifest) GetHeader

func (e Manifest) GetHeader() (header map[string]string)

func (Manifest) GetMethod

func (e Manifest) GetMethod() (method string)

func (Manifest) GetQuery

func (e Manifest) GetQuery() (query interface{})

func (Manifest) Uri

func (e Manifest) Uri() (uri string)

type MountBlobQuery

type MountBlobQuery struct {
	Mount string `json:"mount"`
	From  string `json:"from"`
}

type Tags

type Tags struct {
	RepositoryName string             `json:"repository_name"`
	Method         string             `json:"method"`
	Query          TagsPaginatedQuery `json:"query"`
}

func NewTags

func NewTags(repositoryName string, method string, query TagsPaginatedQuery) Tags

func (Tags) CheckRedirect

func (e Tags) CheckRedirect() (f func(req *http.Request, via []*http.Request) (err error))

func (Tags) GetBody

func (e Tags) GetBody() (body io.Reader, err error)

func (Tags) GetHeader

func (e Tags) GetHeader() (header map[string]string)

func (Tags) GetMethod

func (e Tags) GetMethod() (method string)

func (Tags) GetQuery

func (e Tags) GetQuery() (query interface{})

func (Tags) Uri

func (e Tags) Uri() (uri string)

type TagsPaginatedQuery

type TagsPaginatedQuery struct {
	Number int `json:"n,string"`
	Last   int `json:"last,string"`
}

Jump to

Keyboard shortcuts

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