core

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitApp

func InitApp(opts ...kratosx.Option) *kratosx.App

InitApp 初始化系统

Types

type Conf

type Conf struct {
	DefaultMaxSize     uint32
	DefaultAcceptTypes []string
	ChunkSize          uint32
	Storage            []*Storage
	Export             *Export
}

type Context

type Context struct {
	kratosx.Context
}

func MustContext

func MustContext(ctx context.Context, opts ...kratosx.ContextOptionFunc) Context

func (Context) Auth

func (c Context) Auth() *auth.Info

func (Context) Clone

func (c Context) Clone() Context

func (Context) Config

func (Context) Config() *Conf

func (Context) Transaction

func (c Context) Transaction(fn func(ctx Context) error, name ...string) error

type Export

type Export struct {
	LocalDir string
	Expire   time.Duration
}

type Storage

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

Jump to

Keyboard shortcuts

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