crbox

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2021 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidChecksum = errors.New("checksum verification failed")
View Source
var ErrInvalidTag = errors.New("message authentication failed (password is wrong or data is corrupted)")

Functions

func NewRepository

func NewRepository(ctx context.Context, ref reference.Named) (distribution.Repository, error)

func PingV2Registry

func PingV2Registry(endpoint string, transport http.RoundTripper) (challenge.Manager, error)

Types

type Cipher

type Cipher struct {
	CipherParams
	// contains filtered or unexported fields
}

func NewCipher

func NewCipher(password []byte, params *CipherParams) (*Cipher, error)

func NewCipherFromJSON

func NewCipherFromJSON(password []byte, config []byte) (*Cipher, error)

func (*Cipher) Decrypt

func (c *Cipher) Decrypt(dst, src []byte) ([]byte, error)

func (*Cipher) Encrypt

func (c *Cipher) Encrypt(dst, src []byte) []byte

func (*Cipher) Overhead

func (c *Cipher) Overhead() uint64

type CipherParams

type CipherParams struct {
	Time    uint32 `json:"t"`
	Memory  uint32 `json:"m"`
	Threads uint8  `json:"p"`
	Salt    []byte `json:"salt"`
	Nonce   []byte `json:"nonce"`
}

type ContainerConfig

type ContainerConfig struct {
	Hostname     string
	Domainname   string
	User         string
	AttachStdin  bool
	AttachStdout bool
	AttachStderr bool
	Tty          bool
	OpenStdin    bool
	StdinOnce    bool
	Env          []string
	Cmd          []string
	Image        string
	Volumes      map[string]struct{}
	WorkingDir   string
	Entrypoint   []string
	OnBuild      []string
	Labels       map[string]string
}

type Digester

type Digester struct {
	// contains filtered or unexported fields
}

func NewDigester

func NewDigester(alg digest.Algorithm) *Digester

func NewDigesterFromDigest

func NewDigesterFromDigest(dgst digest.Digest) (*Digester, error)

func (*Digester) Digest

func (d *Digester) Digest() digest.Digest

func (*Digester) Filesize

func (d *Digester) Filesize() uint64

func (*Digester) Verify

func (d *Digester) Verify(filesize uint64, dgst digest.Digest) bool

func (*Digester) Write

func (d *Digester) Write(p []byte) (int, error)

type History

type History struct {
	Created    time.Time `json:"created"`
	Author     string    `json:"author,omitempty"`
	CreatedBy  string    `json:"created_by,omitempty"`
	Comment    string    `json:"comment,omitempty"`
	EmptyLayer bool      `json:"empty_layer,omitempty"`
}

type Image

type Image struct {
	ID              string           `json:"id,omitempty"`
	Parent          string           `json:"parent,omitempty"`
	Comment         string           `json:"comment,omitempty"`
	Created         time.Time        `json:"created"`
	Container       string           `json:"container,omitempty"`
	ContainerConfig *ContainerConfig `json:"container_config,omitempty"`
	DockerVersion   string           `json:"docker_version,omitempty"`
	Author          string           `json:"author,omitempty"`
	Config          *ContainerConfig `json:"config,omitempty"`
	Architecture    string           `json:"architecture,omitempty"`
	Variant         string           `json:"variant,omitempty"`
	OS              string           `json:"os,omitempty"`
	Size            int64            `json:",omitempty"`
	RootFS          *RootFS          `json:"rootfs,omitempty"`
	History         []History        `json:"history,omitempty"`
	OSVersion       string           `json:"os.version,omitempty"`
	OSFeatures      []string         `json:"os.features,omitempty"`
}

func (*Image) MarshalJSON

func (img *Image) MarshalJSON() ([]byte, error)

type Puller

type Puller interface {
	CipherParams() []byte
	EncryptedFilename() []byte
	Filesize() uint64
	Checksum() digest.Digest
	CreatedAt() time.Time
	Digest() digest.Digest
	ChunkCount() int
	ReadChunk(context.Context) ([]byte, error)
}

func NewDockerPuller

func NewDockerPuller(ctx context.Context, repo distribution.Repository, dgst digest.Digest, manifest *schema2.Manifest) (Puller, error)

func NewPuller

func NewPuller(ctx context.Context, repo distribution.Repository, ref reference.Named) (Puller, error)

type PushDestination

type PushDestination struct {
	Repository distribution.Repository
	Tags       []string
}

type Pusher

type Pusher interface {
	PutChunk(context.Context, []byte) error
	Commit(context.Context, *Digester) error
}

func NewDockerPusher

func NewDockerPusher(dst []PushDestination, c *Cipher, encryptedFilename []byte) (Pusher, error)

type RootFS

type RootFS struct {
	Type    string          `json:"type"`
	DiffIDs []digest.Digest `json:"diff_ids,omitempty"`
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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