Documentation ¶
Overview ¶
Package cacher @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License
Package cacher @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License
Package cacher @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License
Index ¶
- type Cache
- type CacheApi
- func (c *CacheApi) Config() *config.CacheConfig
- func (c *CacheApi) Get(ctx context.Context, bucketName, objectName string) (u *em.UploadInfo, err error)
- func (c *CacheApi) GetExists(ctx context.Context, bucketName, objectName string) (b bool, err error)
- func (c *CacheApi) GetFileSystem() http.FileSystem
- func (c *CacheApi) GetRemote(ctx context.Context, remotes []string, modelPath string) *http.Response
- func (c *CacheApi) Put(ctx context.Context, bucketName, objectName string, data []byte) (u *em.UploadInfo, err error)
- func (c *CacheApi) UpdateConfig(y *config.CacheConfig) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheApi ¶
type CacheApi struct {
// contains filtered or unexported fields
}
func (*CacheApi) Get ¶
func (c *CacheApi) Get(ctx context.Context, bucketName, objectName string) (u *em.UploadInfo, err error)
Get 获取文件对象 bucketName 如缓存到oss则为对应的桶名称 objectName 请求文件全路径
func (*CacheApi) GetExists ¶
func (c *CacheApi) GetExists(ctx context.Context, bucketName, objectName string) (b bool, err error)
GetExists 判断文件是否存在 bucketName 如缓存到oss则为对应的桶名称 objectName 请求文件全路径
func (*CacheApi) GetFileSystem ¶
func (c *CacheApi) GetFileSystem() http.FileSystem
func (*CacheApi) GetRemote ¶
func (c *CacheApi) GetRemote(ctx context.Context, remotes []string, modelPath string) *http.Response
GetRemote 请求http数据
func (*CacheApi) Put ¶
func (c *CacheApi) Put(ctx context.Context, bucketName, objectName string, data []byte) (u *em.UploadInfo, err error)
Put 存储文件对象 bucketName 如缓存到oss则为对应的桶名称 objectName 请求文件全路径 data 待保存的文件字节信息
func (*CacheApi) UpdateConfig ¶
func (c *CacheApi) UpdateConfig(y *config.CacheConfig) error
UpdateConfig 更新golang配置的资源文件信息
Directories ¶
Path | Synopsis |
---|---|
Package config @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License
|
Package config @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License |
Package em @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License
|
Package em @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License |
Package handler @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License
|
Package handler @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License |
oss
|
|
aliyun
Package aliyun @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License
|
Package aliyun @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License |
local
Package local @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License
|
Package local @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License |
minio
Package minio @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License
|
Package minio @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License |
tencent
Package tencent @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License
|
Package tencent @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License |
Click to show internal directories.
Click to hide internal directories.