Documentation ¶
Index ¶
Constants ¶
View Source
const HookContextFacade = "ResourcesHookContext"
HookContextFacade is the name of the API facade for resources in the uniter.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIClient ¶
type APIClient interface { // GetResource returns the resource info and content for the given // name (and unit-implied application). GetResource(resourceName string) (resource.Resource, io.ReadCloser, error) }
APIClient exposes the uniter API functionality needed for resources.
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Content is the resources portion of a uniter hook context.
func NewContextAPI ¶
NewContextAPI returns a new Content for the given API client and data dir.
type FingerprintMatcher ¶
type FingerprintMatcher struct { // Open opens the identified file. It defaults to os.Open. Open func(filename string) (io.ReadCloser, error) // GenerateFingerprint produces the fingerprint that corresponds // to the content of the provided reader. It defaults to // charmresource.GenerateFingerprint. GenerateFingerprint func(io.Reader) (charmresource.Fingerprint, error) }
FingerprintMatcher supports verifying a file's fingerprint.
func (FingerprintMatcher) FingerprintMatches ¶
func (fpm FingerprintMatcher) FingerprintMatches(filename string, expected charmresource.Fingerprint) (bool, error)
FingerprintMatches determines whether or not the identified file's fingerprint matches the expected fingerprint.
Click to show internal directories.
Click to hide internal directories.