Documentation ¶
Index ¶
- Variables
- func InitAggregationProviderSetting(pi provider.Provider)
- func InitAggregationSetting(pi provider.AggregationProviderInterface)
- func InitCheckUpdate(ctx context.Context) error
- func InitConfig(ctx context.Context) (err error)
- func InitDatabase(ctx context.Context) (err error)
- func InitDefaultConfig(ctx context.Context) error
- func InitDiscardLog(ctx context.Context) error
- func InitGinMode(ctx context.Context) error
- func InitLog(ctx context.Context) (err error)
- func InitOp(ctx context.Context) error
- func InitProvider(ctx context.Context) (err error)
- func InitProviderSetting(pi provider.Provider)
- func InitRtmp(ctx context.Context) error
- func InitSetting(ctx context.Context) error
- func InitStdLog(ctx context.Context) error
- func InitSysNotify(ctx context.Context) error
- func InitVendorBackend(ctx context.Context) error
- type Bootstrap
- type BootstrapConf
- type BootstrapFunc
- type ProviderGroupSetting
Constants ¶
This section is empty.
Variables ¶
View Source
var Oauth2EnabledCache = refreshcache0.NewRefreshCache[[]provider.OAuth2Provider](func(context.Context) ([]provider.OAuth2Provider, error) { ps := providers.EnabledProvider() r := make([]provider.OAuth2Provider, 0, ps.Len()) ps.Range(func(p provider.OAuth2Provider, value struct{}) bool { r = append(r, p) return true }) slices.SortStableFunc(r, func(a, b provider.OAuth2Provider) int { if a == b { return 0 } else if natural.Less(a, b) { return -1 } else { return 1 } }) return r, nil }, 0)
View Source
var Oauth2SignupEnabledCache = refreshcache0.NewRefreshCache[[]provider.OAuth2Provider](func(ctx context.Context) ([]provider.OAuth2Provider, error) { ps := providers.EnabledProvider() r := make([]provider.OAuth2Provider, 0, ps.Len()) ps.Range(func(p provider.OAuth2Provider, value struct{}) bool { group := model.SettingGroup(fmt.Sprintf("%s_%s", model.SettingGroupOauth2, p)) groupSettings := ProviderGroupSettings[group] if groupSettings.Enabled.Get() && !groupSettings.DisableUserSignup.Get() { r = append(r, p) } return true }) slices.SortStableFunc(r, func(a, b provider.OAuth2Provider) int { if a == b { return 0 } else if natural.Less(a, b) { return -1 } else { return 1 } }) return r, nil }, 0)
View Source
var ProviderGroupSettings = make(map[model.SettingGroup]*ProviderGroupSetting)
Functions ¶
func InitAggregationProviderSetting ¶ added in v0.4.2
func InitAggregationSetting ¶ added in v0.4.2
func InitAggregationSetting(pi provider.AggregationProviderInterface)
func InitCheckUpdate ¶ added in v0.2.4
func InitConfig ¶
func InitDatabase ¶ added in v0.3.0
func InitDefaultConfig ¶ added in v0.2.4
func InitDiscardLog ¶ added in v0.3.0
func InitGinMode ¶ added in v0.2.4
func InitProvider ¶ added in v0.3.0
func InitProviderSetting ¶ added in v0.4.2
func InitSetting ¶ added in v0.3.0
func InitStdLog ¶ added in v0.2.4
func InitSysNotify ¶
func InitVendorBackend ¶ added in v0.3.1
Types ¶
type Bootstrap ¶ added in v0.2.4
type Bootstrap struct {
// contains filtered or unexported fields
}
func New ¶ added in v0.2.4
func New(conf ...BootstrapConf) *Bootstrap
func (*Bootstrap) Add ¶ added in v0.2.4
func (b *Bootstrap) Add(f ...BootstrapFunc) *Bootstrap
type BootstrapConf ¶ added in v0.2.4
type BootstrapConf func(*Bootstrap)
func WithContext ¶ added in v0.2.4
func WithContext(ctx context.Context) BootstrapConf
func WithTask ¶ added in v0.2.4
func WithTask(f ...BootstrapFunc) BootstrapConf
type BootstrapFunc ¶ added in v0.2.4
type ProviderGroupSetting ¶ added in v0.3.1
type ProviderGroupSetting struct { Enabled settings.BoolSetting ClientID settings.StringSetting ClientSecret settings.StringSetting RedirectURL settings.StringSetting DisableUserSignup settings.BoolSetting SignupNeedReview settings.BoolSetting }
Click to show internal directories.
Click to hide internal directories.