rancherapi

package
v2.0.0-...-779d152 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	Cluster() ClusterAPI
	ETCDBackup() ETCDBackupAPI
}

func New

func New(client *resty.Client) API

type APIImpl

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

func (*APIImpl) Cluster

func (api *APIImpl) Cluster() ClusterAPI

func (*APIImpl) ETCDBackup

func (api *APIImpl) ETCDBackup() ETCDBackupAPI

type Cluster

type Cluster struct {
	ID   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

type ClusterAPI

type ClusterAPI interface {
	List() ([]*Cluster, error)
	GetByName(name string) (*Cluster, error)
}

func NewClusterAPI

func NewClusterAPI(client *resty.Client) ClusterAPI

type ClusterAPIImpl

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

func (*ClusterAPIImpl) GetByName

func (api *ClusterAPIImpl) GetByName(name string) (*Cluster, error)

func (*ClusterAPIImpl) List

func (api *ClusterAPIImpl) List() ([]*Cluster, error)

type ClustersResponse

type ClustersResponse struct {
	Data []*Cluster `json:"data,omitempty"`
}

type ETCDBackup

type ETCDBackup struct {
	ID            string    `json:"id,omitempty"`
	ClusterID     string    `json:"clusterId,omitempty"`
	CreatedAt     time.Time `json:"created,omitempty"`
	Filename      string    `json:"filename,omitempty"`
	State         string    `json:"state,omitempty"`
	Transitioning string    `json:"transitioning,omitempty"`
}

type ETCDBackupAPI

type ETCDBackupAPI interface {
	List() ([]*ETCDBackup, error)
	ListByClusterID(clusterID string) ([]*ETCDBackup, error)
}

func NewETCDBackupAPI

func NewETCDBackupAPI(client *resty.Client) ETCDBackupAPI

type ETCDBackupAPIImpl

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

func (*ETCDBackupAPIImpl) List

func (api *ETCDBackupAPIImpl) List() ([]*ETCDBackup, error)

func (*ETCDBackupAPIImpl) ListByClusterID

func (api *ETCDBackupAPIImpl) ListByClusterID(clusterID string) ([]*ETCDBackup, error)

type ETCDBackupResp

type ETCDBackupResp struct {
	Data []*ETCDBackup `json:"data,omitempty"`
}

Jump to

Keyboard shortcuts

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