cloud

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient

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

func NewClient

func NewClient(address, apikey string) *APIClient

func (*APIClient) ApplyVolume

func (a *APIClient) ApplyVolume(ctx context.Context, clusterID, dir string) (*ApplyVolumeResp, error)

func (*APIClient) Migrate

func (a *APIClient) Migrate(ctx context.Context, source Source, dest Destination) (string, error)

type ApplyVolumeResp

type ApplyVolumeResp struct {
	BucketName  string      `json:"bucketName"`
	Cloud       string      `json:"cloud"`
	Condition   Condition   `json:"condition"`
	Credentials Credentials `json:"credentials"`
	Endpoint    string      `json:"endpoint"`
	Region      string      `json:"region"`
	UploadPath  string      `json:"uploadPath"`
	VolumeName  string      `json:"volumeName"`
}

func (*ApplyVolumeResp) String

func (a *ApplyVolumeResp) String() string

type Client

type Client interface {
	ApplyVolume(ctx context.Context, clusterID, dir string) (*ApplyVolumeResp, error)
	Migrate(ctx context.Context, source Source, dest Destination) (string, error)
}

type Condition

type Condition struct {
	MaxContentLength int `json:"maxContentLength"`
}

func (*Condition) String

func (c *Condition) String() string

type Credentials

type Credentials struct {
	ExpireTime   string `json:"expireTime"`
	SessionToken string `json:"sessionToken"`
	TmpAK        string `json:"tmpAK"`
	TmpSK        string `json:"tmpSK"`
}

func (*Credentials) String

func (cred *Credentials) String() string

type Destination

type Destination struct {
	ClusterID string `json:"clusterId"`
}

func (*Destination) String

func (d *Destination) String() string

type Migrate

type Migrate struct {
	Source      Source      `json:"source"`
	Destination Destination `json:"destination"`
}

type MigrateResp

type MigrateResp struct {
	JobID string `json:"jobId"`
}

type Source

type Source struct {
	StageName string `json:"stageName"`
	DataPath  string `json:"dataPath"`
}

Jump to

Keyboard shortcuts

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