local

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: 10 Imported by: 0

Documentation

Overview

driver local , store file in local disk

Index

Constants

This section is empty.

Variables

View Source
var Name = "Local"

local Name

Functions

This section is empty.

Types

type Addition

type Addition struct {
	Cap      int64
	RootPath string
}

Addition

type Local

type Local struct {
	Addition
}

Local

func New

func New() *Local

New

@return *Local

func (*Local) Download

func (d *Local) Download(ctx context.Context, req *pb.DownloadRequest) (*pb.DownloadReply, error)

func (*Local) GetAddition

func (l *Local) GetAddition() vo.Addition

GetAddition

@receiver l
@return vo.Addition

func (*Local) GetCap

func (d *Local) GetCap(ctx context.Context) (int64, error)

GetCap 获取容量

@receiver d
@param ctx
@return int64
@return error

func (*Local) Init

func (d *Local) Init(ctx context.Context) error

Init local dirver configs disk infos

@receiver d
@param ctx
@return error
func (d *Local) Link(ctx context.Context, dir vo.IDir) (vo.ILink, error)

Link 获取文件真实链接

@receiver d
@param ctx
@param dir
@return vo.ILink
@return error

func (*Local) Remove

func (d *Local) Remove(ctx context.Context, dir vo.IDir) error

Remove 删除文件

@receiver d
@param ctx
@param dir
@return error

func (*Local) Upload

func (d *Local) Upload(ctx context.Context, file *pb.UploadRequest) (*pb.UploadReply, error)

Jump to

Keyboard shortcuts

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