Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application interface { CharmURL() (curl *charm.URL, force bool) CharmOrigin() *state.CharmOrigin Channel() csparams.Channel ApplicationTag() names.ApplicationTag }
Application is the subset of *state.Application that we need.
type CharmRevisionUpdater ¶
type CharmRevisionUpdater interface {
UpdateLatestRevisions() (params.ErrorResult, error)
}
CharmRevisionUpdater defines the methods on the charmrevisionupdater API end point.
type CharmRevisionUpdaterAPI ¶
type CharmRevisionUpdaterAPI struct {
// contains filtered or unexported fields
}
CharmRevisionUpdaterAPI implements the CharmRevisionUpdater interface and is the concrete implementation of the api end point.
func NewCharmRevisionUpdaterAPI ¶
func NewCharmRevisionUpdaterAPI(ctx facade.Context) (*CharmRevisionUpdaterAPI, error)
NewCharmRevisionUpdaterAPI creates a new server-side charmrevisionupdater API end point.
func NewCharmRevisionUpdaterAPIState ¶
func NewCharmRevisionUpdaterAPIState( state State, newCharmstoreClient newCharmstoreClientFunc, newCharmhubClient newCharmhubClientFunc, ) (*CharmRevisionUpdaterAPI, error)
NewCharmRevisionUpdaterAPIState creates a new charmrevisionupdater API with a State interface directly (mainly for use in tests).
func (*CharmRevisionUpdaterAPI) UpdateLatestRevisions ¶
func (api *CharmRevisionUpdaterAPI) UpdateLatestRevisions() (params.ErrorResult, error)
UpdateLatestRevisions retrieves the latest revision information from the charm store for all deployed charms and records this information in state.
type CharmhubRefreshClient ¶
type CharmhubRefreshClient interface {
Refresh(ctx context.Context, config charmhub.RefreshConfig) ([]transport.RefreshResponse, error)
}
CharmhubRefreshClient is an interface for the methods of the charmhub client that we need.
type Model ¶
type Model interface { CloudName() string CloudRegion() string Config() (*config.Config, error) IsControllerModel() bool UUID() string }
Model is the subset of *state.Model that we need.
type State ¶
type State interface { AddCharmPlaceholder(curl *charm.URL) error AllApplications() ([]Application, error) Charm(curl *charm.URL) (*state.Charm, error) Cloud(name string) (cloud.Cloud, error) ControllerConfig() (controller.Config, error) ControllerUUID() string Model() (Model, error) Resources() (state.Resources, error) }
State is the subset of *state.State that we need.