core

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2025 License: MIT Imports: 10 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

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 {
	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