Documentation ¶
Overview ¶
Package gen is a generated GoMock package.
Copyright 2019 Canonical Ltd. Licensed under the AGPLv3, see LICENCE file for details.
Copyright 2020 Canonical Ltd. Licensed under the AGPLv3, see LICENCE file for details.
Index ¶
- func Filter(g FacadeGroup, facades []facade.Details, registry Registry) []facade.Details
- type APIServer
- type FacadeGroup
- type FacadeSchema
- type Linker
- type MockAPIServer
- type MockAPIServerMockRecorder
- type MockLinker
- type MockLinkerMockRecorder
- type MockPackageRegistry
- type MockPackageRegistryMockRecorder
- type MockRegistry
- type MockRegistryMockRecorder
- type Option
- type PackageRegistry
- type Registry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FacadeGroup ¶
type FacadeGroup string
FacadeGroup defines the grouping you want to export.
const ( // Latest gets the latest facades from all the facades. Latest FacadeGroup = "latest" // All gets all the facades no matter the version. All FacadeGroup = "all" // Client facades returns just the client facades along with some required // facades that the client can use. Client FacadeGroup = "client" // JIMM facade group defines a very select set of facades that only work // with JIMM. This does not include the JIMM facade as defined in JIMM. JIMM FacadeGroup = "jimm" )
func ParseFacadeGroup ¶
func ParseFacadeGroup(s string) (FacadeGroup, error)
ParseFacadeGroup will attempt to parse the facade group
type FacadeSchema ¶
type FacadeSchema struct { Name string Description string Version int AvailableTo []string Schema *jsonschema.Schema }
func Generate ¶
func Generate(pkgRegistry PackageRegistry, linker Linker, client APIServer, options ...Option) ([]FacadeSchema, error)
Generate a FacadeSchema from the APIServer
type MockAPIServer ¶
type MockAPIServer struct {
// contains filtered or unexported fields
}
MockAPIServer is a mock of APIServer interface
func NewMockAPIServer ¶
func NewMockAPIServer(ctrl *gomock.Controller) *MockAPIServer
NewMockAPIServer creates a new mock instance
func (*MockAPIServer) AdminFacadeDetails ¶
func (m *MockAPIServer) AdminFacadeDetails() []facade.Details
AdminFacadeDetails mocks base method
func (*MockAPIServer) AllFacades ¶
func (m *MockAPIServer) AllFacades() Registry
AllFacades mocks base method
func (*MockAPIServer) EXPECT ¶
func (m *MockAPIServer) EXPECT() *MockAPIServerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockAPIServerMockRecorder ¶
type MockAPIServerMockRecorder struct {
// contains filtered or unexported fields
}
MockAPIServerMockRecorder is the mock recorder for MockAPIServer
func (*MockAPIServerMockRecorder) AdminFacadeDetails ¶
func (mr *MockAPIServerMockRecorder) AdminFacadeDetails() *gomock.Call
AdminFacadeDetails indicates an expected call of AdminFacadeDetails
func (*MockAPIServerMockRecorder) AllFacades ¶
func (mr *MockAPIServerMockRecorder) AllFacades() *gomock.Call
AllFacades indicates an expected call of AllFacades
type MockLinker ¶
type MockLinker struct {
// contains filtered or unexported fields
}
MockLinker is a mock of Linker interface
func NewMockLinker ¶
func NewMockLinker(ctrl *gomock.Controller) *MockLinker
NewMockLinker creates a new mock instance
func (*MockLinker) EXPECT ¶
func (m *MockLinker) EXPECT() *MockLinkerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockLinkerMockRecorder ¶
type MockLinkerMockRecorder struct {
// contains filtered or unexported fields
}
MockLinkerMockRecorder is the mock recorder for MockLinker
func (*MockLinkerMockRecorder) Links ¶
func (mr *MockLinkerMockRecorder) Links(arg0, arg1 interface{}) *gomock.Call
Links indicates an expected call of Links
type MockPackageRegistry ¶
type MockPackageRegistry struct {
// contains filtered or unexported fields
}
MockPackageRegistry is a mock of PackageRegistry interface
func NewMockPackageRegistry ¶
func NewMockPackageRegistry(ctrl *gomock.Controller) *MockPackageRegistry
NewMockPackageRegistry creates a new mock instance
func (*MockPackageRegistry) EXPECT ¶
func (m *MockPackageRegistry) EXPECT() *MockPackageRegistryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockPackageRegistry) LoadPackage ¶
func (m *MockPackageRegistry) LoadPackage() (*packages.Package, error)
LoadPackage mocks base method
type MockPackageRegistryMockRecorder ¶
type MockPackageRegistryMockRecorder struct {
// contains filtered or unexported fields
}
MockPackageRegistryMockRecorder is the mock recorder for MockPackageRegistry
func (*MockPackageRegistryMockRecorder) LoadPackage ¶
func (mr *MockPackageRegistryMockRecorder) LoadPackage() *gomock.Call
LoadPackage indicates an expected call of LoadPackage
type MockRegistry ¶
type MockRegistry struct {
// contains filtered or unexported fields
}
MockRegistry is a mock of Registry interface
func NewMockRegistry ¶
func NewMockRegistry(ctrl *gomock.Controller) *MockRegistry
NewMockRegistry creates a new mock instance
func (*MockRegistry) EXPECT ¶
func (m *MockRegistry) EXPECT() *MockRegistryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockRegistry) List ¶
func (m *MockRegistry) List() []facade.Description
List mocks base method
func (*MockRegistry) ListDetails ¶
func (m *MockRegistry) ListDetails() []facade.Details
ListDetails mocks base method
type MockRegistryMockRecorder ¶
type MockRegistryMockRecorder struct {
// contains filtered or unexported fields
}
MockRegistryMockRecorder is the mock recorder for MockRegistry
func (*MockRegistryMockRecorder) GetType ¶
func (mr *MockRegistryMockRecorder) GetType(arg0, arg1 interface{}) *gomock.Call
GetType indicates an expected call of GetType
func (*MockRegistryMockRecorder) List ¶
func (mr *MockRegistryMockRecorder) List() *gomock.Call
List indicates an expected call of List
func (*MockRegistryMockRecorder) ListDetails ¶
func (mr *MockRegistryMockRecorder) ListDetails() *gomock.Call
ListDetails indicates an expected call of ListDetails
type Option ¶
type Option func(*options)
Option to be passed to Connect to customize the resulting instance.
func WithAdminFacades ¶
WithAdminFacades sets the adminFacades on the option
func WithFacadeGroups ¶
func WithFacadeGroups(facadeGroups []FacadeGroup) Option
WithFacadeGroups sets the facadeGroups on the option