Documentation ¶
Index ¶
- type Config
- type DefaultRegionalAPIClientProvider
- type RegionalAPI
- type RegionalAPIClientProvider
- type Session
- func (s *Session) IKSVolumeAttachService() instances.VolumeAttachManager
- func (s *Session) Login(token string) error
- func (s *Session) SnapshotService() vpcvolume.SnapshotManager
- func (s *Session) VolumeAttachService() instances.VolumeAttachManager
- func (s *Session) VolumeService() vpcvolume.VolumeManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { BaseURL string AccountID string Username string APIKey string ResourceGroup string Password string ContextID string DebugWriter io.Writer HTTPClient *http.Client Context context.Context APIVersion string APIGeneration int }
Config for the Session
type DefaultRegionalAPIClientProvider ¶
type DefaultRegionalAPIClientProvider struct { }
DefaultRegionalAPIClientProvider declares a basic client provider that delegates to New(). Can be used for dependency injection.
func (DefaultRegionalAPIClientProvider) New ¶
func (d DefaultRegionalAPIClientProvider) New(config Config) (RegionalAPI, error)
New creates a new Session volume, using the supplied config
type RegionalAPI ¶
type RegionalAPI interface { Login(token string) error VolumeService() vpcvolume.VolumeManager VolumeAttachService() instances.VolumeAttachManager IKSVolumeAttachService() instances.VolumeAttachManager SnapshotService() vpcvolume.SnapshotManager }
RegionalAPI is the main interface for the RIAAS API client. From here, service objects for the individual parts of the API can be obtained
type RegionalAPIClientProvider ¶
type RegionalAPIClientProvider interface {
New(config Config) (RegionalAPI, error)
}
RegionalAPIClientProvider declares an interface for a provider that can supply a new RegionalAPI client session
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session is a base implementation of the RegionalAPI interface
func (*Session) IKSVolumeAttachService ¶
func (s *Session) IKSVolumeAttachService() instances.VolumeAttachManager
IKSVolumeAttachService returns the VolumeAttachService for managing volumes through IKS
func (*Session) Login ¶
Login configures the session with the supplied Authentication token which is used for all requests to the API
func (*Session) SnapshotService ¶
func (s *Session) SnapshotService() vpcvolume.SnapshotManager
SnapshotService returns the Snapshot service for managing snapshot
func (*Session) VolumeAttachService ¶
func (s *Session) VolumeAttachService() instances.VolumeAttachManager
VolumeAttachService returns the VolumeAttachService for managing volumes
func (*Session) VolumeService ¶
func (s *Session) VolumeService() vpcvolume.VolumeManager
VolumeService returns the Volume service for managing volumes