Documentation
¶
Index ¶
- Variables
- func Init() error
- func SetSettingValue(s Setting, value any) error
- func SetValue(name string, value any) error
- type Bool
- func (b *Bool) Default() bool
- func (b *Bool) DefaultInterface() any
- func (b *Bool) DefaultRaw() string
- func (b *Bool) Get() bool
- func (d *Bool) Group() model.SettingGroup
- func (b *Bool) Init(value string) error
- func (b *Bool) Interface() any
- func (d *Bool) Name() string
- func (b *Bool) Parse(value string) (bool, error)
- func (b *Bool) Raw() string
- func (b *Bool) Set(value bool) error
- func (b *Bool) SetRaw(value string) error
- func (b *Bool) Stringify(value bool) string
- func (d *Bool) Type() model.SettingType
- type BoolSetting
- type Float64
- func (f *Float64) Default() float64
- func (f *Float64) DefaultInterface() any
- func (f *Float64) DefaultRaw() string
- func (f *Float64) Get() float64
- func (d *Float64) Group() model.SettingGroup
- func (f *Float64) Init(value string) error
- func (f *Float64) Interface() any
- func (d *Float64) Name() string
- func (f *Float64) Parse(value string) (float64, error)
- func (f *Float64) Raw() string
- func (f *Float64) Set(value float64) error
- func (f *Float64) SetRaw(value string) error
- func (f *Float64) Stringify(value float64) string
- func (d *Float64) Type() model.SettingType
- type Float64Setting
- type Int64
- func (i *Int64) Default() int64
- func (i *Int64) DefaultInterface() any
- func (i *Int64) DefaultRaw() string
- func (i *Int64) Get() int64
- func (d *Int64) Group() model.SettingGroup
- func (i *Int64) Init(value string) error
- func (i *Int64) Interface() any
- func (d *Int64) Name() string
- func (i *Int64) Parse(value string) (int64, error)
- func (i *Int64) Raw() string
- func (i *Int64) Set(value int64) error
- func (i *Int64) SetRaw(value string) error
- func (i *Int64) Stringify(value int64) string
- func (d *Int64) Type() model.SettingType
- type Int64Setting
- type Setting
- type String
- func (s *String) Default() string
- func (s *String) DefaultInterface() any
- func (s *String) DefaultRaw() string
- func (s *String) Get() string
- func (d *String) Group() model.SettingGroup
- func (s *String) Init(value string) error
- func (s *String) Interface() any
- func (d *String) Name() string
- func (s *String) Parse(value string) (string, error)
- func (s *String) Raw() string
- func (s *String) Set(value string) error
- func (s *String) SetRaw(value string) error
- func (s *String) Stringify(value string) string
- func (d *String) Type() model.SettingType
- type StringSetting
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Settings = make(map[string]Setting) GroupSettings = make(map[model.SettingGroup][]Setting) )
View Source
var ( DisableCreateRoom = newBoolSetting("disable_create_room", false, model.SettingGroupRoom) RoomMustNeedPwd = newBoolSetting("room_must_need_pwd", false, model.SettingGroupRoom) CreateRoomNeedReview = newBoolSetting("create_room_need_review", false, model.SettingGroupRoom) RoomTTL = newInt64Setting("room_ttl", int64(time.Hour*48), model.SettingGroupRoom) UserMaxRoomCount = newInt64Setting("user_max_room_count", 3, model.SettingGroupRoom) )
View Source
var ( DisableUserSignup = newBoolSetting("disable_user_signup", false, model.SettingGroupUser) SignupNeedReview = newBoolSetting("signup_need_review", false, model.SettingGroupUser) )
View Source
var ( MovieProxy = newBoolSetting("movie_proxy", true, model.SettingGroupProxy) LiveProxy = newBoolSetting("live_proxy", true, model.SettingGroupProxy) AllowProxyToLocal = newBoolSetting("allow_proxy_to_local", false, model.SettingGroupProxy) )
View Source
var ( // can watch live streams through the RTMP protocol (without authentication, insecure). RtmpPlayer = newBoolSetting("rtmp_player", false, model.SettingGroupRtmp) // default use http header host CustomPublishHost = newStringSetting("custom_publish_host", "", model.SettingGroupRtmp) // disguise the .ts file as a .png file TsDisguisedAsPng = newBoolSetting("ts_disguised_as_png", true, model.SettingGroupRtmp) )
Functions ¶
func SetSettingValue ¶
Types ¶
type Bool ¶
type Bool struct {
// contains filtered or unexported fields
}
func (*Bool) DefaultInterface ¶
func (*Bool) DefaultRaw ¶
func (*Bool) Group ¶
func (d *Bool) Group() model.SettingGroup
func (*Bool) Type ¶
func (d *Bool) Type() model.SettingType
type BoolSetting ¶
type Float64 ¶
type Float64 struct {
// contains filtered or unexported fields
}
func NewFloat64 ¶
func NewFloat64(name string, value float64, group model.SettingGroup) *Float64
func (*Float64) DefaultInterface ¶
func (*Float64) DefaultRaw ¶
func (*Float64) Group ¶
func (d *Float64) Group() model.SettingGroup
func (*Float64) Type ¶
func (d *Float64) Type() model.SettingType
type Float64Setting ¶
type Int64 ¶
type Int64 struct {
// contains filtered or unexported fields
}
func (*Int64) DefaultInterface ¶
func (*Int64) DefaultRaw ¶
func (*Int64) Group ¶
func (d *Int64) Group() model.SettingGroup
func (*Int64) Type ¶
func (d *Int64) Type() model.SettingType
type Int64Setting ¶
type Setting ¶
type Setting interface {
Name() string
Type() model.SettingType
Group() model.SettingGroup
Init(string) error
Raw() string
SetRaw(string) error
DefaultRaw() string
DefaultInterface() any
Interface() any
}
func ToSettings ¶
type String ¶
type String struct {
// contains filtered or unexported fields
}
func (*String) DefaultInterface ¶
func (*String) DefaultRaw ¶
func (*String) Group ¶
func (d *String) Group() model.SettingGroup
func (*String) Type ¶
func (d *String) Type() model.SettingType
Click to show internal directories.
Click to hide internal directories.