Documentation ¶
Overview ¶
Package charmdownloader is a generated GoMock package.
Package charmdownloader is a generated GoMock package.
Index ¶
- type Application
- type AuthChecker
- type Charm
- type CharmDownloaderAPI
- type Downloader
- type MockApplication
- type MockApplicationMockRecorder
- type MockAuthChecker
- type MockAuthCheckerMockRecorder
- type MockCharm
- type MockCharmMockRecorder
- type MockDownloader
- type MockDownloaderMockRecorder
- type MockModelBackend
- type MockModelBackendMockRecorder
- type MockResourcesBackend
- type MockResourcesBackendMockRecorder
- type MockStateBackend
- func (m *MockStateBackend) Application(arg0 string) (Application, error)
- func (m *MockStateBackend) ControllerConfig() (controller.Config, error)
- func (m *MockStateBackend) EXPECT() *MockStateBackendMockRecorder
- func (m *MockStateBackend) ModelUUID() string
- func (m *MockStateBackend) PrepareCharmUpload(arg0 *v9.URL) (services.UploadedCharm, error)
- func (m *MockStateBackend) UpdateUploadedCharm(arg0 state.CharmInfo) (services.UploadedCharm, error)
- func (m *MockStateBackend) WatchApplicationsWithPendingCharms() state.StringsWatcher
- type MockStateBackendMockRecorder
- func (mr *MockStateBackendMockRecorder) Application(arg0 interface{}) *gomock.Call
- func (mr *MockStateBackendMockRecorder) ControllerConfig() *gomock.Call
- func (mr *MockStateBackendMockRecorder) ModelUUID() *gomock.Call
- func (mr *MockStateBackendMockRecorder) PrepareCharmUpload(arg0 interface{}) *gomock.Call
- func (mr *MockStateBackendMockRecorder) UpdateUploadedCharm(arg0 interface{}) *gomock.Call
- func (mr *MockStateBackendMockRecorder) WatchApplicationsWithPendingCharms() *gomock.Call
- type MockStringsWatcher
- type MockStringsWatcherMockRecorder
- func (mr *MockStringsWatcherMockRecorder) Changes() *gomock.Call
- func (mr *MockStringsWatcherMockRecorder) Err() *gomock.Call
- func (mr *MockStringsWatcherMockRecorder) Kill() *gomock.Call
- func (mr *MockStringsWatcherMockRecorder) Stop() *gomock.Call
- func (mr *MockStringsWatcherMockRecorder) Wait() *gomock.Call
- type ModelBackend
- type ResourcesBackend
- type StateBackend
- type StoppableResource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application interface { CharmPendingToBeDownloaded() bool SetStatus(status.StatusInfo) error CharmOrigin() *corecharm.Origin Charm() (Charm, bool, error) }
Application provides an API for querying application-specific details.
type AuthChecker ¶
type AuthChecker interface { // AuthController returns true if the entity performing the current API // call is a machine acting as a controller. AuthController() bool }
AuthChecker provides an API for checking if the API client is a controller.
type Charm ¶
type Charm interface { URL() *charm.URL Macaroon() (macaroon.Slice, error) }
Charm provides an API for querying charm details.
type CharmDownloaderAPI ¶
type CharmDownloaderAPI struct {
// contains filtered or unexported fields
}
CharmDownloaderAPI implements an API for watching the charms collection for any entries that have not been yet downloaded to the blobstore and for triggering their download.
func NewFacadeV1 ¶
func NewFacadeV1(ctx facade.Context) (*CharmDownloaderAPI, error)
NewFacadeV1 provides the signature required for facade V1 registration.
func (*CharmDownloaderAPI) DownloadApplicationCharms ¶
func (a *CharmDownloaderAPI) DownloadApplicationCharms(args params.Entities) (params.ErrorResults, error)
DownloadApplicationCharms iterates the list of provided applications and downloads any referenced charms that have not yet been persisted to the blob store.
func (*CharmDownloaderAPI) WatchApplicationsWithPendingCharms ¶
func (a *CharmDownloaderAPI) WatchApplicationsWithPendingCharms() (params.StringsWatchResult, error)
WatchApplicationsWithPendingCharms registers and returns a watcher instance that reports the ID of applications that reference a charm which has not yet been downloaded.
type Downloader ¶
type Downloader interface {
DownloadAndStore(charmURL *charm.URL, requestedOrigin corecharm.Origin, macaroons macaroon.Slice, force bool) (corecharm.Origin, error)
}
Downloader defines an API for downloading and storing charms.
type MockApplication ¶
type MockApplication struct {
// contains filtered or unexported fields
}
MockApplication is a mock of Application interface.
func NewMockApplication ¶
func NewMockApplication(ctrl *gomock.Controller) *MockApplication
NewMockApplication creates a new mock instance.
func (*MockApplication) Charm ¶
func (m *MockApplication) Charm() (Charm, bool, error)
Charm mocks base method.
func (*MockApplication) CharmOrigin ¶
func (m *MockApplication) CharmOrigin() *charm.Origin
CharmOrigin mocks base method.
func (*MockApplication) CharmPendingToBeDownloaded ¶
func (m *MockApplication) CharmPendingToBeDownloaded() bool
CharmPendingToBeDownloaded mocks base method.
func (*MockApplication) EXPECT ¶
func (m *MockApplication) EXPECT() *MockApplicationMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockApplication) SetStatus ¶
func (m *MockApplication) SetStatus(arg0 status.StatusInfo) error
SetStatus mocks base method.
type MockApplicationMockRecorder ¶
type MockApplicationMockRecorder struct {
// contains filtered or unexported fields
}
MockApplicationMockRecorder is the mock recorder for MockApplication.
func (*MockApplicationMockRecorder) Charm ¶
func (mr *MockApplicationMockRecorder) Charm() *gomock.Call
Charm indicates an expected call of Charm.
func (*MockApplicationMockRecorder) CharmOrigin ¶
func (mr *MockApplicationMockRecorder) CharmOrigin() *gomock.Call
CharmOrigin indicates an expected call of CharmOrigin.
func (*MockApplicationMockRecorder) CharmPendingToBeDownloaded ¶
func (mr *MockApplicationMockRecorder) CharmPendingToBeDownloaded() *gomock.Call
CharmPendingToBeDownloaded indicates an expected call of CharmPendingToBeDownloaded.
func (*MockApplicationMockRecorder) SetStatus ¶
func (mr *MockApplicationMockRecorder) SetStatus(arg0 interface{}) *gomock.Call
SetStatus indicates an expected call of SetStatus.
type MockAuthChecker ¶
type MockAuthChecker struct {
// contains filtered or unexported fields
}
MockAuthChecker is a mock of AuthChecker interface.
func NewMockAuthChecker ¶
func NewMockAuthChecker(ctrl *gomock.Controller) *MockAuthChecker
NewMockAuthChecker creates a new mock instance.
func (*MockAuthChecker) AuthController ¶
func (m *MockAuthChecker) AuthController() bool
AuthController mocks base method.
func (*MockAuthChecker) EXPECT ¶
func (m *MockAuthChecker) EXPECT() *MockAuthCheckerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockAuthCheckerMockRecorder ¶
type MockAuthCheckerMockRecorder struct {
// contains filtered or unexported fields
}
MockAuthCheckerMockRecorder is the mock recorder for MockAuthChecker.
func (*MockAuthCheckerMockRecorder) AuthController ¶
func (mr *MockAuthCheckerMockRecorder) AuthController() *gomock.Call
AuthController indicates an expected call of AuthController.
type MockCharm ¶
type MockCharm struct {
// contains filtered or unexported fields
}
MockCharm is a mock of Charm interface.
func NewMockCharm ¶
func NewMockCharm(ctrl *gomock.Controller) *MockCharm
NewMockCharm creates a new mock instance.
func (*MockCharm) EXPECT ¶
func (m *MockCharm) EXPECT() *MockCharmMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockCharmMockRecorder ¶
type MockCharmMockRecorder struct {
// contains filtered or unexported fields
}
MockCharmMockRecorder is the mock recorder for MockCharm.
func (*MockCharmMockRecorder) Macaroon ¶
func (mr *MockCharmMockRecorder) Macaroon() *gomock.Call
Macaroon indicates an expected call of Macaroon.
func (*MockCharmMockRecorder) URL ¶
func (mr *MockCharmMockRecorder) URL() *gomock.Call
URL indicates an expected call of URL.
type MockDownloader ¶
type MockDownloader struct {
// contains filtered or unexported fields
}
MockDownloader is a mock of Downloader interface.
func NewMockDownloader ¶
func NewMockDownloader(ctrl *gomock.Controller) *MockDownloader
NewMockDownloader creates a new mock instance.
func (*MockDownloader) DownloadAndStore ¶
func (m *MockDownloader) DownloadAndStore(arg0 *v9.URL, arg1 charm.Origin, arg2 macaroon_v2.Slice, arg3 bool) (charm.Origin, error)
DownloadAndStore mocks base method.
func (*MockDownloader) EXPECT ¶
func (m *MockDownloader) EXPECT() *MockDownloaderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockDownloaderMockRecorder ¶
type MockDownloaderMockRecorder struct {
// contains filtered or unexported fields
}
MockDownloaderMockRecorder is the mock recorder for MockDownloader.
func (*MockDownloaderMockRecorder) DownloadAndStore ¶
func (mr *MockDownloaderMockRecorder) DownloadAndStore(arg0, arg1, arg2, arg3 interface{}) *gomock.Call
DownloadAndStore indicates an expected call of DownloadAndStore.
type MockModelBackend ¶
type MockModelBackend struct {
// contains filtered or unexported fields
}
MockModelBackend is a mock of ModelBackend interface.
func NewMockModelBackend ¶
func NewMockModelBackend(ctrl *gomock.Controller) *MockModelBackend
NewMockModelBackend creates a new mock instance.
func (*MockModelBackend) Config ¶
func (m *MockModelBackend) Config() (*config.Config, error)
Config mocks base method.
func (*MockModelBackend) EXPECT ¶
func (m *MockModelBackend) EXPECT() *MockModelBackendMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockModelBackendMockRecorder ¶
type MockModelBackendMockRecorder struct {
// contains filtered or unexported fields
}
MockModelBackendMockRecorder is the mock recorder for MockModelBackend.
func (*MockModelBackendMockRecorder) Config ¶
func (mr *MockModelBackendMockRecorder) Config() *gomock.Call
Config indicates an expected call of Config.
type MockResourcesBackend ¶
type MockResourcesBackend struct {
// contains filtered or unexported fields
}
MockResourcesBackend is a mock of ResourcesBackend interface.
func NewMockResourcesBackend ¶
func NewMockResourcesBackend(ctrl *gomock.Controller) *MockResourcesBackend
NewMockResourcesBackend creates a new mock instance.
func (*MockResourcesBackend) EXPECT ¶
func (m *MockResourcesBackend) EXPECT() *MockResourcesBackendMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockResourcesBackend) Register ¶
func (m *MockResourcesBackend) Register(arg0 StoppableResource) string
Register mocks base method.
type MockResourcesBackendMockRecorder ¶
type MockResourcesBackendMockRecorder struct {
// contains filtered or unexported fields
}
MockResourcesBackendMockRecorder is the mock recorder for MockResourcesBackend.
func (*MockResourcesBackendMockRecorder) Register ¶
func (mr *MockResourcesBackendMockRecorder) Register(arg0 interface{}) *gomock.Call
Register indicates an expected call of Register.
type MockStateBackend ¶
type MockStateBackend struct {
// contains filtered or unexported fields
}
MockStateBackend is a mock of StateBackend interface.
func NewMockStateBackend ¶
func NewMockStateBackend(ctrl *gomock.Controller) *MockStateBackend
NewMockStateBackend creates a new mock instance.
func (*MockStateBackend) Application ¶
func (m *MockStateBackend) Application(arg0 string) (Application, error)
Application mocks base method.
func (*MockStateBackend) ControllerConfig ¶
func (m *MockStateBackend) ControllerConfig() (controller.Config, error)
ControllerConfig mocks base method.
func (*MockStateBackend) EXPECT ¶
func (m *MockStateBackend) EXPECT() *MockStateBackendMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockStateBackend) ModelUUID ¶
func (m *MockStateBackend) ModelUUID() string
ModelUUID mocks base method.
func (*MockStateBackend) PrepareCharmUpload ¶
func (m *MockStateBackend) PrepareCharmUpload(arg0 *v9.URL) (services.UploadedCharm, error)
PrepareCharmUpload mocks base method.
func (*MockStateBackend) UpdateUploadedCharm ¶
func (m *MockStateBackend) UpdateUploadedCharm(arg0 state.CharmInfo) (services.UploadedCharm, error)
UpdateUploadedCharm mocks base method.
func (*MockStateBackend) WatchApplicationsWithPendingCharms ¶
func (m *MockStateBackend) WatchApplicationsWithPendingCharms() state.StringsWatcher
WatchApplicationsWithPendingCharms mocks base method.
type MockStateBackendMockRecorder ¶
type MockStateBackendMockRecorder struct {
// contains filtered or unexported fields
}
MockStateBackendMockRecorder is the mock recorder for MockStateBackend.
func (*MockStateBackendMockRecorder) Application ¶
func (mr *MockStateBackendMockRecorder) Application(arg0 interface{}) *gomock.Call
Application indicates an expected call of Application.
func (*MockStateBackendMockRecorder) ControllerConfig ¶
func (mr *MockStateBackendMockRecorder) ControllerConfig() *gomock.Call
ControllerConfig indicates an expected call of ControllerConfig.
func (*MockStateBackendMockRecorder) ModelUUID ¶
func (mr *MockStateBackendMockRecorder) ModelUUID() *gomock.Call
ModelUUID indicates an expected call of ModelUUID.
func (*MockStateBackendMockRecorder) PrepareCharmUpload ¶
func (mr *MockStateBackendMockRecorder) PrepareCharmUpload(arg0 interface{}) *gomock.Call
PrepareCharmUpload indicates an expected call of PrepareCharmUpload.
func (*MockStateBackendMockRecorder) UpdateUploadedCharm ¶
func (mr *MockStateBackendMockRecorder) UpdateUploadedCharm(arg0 interface{}) *gomock.Call
UpdateUploadedCharm indicates an expected call of UpdateUploadedCharm.
func (*MockStateBackendMockRecorder) WatchApplicationsWithPendingCharms ¶
func (mr *MockStateBackendMockRecorder) WatchApplicationsWithPendingCharms() *gomock.Call
WatchApplicationsWithPendingCharms indicates an expected call of WatchApplicationsWithPendingCharms.
type MockStringsWatcher ¶
type MockStringsWatcher struct {
// contains filtered or unexported fields
}
MockStringsWatcher is a mock of StringsWatcher interface.
func NewMockStringsWatcher ¶
func NewMockStringsWatcher(ctrl *gomock.Controller) *MockStringsWatcher
NewMockStringsWatcher creates a new mock instance.
func (*MockStringsWatcher) Changes ¶
func (m *MockStringsWatcher) Changes() <-chan []string
Changes mocks base method.
func (*MockStringsWatcher) EXPECT ¶
func (m *MockStringsWatcher) EXPECT() *MockStringsWatcherMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockStringsWatcherMockRecorder ¶
type MockStringsWatcherMockRecorder struct {
// contains filtered or unexported fields
}
MockStringsWatcherMockRecorder is the mock recorder for MockStringsWatcher.
func (*MockStringsWatcherMockRecorder) Changes ¶
func (mr *MockStringsWatcherMockRecorder) Changes() *gomock.Call
Changes indicates an expected call of Changes.
func (*MockStringsWatcherMockRecorder) Err ¶
func (mr *MockStringsWatcherMockRecorder) Err() *gomock.Call
Err indicates an expected call of Err.
func (*MockStringsWatcherMockRecorder) Kill ¶
func (mr *MockStringsWatcherMockRecorder) Kill() *gomock.Call
Kill indicates an expected call of Kill.
func (*MockStringsWatcherMockRecorder) Stop ¶
func (mr *MockStringsWatcherMockRecorder) Stop() *gomock.Call
Stop indicates an expected call of Stop.
func (*MockStringsWatcherMockRecorder) Wait ¶
func (mr *MockStringsWatcherMockRecorder) Wait() *gomock.Call
Wait indicates an expected call of Wait.
type ModelBackend ¶
ModelBackend describes an API for accessing model-specific details.
type ResourcesBackend ¶
type ResourcesBackend interface {
Register(StoppableResource) string
}
ResourcesBackend handles the registration of a stoppable resource and controls its lifecycle.
type StateBackend ¶
type StateBackend interface { WatchApplicationsWithPendingCharms() state.StringsWatcher ControllerConfig() (controller.Config, error) UpdateUploadedCharm(info state.CharmInfo) (services.UploadedCharm, error) PrepareCharmUpload(curl *charm.URL) (services.UploadedCharm, error) ModelUUID() string Application(string) (Application, error) }
StateBackend describes an API for accessing/mutating information in state.
type StoppableResource ¶
type StoppableResource interface {
Stop() error
}
StoppableResource is implemented by resources that can be stopped.