setting

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package setting 设置

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountSettingS added in v1.2.0

type AccountSettingS struct {
	Username string
	Password string
	Session  string // Session is X-Gatewaysession
	Token    string // Token is bearerAccessToken
	SID      string // SID is cookie sid
	Remid    string // Remid is cookie remid
}

AccountSettingS 账号相关设置

type BFEACSettingS added in v1.2.0

type BFEACSettingS struct {
	APIKey string
}

BFEACSettingS BFEAC 设置

type SessionAPISettingS added in v1.2.0

type SessionAPISettingS struct {
	SakuraID    string
	SakuraToken string
	MFASecret   string
}

SessionAPISettingS 获取Session的API设置

type Setting

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

Setting 使用viper读取设置信息

func NewSetting

func NewSetting(name, path string) (*Setting, error)

NewSetting 读取配置信息

func (*Setting) ReadSection

func (s *Setting) ReadSection(k string, v any) error

ReadSection 根据给定的建造的写入map section

func (*Setting) ReloadAllSections

func (s *Setting) ReloadAllSections() error

ReloadAllSections 重载所有键值对

func (*Setting) WatchSettingChange

func (s *Setting) WatchSettingChange()

WatchSettingChange 配置热更新

type TraceSettingS added in v1.2.0

type TraceSettingS struct {
	Enabled  bool
	UseHTTPS bool
	URL      string
}

TraceSettingS 追踪设置

Jump to

Keyboard shortcuts

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