cfs

package
v0.9.200 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package cfs defines the Normal CFS services of BCE. The supported APIs are all defined in sub-package

Index

Constants

View Source
const (
	DEFAULT_SERVICE_DOMAIN = "cfs." + bce.DEFAULT_REGION + ".baidubce.com"
	URI_PREFIX             = bce.URI_PREFIX + "v1"
	REQUEST_CFS_URL        = "/cfs"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*bce.BceClient
}

Client of CFS service is a kind of BceClient, so derived from BceClient

func NewClient

func NewClient(ak, sk, endPoint string) (*Client, error)

func (*Client) CreateFS

func (c *Client) CreateFS(args *CreateFSArgs) (*CreateFSResult, error)

CreateFS - create a FS Instance

PARAMS:

  • args: parameters to create FS

RETURNS:

  • *CreateFSResult: the result of create fs, contains new FS Instance's ID
  • error: nil if ok otherwise the specific error

func (*Client) CreateMountTarget

func (c *Client) CreateMountTarget(args *CreateMountTargetArgs) (*CreateMountTargetResult, error)

CreateMountTarget - create a mount target for FS Instances

PARAMS:

  • args: parameters to create mount target

RETURNS:

  • *CreateMountTargetResult: the result mount target's detail
  • error: nil if ok otherwise the specific error

func (*Client) DescribeFS

func (c *Client) DescribeFS(args *DescribeFSArgs) (*DescribeFSResult, error)

DescribeFS - describe all FS Instances

PARAMS:

  • args: parameters describe all FS Instances

RETURNS:

  • *DescribeFSResult: the result FS Instances's detail
  • error: nil if ok otherwise the specific error

func (*Client) DescribeMountTarget

func (c *Client) DescribeMountTarget(args *DescribeMountTargetArgs) (*DescribeMountTargetResult, error)

DescribeMountTarget - describe all mount targets

PARAMS:

  • args: parameters describe all mount targets

RETURNS:

  • *DescribeMountTargetResult: the result Mount target's detail
  • error: nil if ok otherwise the specific error

func (*Client) DropFS

func (c *Client) DropFS(args *DropFSArgs) error

DropFS - drop a fs instance

PARAMS:

  • args: parameters to drop fs

RETURNS:

  • error: nil if ok otherwise the specific error

func (*Client) DropMountTarget

func (c *Client) DropMountTarget(args *DropMountTargetArgs) error

DropMountTarget - drop a MountTarget

PARAMS:

  • args: parameters to drop mount target

RETURNS:

  • error: nil if ok otherwise the specific error

func (*Client) UpdateFS

func (c *Client) UpdateFS(args *UpdateFSArgs) error

UpdateFS - update name of a FS Instance

PARAMS:

  • args: parameters to create FS

RETURNS:

  • error: nil if ok otherwise the specific error

type CreateFSArgs

type CreateFSArgs struct {
	ClientToken string `json:"-"`
	Name        string `json:"fsName"`
	Type        string `json:"type"`
	Protocol    string `json:"protocol"`
	VpcID       string `json:"vpcId,omitempty"`
	Zone        string `json:"zone,omitempty"`
}

type CreateFSResult

type CreateFSResult struct {
	FSID string `json:"fsId"`
}

type CreateMountTargetArgs

type CreateMountTargetArgs struct {
	FSID            string `json:"-"`
	VpcID           string `json:"vpcId"`
	SubnetId        string `json:"subnetId"`
	AccessGroupName string `json:"accessGroupName"`
}

type CreateMountTargetResult

type CreateMountTargetResult struct {
	MountID string `json:"mountId"`
	Domain  string `json:"domain"`
}

type DescribeFSArgs

type DescribeFSArgs struct {
	FSID    string
	UserId  string
	Marker  string
	MaxKeys int
}

type DescribeFSResult

type DescribeFSResult struct {
	FSList []FSModel `json:"fileSystemList"`
	DescribeResultMeta
}

type DescribeMountTargetArgs

type DescribeMountTargetArgs struct {
	FSID    string
	MountID string
	Marker  string
	MaxKeys int
}

type DescribeMountTargetResult

type DescribeMountTargetResult struct {
	MountTargetList []MoutTargetModel `json:"mountTargetList"`
	DescribeResultMeta
}

type DescribeResultMeta

type DescribeResultMeta struct {
	Marker      string `json:"marker"`
	IsTruncated bool   `json:"isTruncated"`
	NextMarker  string `json:"nextMarker"`
	MaxKeys     int    `json:"maxKeys"`
}

type DropFSArgs

type DropFSArgs struct {
	FSID string
}

type DropMountTargetArgs

type DropMountTargetArgs struct {
	FSID    string
	MountId string
}

type FSModel

type FSModel struct {
	FSID        string            `json:"fsId"`
	Name        string            `json:"fsName"`
	VpcID       string            `json:"vpcId"`
	Type        string            `json:"type"`
	Protocol    string            `json:"protocol"`
	Usage       string            `json:"fsUsage"`
	Status      FSStatus          `json:"status"`
	MoutTargets []MoutTargetModel `json:"mountTargetList"`
}

type FSStatus

type FSStatus string
const (
	FSStatusAvailable   FSStatus = "available"
	FSStatusPaused      FSStatus = "paused"
	FSStatusUnavailable FSStatus = "unavailable"
)

type MoutTargetModel

type MoutTargetModel struct {
	AccessGroupName string `json:"accessGroupName"`
	MountID         string `json:"mountId"`
	Ovip            string `json:"ovip"`
	Domain          string `json:"domain"`
	SubnetID        string `json:"subnetId"`
}

type UpdateFSArgs

type UpdateFSArgs struct {
	FSID   string `json:"-"`
	FSName string `json:"fsName"`
}

Jump to

Keyboard shortcuts

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