Documentation ¶
Index ¶
- Variables
- type MockPlanClient
- func (m *MockPlanClient) AddCharm(plan, charmURL string, isDefault bool) error
- func (m *MockPlanClient) Authorize(environmentUUID, charmURL, serviceName, plan string) (*macaroon.Macaroon, error)
- func (m *MockPlanClient) AuthorizeReseller(plan, charm, application, applicationOwner, applicationUser string) (*macaroon.Macaroon, error)
- func (m *MockPlanClient) Get(planURL string) ([]wireformat.Plan, error)
- func (m *MockPlanClient) GetAuthorizations(query wireformat.AuthorizationQuery) ([]wireformat.Authorization, error)
- func (m *MockPlanClient) GetDefaultPlan(charmURL string) (*wireformat.Plan, error)
- func (m *MockPlanClient) GetPlanDetails(planURL string) (*wireformat.PlanDetails, error)
- func (m *MockPlanClient) GetPlanRevisions(plan string) ([]wireformat.Plan, error)
- func (m *MockPlanClient) GetPlansForCharm(charmURL string) ([]wireformat.Plan, error)
- func (m *MockPlanClient) GetResellerAuthorizations(query wireformat.ResellerAuthorizationQuery) ([]wireformat.ResellerAuthorization, error)
- func (m *MockPlanClient) Release(planURL string) (*wireformat.Plan, error)
- func (m *MockPlanClient) Resume(planURL string, all bool, charmURLs ...string) error
- func (m *MockPlanClient) Save(planURL, definition string) (*wireformat.Plan, error)
- func (m *MockPlanClient) Suspend(planURL string, all bool, charmURLs ...string) error
Constants ¶
This section is empty.
Variables ¶
var MultilineEquals = &multilineEqualsChecker{ &check.CheckerInfo{ Name: "MultilineEquals", Params: []string{"obtained", "expected"}, }, }
var TestPlan = `` /* 292-byte string literal not displayed */
Functions ¶
This section is empty.
Types ¶
type MockPlanClient ¶
type MockPlanClient struct { *jujutesting.Stub PlanDetails *wireformat.PlanDetails PlanRevisions []wireformat.Plan Released bool }
MockPlanClient implements a mock of the plan api client.
func NewMockPlanClient ¶
func NewMockPlanClient() *MockPlanClient
NewMockPlanClient returns a new MockPlanClient
func (*MockPlanClient) AddCharm ¶
func (m *MockPlanClient) AddCharm(plan, charmURL string, isDefault bool) error
AddCharm adds a charm to an existing plan
func (*MockPlanClient) Authorize ¶
func (m *MockPlanClient) Authorize(environmentUUID, charmURL, serviceName, plan string) (*macaroon.Macaroon, error)
Authorize returns the authorization macaroon for the specified environment, charm url and service name.
func (*MockPlanClient) AuthorizeReseller ¶
func (m *MockPlanClient) AuthorizeReseller(plan, charm, application, applicationOwner, applicationUser string) (*macaroon.Macaroon, error)
AuthorizeReseller returns the reseller authorization macaroon for the specified application.
func (*MockPlanClient) Get ¶
func (m *MockPlanClient) Get(planURL string) ([]wireformat.Plan, error)
Get returns all plans stored in the mock, regardless of the query.
func (*MockPlanClient) GetAuthorizations ¶
func (m *MockPlanClient) GetAuthorizations(query wireformat.AuthorizationQuery) ([]wireformat.Authorization, error)
GetAuthorizations returns a slice of Authorizations that match the criteria specified in the query.
func (*MockPlanClient) GetDefaultPlan ¶
func (m *MockPlanClient) GetDefaultPlan(charmURL string) (*wireformat.Plan, error)
func (*MockPlanClient) GetPlanDetails ¶
func (m *MockPlanClient) GetPlanDetails(planURL string) (*wireformat.PlanDetails, error)
GetPlanDetails returns detailed information about a plan.
func (*MockPlanClient) GetPlanRevisions ¶
func (m *MockPlanClient) GetPlanRevisions(plan string) ([]wireformat.Plan, error)
GetPlanRevisions returns all revisions of a plan.
func (*MockPlanClient) GetPlansForCharm ¶
func (m *MockPlanClient) GetPlansForCharm(charmURL string) ([]wireformat.Plan, error)
func (*MockPlanClient) GetResellerAuthorizations ¶
func (m *MockPlanClient) GetResellerAuthorizations(query wireformat.ResellerAuthorizationQuery) ([]wireformat.ResellerAuthorization, error)
GetResellerAuthorizations retuns a slice of reseller Authorizations.
func (*MockPlanClient) Release ¶
func (m *MockPlanClient) Release(planURL string) (*wireformat.Plan, error)
Release releases the specified plan.
func (*MockPlanClient) Resume ¶
func (m *MockPlanClient) Resume(planURL string, all bool, charmURLs ...string) error
Resume resumes the plan for specified charms.
func (*MockPlanClient) Save ¶
func (m *MockPlanClient) Save(planURL, definition string) (*wireformat.Plan, error)
Save stores the plan in the mock.