charmdownloader

package
v0.0.0-...-b0bff92 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Overview

Package charmdownloader is a generated GoMock package.

Package charmdownloader is a generated GoMock package.

Index

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

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

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

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.

func (*MockCharm) Macaroon

func (m *MockCharm) Macaroon() (macaroon_v2.Slice, error)

Macaroon mocks base method.

func (*MockCharm) URL

func (m *MockCharm) URL() *v9.URL

URL mocks base method.

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

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

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

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

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

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

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockStringsWatcher) Err

func (m *MockStringsWatcher) Err() error

Err mocks base method.

func (*MockStringsWatcher) Kill

func (m *MockStringsWatcher) Kill()

Kill mocks base method.

func (*MockStringsWatcher) Stop

func (m *MockStringsWatcher) Stop() error

Stop mocks base method.

func (*MockStringsWatcher) Wait

func (m *MockStringsWatcher) Wait() error

Wait mocks base method.

type MockStringsWatcherMockRecorder

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

MockStringsWatcherMockRecorder is the mock recorder for MockStringsWatcher.

func (*MockStringsWatcherMockRecorder) Changes

Changes indicates an expected call of Changes.

func (*MockStringsWatcherMockRecorder) Err

Err indicates an expected call of Err.

func (*MockStringsWatcherMockRecorder) Kill

Kill indicates an expected call of Kill.

func (*MockStringsWatcherMockRecorder) Stop

Stop indicates an expected call of Stop.

func (*MockStringsWatcherMockRecorder) Wait

Wait indicates an expected call of Wait.

type ModelBackend

type ModelBackend interface {
	Config() (*config.Config, error)
}

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.

Jump to

Keyboard shortcuts

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