admingetconfig

package
v0.0.0-...-ca656e9 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AdminConfigInfo = map[modeltype.ConfigKeyType]string{
	modeltype.KeyName:              "网站标题",
	modeltype.KeySubName:           "网站副标题",
	modeltype.KeyHotline:           "服务热线",
	modeltype.KeyLogo:              "网站主Logo",
	modeltype.KeyIcon:              "网页Icon",
	modeltype.KeyService:           "服务标语",
	modeltype.KeyWechat:            "微信二维码推广",
	modeltype.KeyAvatar:            "关于我们",
	modeltype.KeyAboutUs:           "密码学加密字段",
	modeltype.KeyPasswordFrontHash: "ICP备案号和底部文字内容",
	modeltype.KeyFooter:            "广告标题",
	modeltype.KeyAdTitle:           "广告图片",
	modeltype.KeyAdPic:             "广告内容",
	modeltype.KeyAd:                "广告Url",
	modeltype.KeyAdUrl:             "默认头像",
}

AdminConfigInfo 定义了配置项的中文描述

AdminConfigType 定义了配置项的名称和类型

View Source
var AdminConfigTypeInfo = map[ConfigItemType]string{
	StringMust:     "必选字符串",
	PicMust:        "必选图片",
	TextMust:       "必选文本域",
	StringOptional: "可选字符串",
	PicOptional:    "可选图片",
	TextOptional:   "可选文本域",
}

AdminConfigTypeInfo 定义了配置项类型的描述

Functions

func Handler

func Handler(c *gin.Context)

func NewJsonData

func NewJsonData(cfg []model.Config) data.Data

Types

type ConfigItemType

type ConfigItemType string
const (
	StringMust     ConfigItemType = "string|must"
	PicMust        ConfigItemType = "pic|must"
	TextMust       ConfigItemType = "text|must"
	StringOptional ConfigItemType = "string"
	PicOptional    ConfigItemType = "pic"
	TextOptional   ConfigItemType = "text"
)

type ConfigKeyValue

func NewConfigKeyValue

func NewConfigKeyValue(cfg []model.Config) ConfigKeyValue

type Data

type Data struct {
	Config   ConfigKeyValue                             `json:"config"`
	Info     map[modeltype.ConfigKeyType]string         `json:"info"`
	Type     map[modeltype.ConfigKeyType]ConfigItemType `json:"type"`
	TypeName map[ConfigItemType]string                  `json:"typename"`
}

func NewData

func NewData(cfg []model.Config) Data

Jump to

Keyboard shortcuts

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