aliyun

package
v0.0.0-...-3311072 Latest Latest
Warning

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

Go to latest
Published: May 24, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackendImpl

type BackendImpl struct {
	Client
}

BackendImpl ...

func NewALiYunBackend

func NewALiYunBackend(cfg *Config) (*BackendImpl, error)

NewALiYunBackend ...

type Client

type Client struct {
	ALiYunConfig *Config
	Client       *oss.Client
	Bucket       *oss.Bucket
	Options      []oss.Option
}

Client aliyun services client

func (*Client) Init

func (c *Client) Init() error

Init aliyun services init

func (*Client) IsExist

func (c *Client) IsExist(name string) (bool, error)

IsExist determines whether an object exists

func (*Client) UploadObject

func (c *Client) UploadObject(name string, content io.Reader) (err error)

UploadObject implement image upload interface

type Config

type Config struct {
	Endpoint        string
	AccessKeyID     string
	AccessKeySecret string
	BucketName      string
}

Config ALiYun configure of service

type IALiYunBackend

type IALiYunBackend interface {
	IsExist(name string) (bool, error)
	UploadObject(name string, content io.Reader) error
}

IALiYunBackend aliyun services interface

Directories

Path Synopsis
Package mock_backend is a generated GoMock package.
Package mock_backend is a generated GoMock package.

Jump to

Keyboard shortcuts

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