cacher

package module
v0.0.0-...-3cf8a31 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: MIT Imports: 14 Imported by: 0

README

一.插件描述

二.插件必要的配置文件参数

1.配置文件说明

# 在gofarme框架默认读取的config.yml中添加自定义项golang
minio:
  endpoint: 127.0.0.1:9000 # minio服务地址
  accessKeyID: WJmxZupuAPEBWcrI # 服务 ID
  secretAccessKey: Y5U5Y2xRotyhrnIt9mFHWQPZlXOFxehE # 服务 Key
  region: '' # 存储地区区域区域
  useSSL: false  # 服务协议类型,默认不支持ssl

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

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

func (*Cache) Docker

func (c *Cache) Docker(ctx context.Context, ossType string) *CacheApi

func (*Cache) Golang

func (c *Cache) Golang(ctx context.Context, ossType string) *CacheApi

func (*Cache) Maven

func (c *Cache) Maven(ctx context.Context, ossType string) *CacheApi

func (*Cache) Npm

func (c *Cache) Npm(ctx context.Context, ossType string) *CacheApi

type CacheApi

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

func (*CacheApi) Config

func (c *CacheApi) Config() *config.CacheConfig

Config 获取golang配置的资源文件信息

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

Jump to

Keyboard shortcuts

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