qiniu

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewQiniuAuthTransport

func NewQiniuAuthTransport(accessKey, secretKey string, transport http.RoundTripper, useQBoxAuth bool) http.RoundTripper

func NewUserAgentTransport

func NewUserAgentTransport(userAgent string, transport http.RoundTripper) http.RoundTripper

Types

type Bucket

type Bucket struct {
	ID           string `json:"id"`
	Name         string `json:"tbl"`
	KodoRegionID string `json:"region"`
}

type KodoClient

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

func NewKodoClient

func NewKodoClient(accessKey, secretKey string, ucUrl *url.URL, version, commitId string) *KodoClient

func (*KodoClient) CleanObjects

func (client *KodoClient) CleanObjects(ctx context.Context, bucketName string) error

func (*KodoClient) CreateBucket

func (client *KodoClient) CreateBucket(ctx context.Context, bucketName, regionID string) error

func (*KodoClient) CreateIAMPolicy

func (client *KodoClient) CreateIAMPolicy(ctx context.Context, name, bucketName string) error

func (*KodoClient) CreateIAMUser

func (client *KodoClient) CreateIAMUser(ctx context.Context, userName, password string) error

func (*KodoClient) DeleteBucket

func (client *KodoClient) DeleteBucket(ctx context.Context, bucketName string) error

func (*KodoClient) DeleteIAMPolicy

func (client *KodoClient) DeleteIAMPolicy(ctx context.Context, name string) error

func (*KodoClient) DeleteIAMUser

func (client *KodoClient) DeleteIAMUser(ctx context.Context, userName string) error

func (*KodoClient) FindBucketByName

func (client *KodoClient) FindBucketByName(ctx context.Context, bucketName string, useCache bool) (*Bucket, error)

func (*KodoClient) FromKodoRegionIDToS3RegionID

func (client *KodoClient) FromKodoRegionIDToS3RegionID(ctx context.Context, regionID string) (*string, error)

func (*KodoClient) GetBuckets

func (client *KodoClient) GetBuckets(ctx context.Context) ([]*Bucket, error)

func (*KodoClient) GetCentralApiEndpoint

func (client *KodoClient) GetCentralApiEndpoint(ctx context.Context) (*url.URL, error)

func (*KodoClient) GetIAMUserKeyPair

func (client *KodoClient) GetIAMUserKeyPair(ctx context.Context, userName string) (string, string, error)

func (*KodoClient) GetRegions

func (client *KodoClient) GetRegions(ctx context.Context) ([]*Region, error)

func (*KodoClient) GetRsEndpoint

func (client *KodoClient) GetRsEndpoint(ctx context.Context, regionID string) (*url.URL, error)

func (*KodoClient) GetRsfEndpoint

func (client *KodoClient) GetRsfEndpoint(ctx context.Context, regionID string) (*url.URL, error)

func (*KodoClient) GetS3Endpoint

func (client *KodoClient) GetS3Endpoint(ctx context.Context, regionID string) (*url.URL, error)

func (*KodoClient) GrantIAMPolicyToUser

func (client *KodoClient) GrantIAMPolicyToUser(ctx context.Context, userName string, policyNames []string) error

func (*KodoClient) RevokeIAMPolicyFromUser

func (client *KodoClient) RevokeIAMPolicyFromUser(ctx context.Context, userName string, policyNames []string) error

type KodoErrorResponseBody

type KodoErrorResponseBody struct {
	Message string `json:"error"`
}

func (*KodoErrorResponseBody) Error

func (err *KodoErrorResponseBody) Error() string

type KodoFSClient

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

func NewKodoFSClient

func NewKodoFSClient(accessKey, secretKey string, masterUrl *url.URL, version, commitId string) *KodoFSClient

func (*KodoFSClient) CreateAccessPoint

func (client *KodoFSClient) CreateAccessPoint(ctx context.Context, volumeName, description string) (string, error)

func (*KodoFSClient) CreateVolume

func (client *KodoFSClient) CreateVolume(ctx context.Context, volumeName, description, region string, fsType uint8, blockSize uint32) (string, error)

func (*KodoFSClient) GetAccessToken

func (client *KodoFSClient) GetAccessToken(ctx context.Context, accessPointId string) (string, error)

func (*KodoFSClient) IsVolumeExists

func (client *KodoFSClient) IsVolumeExists(ctx context.Context, volumeName string) (bool, error)

func (*KodoFSClient) RemoveAccessPoint

func (client *KodoFSClient) RemoveAccessPoint(ctx context.Context, accessPointId string) error

func (*KodoFSClient) RemoveVolume

func (client *KodoFSClient) RemoveVolume(ctx context.Context, volumeName string) error

func (*KodoFSClient) RenameVolume

func (client *KodoFSClient) RenameVolume(ctx context.Context, oldVolumeName, newVolumeName string) error

type KodoFSErrorResponseBody

type KodoFSErrorResponseBody struct {
	Code      int32  `json:"code"`
	ErrorCode string `json:"error_code"`
	Message   string `json:"message"`
}

func (*KodoFSErrorResponseBody) Error

func (err *KodoFSErrorResponseBody) Error() string

type ListedObjectResult

type ListedObjectResult struct {
	ObjectName string
	Error      error
}

type QiniuAuthTransport

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

func (*QiniuAuthTransport) RoundTrip

func (t *QiniuAuthTransport) RoundTrip(request *http.Request) (*http.Response, error)

type Region

type Region struct {
	KodoRegionID string   `json:"id"`
	S3           *Service `json:"s3"`
	Rs           *Service `json:"rs"`
	Rsf          *Service `json:"rsf"`
	Api          *Service `json:"api"`
}

type Service

type Service struct {
	S3RegionID string   `json:"region_alias"`
	Domains    []string `json:"domains"`
}

type UserAgentTransport

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

func (*UserAgentTransport) RoundTrip

func (t *UserAgentTransport) RoundTrip(request *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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