yike

package
v0.0.0-...-084929d Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2022 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const NAME = "yike"

Variables

This section is empty.

Functions

func New

Types

type Param

type Param struct {
	Path       string
	Size       string
	SliceList  string
	BlockMd5   string
	ContentMd5 string
}

type YiKe

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

func (*YiKe) CheckUrl

func (b *YiKe) CheckUrl(ctx context.Context, metaurl string) bool

检查链接是否有效

func (*YiKe) CreateAlbum

func (y *YiKe) CreateAlbum(ctx context.Context, name string) (*YiKeAlbum, error)

创建相册

func (*YiKe) Delete

func (y *YiKe) Delete(ctx context.Context, fileID ...int64) error

删除文件

func (*YiKe) DeleteAlbum

func (y *YiKe) DeleteAlbum(ctx context.Context, album *YiKeAlbum, deletesource bool) error

删除相册

func (*YiKe) Download

func (b *YiKe) Download(ctx context.Context, metaurl string) (data []byte, err error)

func (*YiKe) DownloadUsable

func (b *YiKe) DownloadUsable() bool

func (*YiKe) GetAlbum

func (y *YiKe) GetAlbum(ctx context.Context, names ...string) (albumout []YiKeAlbum, err error)

获取相册

func (*YiKe) IsLogin

func (b *YiKe) IsLogin() bool

判断是否登录

func (*YiKe) MaxSize

func (y *YiKe) MaxSize() int

func (*YiKe) Name

func (*YiKe) Name() string

func (*YiKe) QrcodeLogin

func (b *YiKe) QrcodeLogin(ctx context.Context, show func(ctx context.Context, image image.Image) error) (cookie string, err error)

func (*YiKe) SetAuthorization

func (b *YiKe) SetAuthorization(cookie string) error

func (*YiKe) SetOption

func (b *YiKe) SetOption(options ...drivercommon.Option) error

func (*YiKe) SpaceSize

func (b *YiKe) SpaceSize() drivercommon.SpaceSize

func (*YiKe) SuperEncoder

func (*YiKe) SuperEncoder() []string

func (*YiKe) Upload

func (b *YiKe) Upload(ctx context.Context, block []byte) (metaurl string, err error)

func (*YiKe) UploadUsable

func (b *YiKe) UploadUsable() bool

type YiKeAlbum

type YiKeAlbum struct {
	AppID   int    `json:"app_id"`
	AlbumID string `json:"album_id"`
	Tid     int64  `json:"tid"`
	Title   string `json:"title"`
}

type YiKeAlbumCreate

type YiKeAlbumCreate struct {
	AlbumID string    `json:"album_id"`
	Info    YiKeAlbum `json:"info"`
	YiKeError
}

type YiKeAlbumList

type YiKeAlbumList struct {
	List []YiKeAlbum `json:"list"`
	YiKeError
}

type YiKeError

type YiKeError struct {
	Errno     int `json:"errno"`
	RequestID int `json:"request_id"`
}

type YiKeFileData

type YiKeFileData struct {
	FsID       int64  `json:"fs_id"`
	Size       int64  `json:"size"`
	Md5        string `json:"md5"`
	ServerName string `json:"server_filename"`
	Path       string `json:"path"`
	Ctime      int64  `json:"ctime"`
	Mtime      int64  `json:"mtime"`
	IsDir      int    `json:"isdir"`
	Category   int    `json:"category"`
	ServerMd5  string `json:"server_md5"`
	ShootTime  int64  `json:"shoot_time"`
}

type YiKePrecreateResp

type YiKePrecreateResp struct {
	YiKeError

	ReturnType int `json:"return_type"` //存在返回2 不存在返回1 已经保存3
	//存在返回
	Data YiKeFileData `json:"data"`

	//不存在返回
	Path      string  `json:"path"`
	UploadID  string  `json:"uploadid"`
	Blocklist []int64 `json:"block_list"`
}

Jump to

Keyboard shortcuts

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