embedfs

package
v0.0.0-...-52e4a05 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package embedfs @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License

Package embedfs @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License

Package embedfs @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License

Package embedfs @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License

Package embedfs @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License

Index

Constants

This section is empty.

Variables

View Source
var (
	Request    = &EmbedFs{}
	FileSystem http.FileSystem
)

Functions

func NewClientV1

func NewClientV1(types marshal.CosType, position string) (client link.ClientV1Interface)

NewClientV1 存储到本地文件夹客户端管理

func OnConfig

func OnConfig(str string)

OnConfig 初始化配置参数信息到内存

Types

type EmbedFs

type EmbedFs struct {
	CosType marshal.CosType `dc:"代理仓库缓存类型"`

	Storage string `yaml:"storage"  default:"./storage/embedfs"  dc:"本地存储文件路径"`
	Bucket  string `yaml:"bucket"   default:""  dc:"对应的桶名称"`
	// contains filtered or unexported fields
}

func (*EmbedFs) BucketInfo

func (c *EmbedFs) BucketInfo(ctx context.Context) (*marshal.BucketInfo, error)

func (*EmbedFs) GetData

func (c *EmbedFs) GetData(moduleName string, data []byte) (m *marshal.ObjectsInfo)

GetData 组装数据存储对象

func (*EmbedFs) GetLocation

func (c *EmbedFs) GetLocation(moduleName string) string

GetLocation 组装并获取存储位置

func (*EmbedFs) GetObject

func (c *EmbedFs) GetObject(ctx context.Context, moduleName string) (m *marshal.ObjectsInfo, err error)

func (*EmbedFs) GetObjectExists

func (c *EmbedFs) GetObjectExists(ctx context.Context, moduleName string) (bool, error)

func (*EmbedFs) GetObjectList

func (c *EmbedFs) GetObjectList(ctx context.Context, moduleNames []string) (list []*marshal.ObjectsInfo, err error)

func (*EmbedFs) GetObjectUrl

func (c *EmbedFs) GetObjectUrl(ctx context.Context, moduleName string) (string, error)

func (*EmbedFs) PutByObject

func (c *EmbedFs) PutByObject(ctx context.Context, moduleName string, reader []byte) (err error)

func (*EmbedFs) PutByObjectList

func (c *EmbedFs) PutByObjectList(ctx context.Context, maps map[string][]byte) (err error)

func (*EmbedFs) RemoveByObject

func (c *EmbedFs) RemoveByObject(ctx context.Context, moduleName string) error

func (*EmbedFs) RemoveByObjectList

func (c *EmbedFs) RemoveByObjectList(ctx context.Context, moduleNames []string) error

Jump to

Keyboard shortcuts

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