Documentation
¶
Index ¶
- Variables
- func New() *cmd.SuperCommand
- type UploadIdCache
- func (c *UploadIdCache) Lookup(curl *charm.URL, resourceName string, contentHash []byte) (*UploadIdCacheEntry, error)
- func (c *UploadIdCache) Remove(curl *charm.URL, resourceName string, resourceHash []byte) error
- func (c *UploadIdCache) RemoveExpiredEntries() error
- func (c *UploadIdCache) Update(uploadId string, curl *charm.URL, resourceName string, resourceHash []byte) error
- type UploadIdCacheEntry
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 ¶
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.
Click to show internal directories.
Click to hide internal directories.