conf

package
v1.0.30 Latest Latest
Warning

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

Go to latest
Published: May 16, 2025 License: MIT Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	STORE_ALIYUN  = "aliyun"
	STORE_TENCENT = "tencent"
	STORE_BAIDU   = "baidu"
	STORE_LOCAL   = "local"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Secret             string
	// Expire             time.Duration
	DefaultMaxSize uint32

	DefaultAcceptTypes []string
	ChunkSize          uint32
	Export             struct {
		ServerURL string
		LocalDir  string
		Expire    time.Duration
	}
	Storages []*Storage
}

func (*Config) GetLocalStorage added in v1.0.30

func (c *Config) GetLocalStorage() *Storage

type Storage added in v1.0.30

type Storage struct {
	Keyword         string        // 存储关键字
	IsExporter      bool          // 是否为导出器
	Type            string        // 存储类型
	AntiTheft       bool          // 开启防盗链
	Endpoint        string        // oss连接地址
	Id              string        // AK
	Secret          string        // SK
	Bucket          string        // OSS 存储路径
	Region          string        // OSS 地域
	LocalDir        string        // 本地路径,仅local用
	ServerURL       string        // server地址仅local用
	TemporaryExpire time.Duration // 过期时间
}

Jump to

Keyboard shortcuts

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