storage

package
v1.22.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Host

type Host struct {
	ID         int                 `json:"id"`
	Name       string              `json:"name"`
	OSType     string              `json:"os_type"`
	IQN        string              `json:"iqn"`
	ServerID   int                 `json:"server_id"`
	Status     string              `json:"status"`
	SolutionID int                 `json:"solution_id"`
	CreatedAt  connection.DateTime `json:"created_at"`
	UpdatedAt  connection.DateTime `json:"updated_at"`
}

Host represents a host

type HostNotFoundError

type HostNotFoundError struct {
	ID int
}

HostNotFoundError indicates a virtual machine was not found

func (*HostNotFoundError) Error

func (e *HostNotFoundError) Error() string

type HostSet

type HostSet struct {
	ID         int                 `json:"id"`
	Name       string              `json:"name"`
	SolutionID int                 `json:"solution_id"`
	CreatedAt  connection.DateTime `json:"created_at"`
	UpdatedAt  connection.DateTime `json:"updated_at"`
}

HostSet represents a host set

type IOPS

type IOPS struct {
	ID    int    `json:"id"`
	Name  string `json:"name"`
	Limit int    `json:"limit"`
}

IOPS represents an IOPS tier

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service implements StorageService for managing Storage certificates via the UKFast API

func NewService

func NewService(connection connection.Connection) *Service

NewService returns a new instance of StorageService

func (*Service) GetHost

func (s *Service) GetHost(hostID int) (Host, error)

GetHost retrieves a single host by id

func (*Service) GetHosts

func (s *Service) GetHosts(parameters connection.APIRequestParameters) ([]Host, error)

GetHosts retrieves a list of hosts

func (*Service) GetHostsPaginated

func (s *Service) GetHostsPaginated(parameters connection.APIRequestParameters) (*connection.Paginated[Host], error)

GetHostsPaginated retrieves a paginated list of hosts

func (*Service) GetSolution

func (s *Service) GetSolution(solutionID int) (Solution, error)

GetSolution retrieves a single solution by id

func (*Service) GetSolutions

func (s *Service) GetSolutions(parameters connection.APIRequestParameters) ([]Solution, error)

GetSolutions retrieves a list of solutions

func (*Service) GetSolutionsPaginated

func (s *Service) GetSolutionsPaginated(parameters connection.APIRequestParameters) (*connection.Paginated[Solution], error)

GetSolutionsPaginated retrieves a paginated list of solutions

func (*Service) GetVolume

func (s *Service) GetVolume(volumeID int) (Volume, error)

GetVolume retrieves a single volume by id

func (*Service) GetVolumes

func (s *Service) GetVolumes(parameters connection.APIRequestParameters) ([]Volume, error)

GetVolumes retrieves a list of volumes

func (*Service) GetVolumesPaginated

func (s *Service) GetVolumesPaginated(parameters connection.APIRequestParameters) (*connection.Paginated[Volume], error)

GetVolumesPaginated retrieves a paginated list of volumes

type Solution

type Solution struct {
	ID        int                 `json:"id"`
	Name      string              `json:"name"`
	SanID     int                 `json:"san_id"`
	CreatedAt connection.DateTime `json:"created_at"`
	UpdatedAt connection.DateTime `json:"updated_at"`
}

Solution represents a solution

type SolutionNotFoundError

type SolutionNotFoundError struct {
	ID int
}

SolutionNotFoundError indicates a virtual machine was not found

func (*SolutionNotFoundError) Error

func (e *SolutionNotFoundError) Error() string

type StorageService

type StorageService interface {
	GetSolutions(parameters connection.APIRequestParameters) ([]Solution, error)
	GetSolutionsPaginated(parameters connection.APIRequestParameters) (*connection.Paginated[Solution], error)
	GetSolution(certificateID int) (Solution, error)
	GetHosts(parameters connection.APIRequestParameters) ([]Host, error)
	GetHostsPaginated(parameters connection.APIRequestParameters) (*connection.Paginated[Host], error)
	GetHost(hostID int) (Host, error)
	GetVolumes(parameters connection.APIRequestParameters) ([]Volume, error)
	GetVolumesPaginated(parameters connection.APIRequestParameters) (*connection.Paginated[Volume], error)
	GetVolume(volumeID int) (Volume, error)
}

StorageService is an interface for managing UKFast Storage

type Volume

type Volume struct {
	ID         int                 `json:"id"`
	Name       string              `json:"name"`
	WWN        string              `json:"wwn"`
	SizeGB     int                 `json:"size_gb"`
	Status     string              `json:"status"`
	SolutionID int                 `json:"solution_id"`
	CreatedAt  connection.DateTime `json:"created_at"`
	UpdatedAt  connection.DateTime `json:"updated_at"`
}

Volume represents a volume

type VolumeNotFoundError

type VolumeNotFoundError struct {
	ID int
}

VolumeNotFoundError indicates a virtual machine was not found

func (*VolumeNotFoundError) Error

func (e *VolumeNotFoundError) Error() string

type VolumeSet

type VolumeSet struct {
	ID         int                 `json:"id"`
	SolutionID int                 `json:"solution_id"`
	MaxIOPS    int                 `json:"max_iops"`
	CreatedAt  connection.DateTime `json:"created_at"`
	UpdatedAt  connection.DateTime `json:"updated_at"`
}

VolumeSet represents a volume set

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL