Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
AppID string `yaml:"appId"`
AppName string `yaml:"appName"`
AppSecret string `yaml:"appSecret"`
}
App 应用配置(SDK 上报用)
type Config ¶
type Config struct {
Port string
DBPath string
RateLimit int
NonceTTL int
TimestampTTL int
JWT JWT
Apps []App
Users []User
Events []EventConfig // 自定义事件配置(白名单)
}
Config 服务器配置
func (*Config) GetEventConfig ¶
func (c *Config) GetEventConfig(eventName string) (EventConfig, bool)
GetEventConfig 获取事件配置
func (*Config) IsEventAllowed ¶
IsEventAllowed 检查事件是否在白名单中
type EventConfig ¶
type EventConfig struct {
EventName string `yaml:"eventName"`
Description string `yaml:"description"`
RetentionDays int `yaml:"retentionDays"` // 数据保留天数(0=永久保留)
}
EventConfig 事件配置(白名单)
Click to show internal directories.
Click to hide internal directories.