sdk

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageInfo

type ImageInfo struct {
	Size       int64  `json:"size"`
	FileName   string `json:"fileName"`
	Scene      string `json:"scene"`
	Suffix     string `json:"suffix"`
	Md5        string `json:"md5"`
	CreateTime int64  `json:"createTime"`
	UpdateTime int64  `json:"updateTime"`
}

type ImagesBedClient

type ImagesBedClient struct {
	Protocol  string
	Host      string
	Port      int
	Prefix    string
	FileField string
}

func NewImagesBedClient

func NewImagesBedClient(protocol string, host string, port int) *ImagesBedClient

NewImagesBedClient 初始化客户端

func (*ImagesBedClient) BuildURL

func (ibc *ImagesBedClient) BuildURL(uri string) string

func (*ImagesBedClient) CreateScene

func (ibc *ImagesBedClient) CreateScene(name string) bool

CreateScene 创建场景

func (*ImagesBedClient) DeleteImage

func (ibc *ImagesBedClient) DeleteImage(md5 string) bool

DeleteImage 删除图片

func (*ImagesBedClient) DeleteScene

func (ibc *ImagesBedClient) DeleteScene(name string) bool

DeleteScene 删除场景

func (*ImagesBedClient) Download

func (ibc *ImagesBedClient) Download(md5 string, filepath string, filename ...string) string

Download 下载文件

func (*ImagesBedClient) GetDownloadURL

func (ibc *ImagesBedClient) GetDownloadURL(md5 string) string

GetDownloadURL 获取下载链接,支持断点下载

func (ImagesBedClient) GetImageInfo

func (ibc ImagesBedClient) GetImageInfo(md5 string) *ImageInfo

GetImageInfo 获取图片信息

func (*ImagesBedClient) GetScene

func (ibc *ImagesBedClient) GetScene() ([]string, error)

GetScene 获取所有场景

func (*ImagesBedClient) GetViewURL

func (ibc *ImagesBedClient) GetViewURL(md5 string, compress int) string

GetViewURL 获取预览链接,支持压缩,compress 0-100

func (*ImagesBedClient) Reader

func (ibc *ImagesBedClient) Reader(md5 string) (string, *bufio.Reader)

Reader 获取文件读取对象

func (*ImagesBedClient) Upload

func (ibc *ImagesBedClient) Upload(scene string, filename string) (string, error)

Upload 上传文件

Jump to

Keyboard shortcuts

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