Documentation
¶
Overview ¶
Package client provides a versions API specific implementation of the general API client.
Index ¶
- func NewClient(ctx context.Context, region, bucket, distributionID string, dryRun bool, ...) (*VersionsClient, CloseFunc, error)
- func NewReadOnlyClient(ctx context.Context, region, bucket, distributionID string, log *logger.Logger) (*VersionsClient, CloseFunc, error)
- type CloseFunc
- type VersionsClient
- func (c *VersionsClient) Close(ctx context.Context) error
- func (c *VersionsClient) DeleteRef(ctx context.Context, ref string) error
- func (c *VersionsClient) DeleteVersion(ctx context.Context, ver versionsapi.Version) error
- func (c *VersionsClient) FetchCLIInfo(ctx context.Context, cliInfo versionsapi.CLIInfo) (versionsapi.CLIInfo, error)
- func (c *VersionsClient) FetchImageInfo(ctx context.Context, imageInfo versionsapi.ImageInfo) (versionsapi.ImageInfo, error)
- func (c *VersionsClient) FetchVersionLatest(ctx context.Context, latest versionsapi.Latest) (versionsapi.Latest, error)
- func (c *VersionsClient) FetchVersionList(ctx context.Context, list versionsapi.List) (versionsapi.List, error)
- func (c *VersionsClient) UpdateCLIInfo(ctx context.Context, cliInfo versionsapi.CLIInfo) error
- func (c *VersionsClient) UpdateImageInfo(ctx context.Context, imageInfo versionsapi.ImageInfo) error
- func (c *VersionsClient) UpdateVersionLatest(ctx context.Context, latest versionsapi.Latest) error
- func (c *VersionsClient) UpdateVersionList(ctx context.Context, list versionsapi.List) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClient ¶
func NewClient(ctx context.Context, region, bucket, distributionID string, dryRun bool, log *logger.Logger, ) (*VersionsClient, CloseFunc, error)
NewClient creates a new client for the versions API.
func NewReadOnlyClient ¶
func NewReadOnlyClient(ctx context.Context, region, bucket, distributionID string, log *logger.Logger, ) (*VersionsClient, CloseFunc, error)
NewReadOnlyClient creates a new read-only client. This client can be used to fetch objects but cannot write updates.
Types ¶
type VersionsClient ¶
VersionsClient is a client for the versions API.
func (*VersionsClient) Close ¶
func (c *VersionsClient) Close(ctx context.Context) error
Close closes the client.
func (*VersionsClient) DeleteRef ¶
func (c *VersionsClient) DeleteRef(ctx context.Context, ref string) error
DeleteRef deletes the given ref from the versions API.
func (*VersionsClient) DeleteVersion ¶
func (c *VersionsClient) DeleteVersion(ctx context.Context, ver versionsapi.Version) error
DeleteVersion deletes the given version from the versions API. The version will be removed from version lists and latest versions, and the versioned objects are deleted. Notice that the versions API can get into an inconsistent state if the version is the latest version but there is no older version of the same minor version available. Manual update of latest versions is required in this case.
func (*VersionsClient) FetchCLIInfo ¶
func (c *VersionsClient) FetchCLIInfo(ctx context.Context, cliInfo versionsapi.CLIInfo) (versionsapi.CLIInfo, error)
FetchCLIInfo fetches the given CLI info from the versions API.
func (*VersionsClient) FetchImageInfo ¶
func (c *VersionsClient) FetchImageInfo(ctx context.Context, imageInfo versionsapi.ImageInfo) (versionsapi.ImageInfo, error)
FetchImageInfo fetches the given image info from the versions API.
func (*VersionsClient) FetchVersionLatest ¶
func (c *VersionsClient) FetchVersionLatest(ctx context.Context, latest versionsapi.Latest) (versionsapi.Latest, error)
FetchVersionLatest fetches the latest version from the versions API.
func (*VersionsClient) FetchVersionList ¶
func (c *VersionsClient) FetchVersionList(ctx context.Context, list versionsapi.List) (versionsapi.List, error)
FetchVersionList fetches the given version list from the versions API.
func (*VersionsClient) UpdateCLIInfo ¶
func (c *VersionsClient) UpdateCLIInfo(ctx context.Context, cliInfo versionsapi.CLIInfo) error
UpdateCLIInfo updates the given CLI info in the versions API.
func (*VersionsClient) UpdateImageInfo ¶
func (c *VersionsClient) UpdateImageInfo(ctx context.Context, imageInfo versionsapi.ImageInfo) error
UpdateImageInfo updates the given image info in the versions API.
func (*VersionsClient) UpdateVersionLatest ¶
func (c *VersionsClient) UpdateVersionLatest(ctx context.Context, latest versionsapi.Latest) error
UpdateVersionLatest updates the latest version in the versions API.
func (*VersionsClient) UpdateVersionList ¶
func (c *VersionsClient) UpdateVersionList(ctx context.Context, list versionsapi.List) error
UpdateVersionList updates the given version list in the versions API.