service

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service struct

func New

func New(c *conf.Config) (s *Service)

New init

func (*Service) Add

func (s *Service) Add(c context.Context, ap *model.AddParam) (err error)

Add will add a record into bfs_upload_admin table

func (*Service) AddBucket

func (s *Service) AddBucket(c context.Context, abp *model.AddBucketParam) (err error)

AddBucket .

func (*Service) AddDir

func (s *Service) AddDir(c context.Context, adp *model.AddDirParam) (err error)

AddDir .

func (*Service) Close

func (s *Service) Close()

Close Service

func (*Service) Delete

func (s *Service) Delete(c context.Context, dp *model.DeleteParam) (err error)

Delete deletes a record and delete file in bfs

func (*Service) DeleteRaw

func (s *Service) DeleteRaw(c context.Context, dp *model.DeleteRawParam) (err error)

DeleteRaw delete file in bfs

func (*Service) DeleteV2

func (s *Service) DeleteV2(c context.Context, dp *model.DeleteV2Param) (err error)

DeleteV2 deletes a record and delete file in bfs

func (*Service) DetailBucket

func (s *Service) DetailBucket(c context.Context, bucketName string) (bucket *model.Bucket, err error)

DetailBucket .

func (*Service) List

func (s *Service) List(c context.Context, lp *model.ListParam) (listResSlice []*model.Record, err error)

List lists records

func (*Service) ListBucket

func (s *Service) ListBucket(c context.Context, lbp *model.ListBucketParam) (bucketPage *model.BucketListPage, err error)

ListBucket .

func (*Service) ListPublicBucket

func (s *Service) ListPublicBucket(c context.Context, lbp *model.ListBucketParam) (bucketPage *model.BucketListPage, err error)

ListPublicBucket .

func (*Service) MultiList

func (s *Service) MultiList(c context.Context, lp *model.MultiListParam) (result []*model.MultiListResult, err error)

MultiList lists records from multi bucket

func (*Service) Ping

func (s *Service) Ping(c context.Context) (err error)

Ping Service

func (*Service) UploadAdminRecord

func (s *Service) UploadAdminRecord(ctx context.Context, action string, up *model.UploadParam, data []byte) (result *model.UploadResult, err error)

UploadAdminRecord upload file to bfs

Jump to

Keyboard shortcuts

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