Documentation ¶
Index ¶
- Constants
- func Add(ctx context.Context, sourcePath string, artifactPath string, ...) error
- func Create(ctx context.Context, sourcePath string, options CreateOptions) error
- func Pull(ctx context.Context, imageInput string, sourcePath string, options PullOptions) error
- func Push(ctx context.Context, sourcePath string, imageInput string, options PushOptions) error
- type AddOptions
- type CreateOptions
- type ImageConfig
- type PullOptions
- type PushOptions
Constants ¶
const MediaTypeSourceImageConfig = "application/vnd.oci.source.image.config.v1+json"
MediaTypeSourceImageConfig specifies the media type of a source-image config.
Variables ¶
This section is empty.
Functions ¶
func Add ¶
Add adds the specified source artifact at `artifactPath` to the source image at `sourcePath`. Note that the artifact will be added as a gzip-compressed tar ball. Add attempts to auto-tar and auto-compress only if necessary.
func Create ¶
func Create(ctx context.Context, sourcePath string, options CreateOptions) error
Create creates an empty source image at the specified `sourcePath`. Note that `sourcePath` must not exist.
Types ¶
type AddOptions ¶
type AddOptions struct { // Annotations for the source artifact. Annotations []string }
AddOptions include data to alter certain knobs when adding a source artifact to a source image.
type CreateOptions ¶
type CreateOptions struct { // Author is the author of the source image. Author string // TimeStamp controls whether a "created" timestamp is set or not. TimeStamp bool }
CreateOptions includes data to alter certain knobs when creating a source image.
type ImageConfig ¶
type ImageConfig struct { // Created is the combined date and time at which the layer was created, formatted as defined by RFC 3339, section 5.6. Created *time.Time `json:"created,omitempty"` // Author is the author of the source image. Author string `json:"author,omitempty"` }
ImageConfig specifies the config of a source image.
type PullOptions ¶
type PullOptions struct { // Require HTTPS and verify certificates when accessing the registry. TLSVerify bool // [username[:password] to use when connecting to the registry. Credentials string // Quiet the progress bars when pushing. Quiet bool }
PullOptions includes data to alter certain knobs when pulling a source image.
type PushOptions ¶
type PushOptions struct { // Require HTTPS and verify certificates when accessing the registry. TLSVerify bool // [username[:password] to use when connecting to the registry. Credentials string // Quiet the progress bars when pushing. Quiet bool }
PushOptions includes data to alter certain knobs when pushing a source image.