minio

package
v0.0.0-...-4aaf4b1 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package minio @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2024 central-mirror CLI @Author linngc @License

Package minio @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2024 central-mirror CLI @Author linngc @License

Package minio @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2024 central-mirror CLI @Author linngc @License

Package minio @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2024 central-mirror CLI @Author linngc @License

Package minio @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2024 central-mirror CLI @Author linngc @License

Package minio @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2024 central-mirror CLI @Author linngc @License

Index

Constants

This section is empty.

Variables

View Source
var (
	Request = &Minio{}
)

Functions

func Config

func Config(str string)

Config 初始化配置参数信息到内存 @param str string

func NewClientV1

func NewClientV1(types enums.CosType, proxy string) (client service.OssService)

NewClientV1 存储客户端管理 @param types 代理仓库对象存储服务类型(embedfs/leveldb等) @param proxy 缓存类型:如maven/golang/docker/npm/python等等 @return service.OssService接口构造,如 minio

Types

type CfgConfig

type CfgConfig struct {
	Endpoint  string `yaml:"endpoint"   dc:"minio服务地址"`
	SecretId  string `yaml:"secretId" dc:"服务 ID"`
	SecretKey string `yaml:"secretKey"   dc:"服务 Key"`
	Bucket    string `yaml:"bucket"   dc:"对应的桶名称"`
	Region    string `yaml:"region"  dc:"存储地区区域"`
	UseSSL    bool   `yaml:"useSSL"  dc:"服务协议类型,默认不支持ssl"`
}

func GetCfgConfig

func GetCfgConfig() *CfgConfig

GetCfgConfig 获取配置的资源文件信息

type Minio

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

func (*Minio) GetLocation

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

GetLocation 组装并获取存储位置

func (*Minio) GetObject

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

func (*Minio) GetObjectExists

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

func (*Minio) GetObjectList

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

func (*Minio) GetObjectUri

func (c *Minio) GetObjectUri(ctx context.Context, moduleName string) (string, error)

GetObjectUri 获取文件的外链url @param moduleName 参数是 文件模块名称(请求的文件全路径名称)

func (*Minio) GetObjectsInfo

func (c *Minio) GetObjectsInfo(moduleName string, data []byte) (m *model.ObjectsInfo)

GetObjectsInfo 组装数据存储对象

func (*Minio) PutByObject

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

func (*Minio) PutByObjectList

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

func (*Minio) RemoveByObject

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

func (*Minio) RemoveByObjectList

func (c *Minio) 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