Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AmbiguousResolutionError ¶
type AmbiguousResolutionError string
AmbiguousResolutionError is a resolver error when multiple matching entries have been found
func (AmbiguousResolutionError) Error ¶
func (s AmbiguousResolutionError) Error() string
type CachingDatabase ¶ added in v1.4.0
type CachingDatabase struct{}
CachingDatabase implements resolver for servers, caching the results
func (CachingDatabase) Get ¶ added in v1.4.0
func (s CachingDatabase) Get(svc internal.AllServices) (Resolver, error)
Get implements ResolutionProvider.Get
func (CachingDatabase) PositionalArgumentHelp ¶ added in v1.4.0
func (s CachingDatabase) PositionalArgumentHelp() string
PositionalArgumentHelp implements resolver.ResolutionProvider
type CachingIPAddress ¶
type CachingIPAddress struct{}
CachingIPAddress implements resolver for ip addresses that resolve with ptr records, caching the results
func (CachingIPAddress) Get ¶
func (s CachingIPAddress) Get(svc internal.AllServices) (Resolver, error)
Get implements ResolutionProvider.Get
func (CachingIPAddress) PositionalArgumentHelp ¶
func (s CachingIPAddress) PositionalArgumentHelp() string
PositionalArgumentHelp implements resolver.ResolutionProvider
type CachingLoadBalancer ¶ added in v1.4.0
type CachingLoadBalancer struct{}
CachingLoadBalancer implements resolver for servers, caching the results
func (CachingLoadBalancer) Get ¶ added in v1.4.0
func (s CachingLoadBalancer) Get(svc internal.AllServices) (Resolver, error)
Get implements ResolutionProvider.Get
func (CachingLoadBalancer) PositionalArgumentHelp ¶ added in v1.4.0
func (s CachingLoadBalancer) PositionalArgumentHelp() string
PositionalArgumentHelp implements resolver.ResolutionProvider
type CachingNetwork ¶
type CachingNetwork struct {
// contains filtered or unexported fields
}
CachingNetwork implements resolver for networks, caching the results
func (*CachingNetwork) Get ¶
func (s *CachingNetwork) Get(svc internal.AllServices) (Resolver, error)
Get implements ResolutionProvider.Get
func (*CachingNetwork) GetCached ¶
func (s *CachingNetwork) GetCached(uuid string) (upcloud.Network, error)
GetCached is a helper method for commands to use when they need to get an item from the cached results
func (*CachingNetwork) PositionalArgumentHelp ¶
func (s *CachingNetwork) PositionalArgumentHelp() string
PositionalArgumentHelp implements resolver.ResolutionProvider
type CachingRouter ¶
type CachingRouter struct {
// contains filtered or unexported fields
}
CachingRouter implements resolver for routers by uuid or name, caching the results
func (*CachingRouter) Get ¶
func (s *CachingRouter) Get(svc internal.AllServices) (Resolver, error)
Get implements ResolutionProvider.Get
func (*CachingRouter) GetCached ¶
func (s *CachingRouter) GetCached(uuid string) (upcloud.Router, error)
GetCached is a helper method for commands to use when they need to get an item from the cached results
func (*CachingRouter) PositionalArgumentHelp ¶
func (s *CachingRouter) PositionalArgumentHelp() string
PositionalArgumentHelp implements resolver.ResolutionProvider
type CachingServer ¶
type CachingServer struct{}
CachingServer implements resolver for servers, caching the results
func (CachingServer) Get ¶
func (s CachingServer) Get(svc internal.AllServices) (Resolver, error)
Get implements ResolutionProvider.Get
func (CachingServer) PositionalArgumentHelp ¶
func (s CachingServer) PositionalArgumentHelp() string
PositionalArgumentHelp implements resolver.ResolutionProvider
type CachingStorage ¶
type CachingStorage struct {
// contains filtered or unexported fields
}
CachingStorage implements resolver for storages, caching the results
func (*CachingStorage) Get ¶
func (s *CachingStorage) Get(svc internal.AllServices) (Resolver, error)
Get implements ResolutionProvider.Get
func (*CachingStorage) GetCached ¶
func (s *CachingStorage) GetCached(uuid string) (upcloud.Storage, error)
GetCached is a helper method for commands to use when they need to get an item from the cached results
func (*CachingStorage) PositionalArgumentHelp ¶
func (s *CachingStorage) PositionalArgumentHelp() string
PositionalArgumentHelp implements resolver.ResolutionProvider
type CompletionResolver ¶
type CompletionResolver struct{}
CompletionResolver implements resolver for servers, caching the results
func (CompletionResolver) Get ¶
func (s CompletionResolver) Get(_ internal.AllServices) (Resolver, error)
Get is just a passthrough to respect the lib
func (CompletionResolver) PositionalArgumentHelp ¶
func (s CompletionResolver) PositionalArgumentHelp() string
PositionalArgumentHelp implements resolver.ResolutionProvider
type NotFoundError ¶
type NotFoundError string
NotFoundError is a resolver error when no matching entries have been found
func (NotFoundError) Error ¶
func (s NotFoundError) Error() string
type ResolutionProvider ¶
type ResolutionProvider interface { Get(svc service.AllServices) (Resolver, error) PositionalArgumentHelp() string }
ResolutionProvider is an interface for commands that provide resolution, either custom or the built-in ones