vo

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

package abstract class

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Addition

type Addition interface{}

Addition

type Config

type Config struct {
	Name              string `json:"name"`
	LocalSort         bool   `json:"local_sort"`
	OnlyLocal         bool   `json:"only_local"`
	OnlyProxy         bool   `json:"only_proxy"`
	NoCache           bool   `json:"no_cache"`
	NoUpload          bool   `json:"no_upload"`
	NeedMs            bool   `json:"need_ms"` // if need get message from user, such as validate code
	DefaultRoot       string `json:"default_root"`
	CheckStatus       bool   `json:"-"`
	Alert             string `json:"alert"` //info,success,warning,danger
	NoOverwriteUpload bool   `json:"-"`
}

Config

type Driver

type Driver interface {
	GetAddition() Addition
	Init(context.Context) error
	Readder
	Writter
}

Driver

type FileMete

type FileMete interface {
	GetMd5() string
}

不处理数据库,只负责文件的处理

type ICreateReq

type ICreateReq interface {
	GetContentMd5() string
	GetSlickMd5() string
	GetBlockMd5() []string
	GetSize() string
	GetName() string
	GetDir() string
}

ICreateReq

type IDir

type IDir interface {
	GetID() string
	GetSize() int64
	GetName() string
}

IDir

type ILink interface {
	GetPath() string
	GetHeader() http.Header
}

ILink

type IStreamFile

type IStreamFile interface {
	GetSize() int64
	GetName() string
	GetContent() []byte
}

IStreamFile

type Readder

type Readder interface {
	Link(context.Context, IDir) (ILink, error)
	GetCap(context.Context) (int64, error)
}

Readder

type TokenResp

type TokenResp struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
}

TokenResp

type Writter

type Writter interface {
	Upload(context.Context, *pb.UploadRequest) (*pb.UploadReply, error)
	Download(context.Context, *pb.DownloadRequest) (*pb.DownloadReply, error)
	Remove(context.Context, IDir) error
}

Writter

Jump to

Keyboard shortcuts

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