client

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
}

func New

func New(env ...*auth.AuthEnv) *Client

func (*Client) ComplateMultiPartUpload

func (c *Client) ComplateMultiPartUpload(path string, size types.SizeB, uploadId string, blockMd5List []string) (*file.CreateRes, error)

func (*Client) CopyObject

func (c *Client) CopyObject(srcFilePath string, destDir string, newName ...string) (*file.FilemanagerItem, error)

func (*Client) DeleteObject added in v0.0.3

func (c *Client) DeleteObject(srcFilePath string) (*file.FilemanagerItem, error)

func (*Client) GetAuthCodeURL

func (c *Client) GetAuthCodeURL(req ...*auth.AuthCodeReq) string

func (*Client) GetObject

func (c *Client) GetObject(path string) (io.ReadCloser, error)

func (*Client) GetObjectRange added in v0.0.2

func (c *Client) GetObjectRange(path string, start, end types.SizeB) (io.ReadCloser, error)

func (*Client) GetPathFsid

func (c *Client) GetPathFsid(path string) (uint64, error)

func (*Client) GetToken

func (c *Client) GetToken(code string, redirectUrl ...string) (*auth.GetTokenRes, error)

func (*Client) GetUploadHost

func (c *Client) GetUploadHost(path string, uploadId ...string) (*file.LocateUploadRes, error)

func (*Client) InitMultiPartUpload

func (c *Client) InitMultiPartUpload(path string, size types.SizeB, blockList ...string) (*file.PreCreateRes, error)

func (*Client) ListObjects

func (c *Client) ListObjects(dir string, opt ...*file.ListAllReq) (*file.ListRes, error)

func (*Client) ListObjectsStream

func (c *Client) ListObjectsStream(dir string, opt ...*file.ListAllReq) <-chan *file.ListItem

func (*Client) Mkdir

func (c *Client) Mkdir(path string) (*file.CreateRes, error)

func (*Client) MoveObject

func (c *Client) MoveObject(srcFilePath string, destDir string, newName ...string) (*file.FilemanagerItem, error)

func (*Client) PutObject

func (c *Client) PutObject(path string, data io.Reader, ondup ...types.OndupMode) (*file.UploadRes, error)

func (*Client) Quota

func (c *Client) Quota(req ...*user.QuotaReq) (*user.QuotaRes, error)

func (*Client) RefreshToken

func (c *Client) RefreshToken() (*auth.GetTokenRes, error)

func (*Client) RenameObject

func (c *Client) RenameObject(srcFilePath string, newName string) (*file.FilemanagerItem, error)

func (*Client) SetAuth

func (c *Client) SetAuth(req *auth.AuthEnv)

func (*Client) StatObject

func (c *Client) StatObject(path string) (*file.FilemetasItem, error)

func (*Client) StatObjectUseFsId

func (c *Client) StatObjectUseFsId(fsId uint64) (*file.FilemetasItem, error)

func (*Client) StatObjects

func (c *Client) StatObjects(fsIds ...uint64) (*file.FilemetasRes, error)

func (*Client) StatObjectsPro

func (c *Client) StatObjectsPro(req *file.FilemetasReq) (*file.FilemetasRes, error)

func (*Client) UploadPart

func (c *Client) UploadPart(path string, uploadId string, partSeq int, data io.Reader) (*file.UploadChunkRes, error)

func (*Client) UserInfo

func (c *Client) UserInfo(v2 ...bool) (*user.UserInfoRes, error)

type FileReader

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

func (*FileReader) Close

func (d *FileReader) Close() error

func (*FileReader) Read

func (d *FileReader) Read(p []byte) (n int, err error)

func (*FileReader) Seek added in v0.0.2

func (d *FileReader) Seek(offset int64, whence int) (int64, error)

Jump to

Keyboard shortcuts

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