oss

package
v0.0.0-...-1b479c1 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2023 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handle

func Handle(conf *Config, bucketName, pathParamKey string) (func(ctx *gin.Context), error)

Types

type Client

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

func NewCli

func NewCli(conf *Config) (*Client, error)

func NewClient

func NewClient(endpoint, accessKeyId, accessSecret string) (*Client, error)

func (*Client) AddFile

func (cli *Client) AddFile(bucketName, name string, reader io.Reader) error

func (*Client) AddFile2

func (cli *Client) AddFile2(bucketName, name string, data []byte) error

func (*Client) DeleteFile

func (cli *Client) DeleteFile(bucketName, name string) error

func (*Client) Exists

func (cli *Client) Exists(bucketName, name string) (bool, error)

func (*Client) GetFile

func (cli *Client) GetFile(bucketName, name string) ([]byte, error)

func (*Client) MoveFile

func (cli *Client) MoveFile(bucketName, from, to string) error

type Config

type Config struct {
	EndPoint     string
	AccessKey    string
	AccessSecret string
}

Jump to

Keyboard shortcuts

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