Documentation
¶
Index ¶
- func NewClient(options ...ClientOption) (registryclient.Client, error)
- type AuthStore
- type ClientConfig
- type ClientOption
- func SkipTLSVerify(insecure bool) ClientOption
- func WithAuthConfigs(configs []string) ClientOption
- func WithCache(store content.Store) ClientOption
- func WithCredentialFunc(credFn func(context.Context, string) (auth.Credential, error)) ClientOption
- func WithPlainHTTP(plainHTTP bool) ClientOption
- func WithPostCopy(postFn func(ctx context.Context, desc ocispec.Descriptor) error) ClientOption
- func WithPreCopy(preFn func(ctx context.Context, desc ocispec.Descriptor) error) ClientOption
- func WithPrePullFunc(prePullFn func(context.Context, string) error) ClientOption
- func WithPullableAttributes(filter model.Matcher) ClientOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClient ¶
func NewClient(options ...ClientOption) (registryclient.Client, error)
NewClient returns a new ORAS client implementation
Types ¶
type AuthStore ¶
type AuthStore struct {
// contains filtered or unexported fields
}
AuthStore contains authentication configuration file information for registry interactions.
func NewAuthStore ¶
NewAuthStore returns a new authentication store instance with credential information collected.
func (*AuthStore) Credential ¶
Credential iterates all the config files, returns the first non-empty credential in a best-effort way.
type ClientConfig ¶
type ClientConfig struct {
// contains filtered or unexported fields
}
ClientConfig contains configuration data for the registry client.
type ClientOption ¶
type ClientOption func(o *ClientConfig) error
ClientOption is a function that configures options on the client config.
func SkipTLSVerify ¶
func SkipTLSVerify(insecure bool) ClientOption
SkipTLSVerify disables TLS certificate checking.
func WithAuthConfigs ¶
func WithAuthConfigs(configs []string) ClientOption
WithAuthConfigs adds configuration files with registry authorization information.
func WithCache ¶
func WithCache(store content.Store) ClientOption
WithCache uses the provided storage a cache to be used with remote resources. It is the responsibility of the caller to perform any clean up actions.
func WithCredentialFunc ¶ added in v0.4.0
func WithCredentialFunc(credFn func(context.Context, string) (auth.Credential, error)) ClientOption
WithCredentialFunc overrides the default credential function. Using this option will override WithAuthConfigs.
func WithPlainHTTP ¶
func WithPlainHTTP(plainHTTP bool) ClientOption
WithPlainHTTP uses the HTTP protocol with the registry.
func WithPostCopy ¶
func WithPostCopy(postFn func(ctx context.Context, desc ocispec.Descriptor) error) ClientOption
WithPostCopy applies a function to a descriptor after copying it. This sets the oras.CopyOptions.PostCopy function.
func WithPreCopy ¶
func WithPreCopy(preFn func(ctx context.Context, desc ocispec.Descriptor) error) ClientOption
WithPreCopy applies a function to a descriptor before copying it. This sets the oras.CopyOptions.PreCopy function.
func WithPrePullFunc ¶ added in v0.4.0
func WithPrePullFunc(prePullFn func(context.Context, string) error) ClientOption
WithPrePullFunc applies a function to a reference before pulling it to a content store.
func WithPullableAttributes ¶ added in v0.4.0
func WithPullableAttributes(filter model.Matcher) ClientOption
WithPullableAttributes adds a filter when pulling blobs that allows non-matching blobs to be skipped.