oras

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2021 License: Apache-2.0 Imports: 22 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authorizer

type Authorizer struct {
	auth.Client
}

Authorizer handles registry auth operations

type Client

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

Client works with OCI-compliant registries and local cache.

func (*Client) LoadModel

func (c *Client) LoadModel(ref *oci.Reference) (*model.Model, error)

LoadModel retrieves a model object by reference

func (*Client) Login

func (c *Client) Login(hostname string, username string, password string, insecure bool) error

Login logs into a registry

func (*Client) Logout

func (c *Client) Logout(hostname string) error

Logout logs out of a registry

func (*Client) Models added in v0.0.11

func (c *Client) Models() error

func (*Client) PullModel

func (c *Client) PullModel(ref *oci.Reference) error

PullModel downloads a model from a registry.

func (*Client) PushModel

func (c *Client) PushModel(ref *oci.Reference) error

PushModel uploads a model to a registry.

func (*Client) RemoveModel

func (c *Client) RemoveModel(ref *oci.Reference) error

RemoveModel deletes a locally saved model.

func (*Client) SaveModel

func (c *Client) SaveModel(ch *model.Model, ref *oci.Reference) error

SaveModel stores a copy of model in local cache

func (*Client) TagModel

func (c *Client) TagModel(ref *oci.Reference, target *oci.Reference) error

TagModel tags the ref to target.

type ClientOption

type ClientOption func(*Client)

ClientOption allows specifying various settings configurable by the user for overriding the defaults used when creating a new default client

func ClientOptAuthorizer

func ClientOptAuthorizer(authorizer *Authorizer) ClientOption

ClientOptAuthorizer returns a function that sets the authorizer setting on client options set

func ClientOptCache

func ClientOptCache(cache cache.Interface) ClientOption

ClientOptCache returns a function that sets the cache setting on a client options set

func ClientOptDebug

func ClientOptDebug(debug bool) ClientOption

ClientOptDebug returns a function that sets the debug setting on client options set

func ClientOptInsecure

func ClientOptInsecure(insecure bool) ClientOption

ClientOptInsecure returns a function that sets the insecure setting on client options set

func ClientOptPlainHTTP

func ClientOptPlainHTTP(plainHTTP bool) ClientOption

ClientOptPlainHTTP returns a function that sets the plainHTTP setting on client options set

func ClientOptResolver

func ClientOptResolver(resolver *Resolver) ClientOption

ClientOptResolver returns a function that sets the resolver setting on client options set

func ClientOptRootPath

func ClientOptRootPath(rootPath string) ClientOption

ClientOptRootPath returns a function that sets the rootpath setting on client options set

func ClientOptWriter

func ClientOptWriter(out io.Writer) ClientOption

ClientOptWriter returns a function that sets the writer setting on client options set

type Interface

type Interface interface {
	Login(hostname string, username string, password string, insecure bool) error
	Logout(hostname string) error
	SaveModel(ch *model.Model, ref *oci.Reference) error
	PushModel(ref *oci.Reference) error
	RemoveModel(ref *oci.Reference) error
	PullModel(ref *oci.Reference) error
	LoadModel(ref *oci.Reference) (*model.Model, error)
	TagModel(ref *oci.Reference, target *oci.Reference) error
	Models() error
}

Interface is the interface of the client.

func NewClient

func NewClient(opts ...ClientOption) (Interface, error)

NewClient returns a new registry client with config

type Resolver

type Resolver struct {
	remotes.Resolver
}

Resolver provides remotes based on a locator

Directories

Path Synopsis
mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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