oss

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewOSSClient

func NewOSSClient(config Config) (*Client, error)

func (*Client) ClearObject

func (c *Client) ClearObject(key string) error

ClearObject 删除权限没有只能对文件晴空

func (*Client) Delete

func (c *Client) Delete(key string) error

func (*Client) Get

func (c *Client) Get(key string) ([]byte, error)

func (*Client) GetJsonObjectByLines

func (c *Client) GetJsonObjectByLines(key, expressionSQL string) ([]byte, error)

GetJsonObjectByLines 查询 https://github.com/aliyun/aliyun-oss-go-sdk/blob/master/oss/select_json_object_test.go#L97

func (*Client) GetObjectList

func (c *Client) GetObjectList(marker string, maxKeys int) ([]string, error)

GetObjectList 当前 bucket 前缀 下面所有的key max 100 marker 标记,从那个开始 bucket object 有 1,2,3,4,5,6

marker 传了 2

maxKeys 最大返回数量

maxKeys 传了 2

return object [3, 4]

func (*Client) GetToStruct

func (c *Client) GetToStruct(key string) (io.ReadCloser, error)

func (*Client) IsObjectExist

func (c *Client) IsObjectExist(key string) (bool, error)

func (*Client) Put

func (c *Client) Put(object Object) error

Put 上传 & 更新

type Config

type Config struct {
	Endpoint        string
	AccessKeyID     string
	AccessKeySecret string
	BucketName      string // 使用前必须先创建好Bucket
	Prefix          string // "2020/dev/" (为了多个有多个游戏区分开来)
	Suffix          string // ".json" 文件后缀
}

type Object

type Object struct {
	Key   string
	Value string
}

Jump to

Keyboard shortcuts

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