system

package
v0.8.10 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: MIT Imports: 26 Imported by: 0

Documentation

Overview

Package system 提供了大部分与事个系统相关的功能

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backup

type Backup struct {
	// 备份文件的路径
	Dir string `json:"dir" yaml:"dir" xml:"dir"`

	// 备份的文件格式,以 Go 的时间格式作为格式。
	Format string `json:"format" yaml:"format" xml:"format"`

	// 备份任务的执行时间
	Cron string `yaml:"cron" json:"cron" xml:"cron"`
	// contains filtered or unexported fields
}

Backup 备份数据的相关设置项

func (*Backup) SanitizeConfig

func (b *Backup) SanitizeConfig() *web.FieldError

type Config

type Config struct {
	// URLPrefix 该模块下的地址前缀
	//
	// 默认值为 /system
	URLPrefix string `yaml:"urlPrefix" json:"urlPrefix" xml:"urlPrefix"`

	// Backup 备份数据的选项
	Backup *Backup `yaml:"backup,omitempty" json:"backup,omitempty" xml:"backup,omitempty"`
}

Config 配置项

func (*Config) SanitizeConfig

func (c *Config) SanitizeConfig() *web.FieldError

type Module

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

func Install

func Install(mod *cmfx.Module, conf *Config, adminL *admin.Module) *Module

func Load

func Load(mod *cmfx.Module, conf *Config, adminL *admin.Module) *Module

Load 加载当前模块

conf 当前模块的配置项,需要调用者自先调用 Config.SanitizeConfig 对数据进行校正;

func (*Module) Censor

func (m *Module) Censor(text string) (ok bool)

Censor 审核内容

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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