charmcmd

package
v2.3.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2018 License: GPL-3.0 Imports: 56 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DEFAULT_SUMMARY_FIELDS = []string{
	"perm", "charm-metadata", "bundle-metadata",
	"bugs-url", "homepage", "published", "promulgated", "owner", "terms",
	"id-name", "id-revision", "supported-series",
}
View Source
var MinMultipartUploadSize int64

MinMultipartUploadSize holds the minimum size of upload to trigger multipart uploads. If zero, the default will be used.

Functions

func New

func New() *cmd.SuperCommand

New returns a command that can execute charm commands.

Types

type UploadIdCache

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

func NewUploadIdCache

func NewUploadIdCache(dir string, expiryDuration time.Duration) *UploadIdCache

func (*UploadIdCache) Lookup

func (c *UploadIdCache) Lookup(curl *charm.URL, resourceName string, contentHash []byte) (*UploadIdCacheEntry, error)

lookup returns the entry for the given charm URL, resource name and content hash the SHA256 of the content), or an error with an errCacheEntryNotFound cause if none was found.

func (*UploadIdCache) Remove

func (c *UploadIdCache) Remove(curl *charm.URL, resourceName string, resourceHash []byte) error

Remove removes the entry for the given charm, resource and hash.

func (*UploadIdCache) RemoveExpiredEntries

func (c *UploadIdCache) RemoveExpiredEntries() error

RemoveExpiredEntries removes all expired entries from the cache.

func (*UploadIdCache) Update

func (c *UploadIdCache) Update(uploadId string, curl *charm.URL, resourceName string, resourceHash []byte) error

type UploadIdCacheEntry

type UploadIdCacheEntry struct {
	CharmURL     *charm.URL
	ResourceName string
	ResourceHash string
	Size         int64
	CreatedDate  time.Time
	UploadId     string
}

Jump to

Keyboard shortcuts

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