systemsetting

package
v1.20.1 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2026 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package systemsetting implements the system configuration subdomain of the platform module. Runtime subsystem re-initialization, restart and the mutable configuration snapshot are reached through injected callbacks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deps

type Deps struct {
	System repository.SystemRepo
	Store  PlatformTransactor
	// Reinitialize re-runs a subsystem's initialization after its
	// configuration changed.
	Reinitialize func(subsystem string)
	// Restart restarts the transport server (subscribe path changes).
	Restart func() error
	// SubscribePath reads the currently active subscribe path.
	SubscribePath func() string
	// ApplyVerifyConfig propagates the verify settings to the running
	// configuration before re-initialization.
	ApplyVerifyConfig func(req *dto.VerifyConfig)
	// Multiplier evaluates the current node traffic multiplier.
	Multiplier func(at time.Time) float32
}

type GetCurrencyConfigLogic

type GetCurrencyConfigLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*GetCurrencyConfigLogic) GetCurrencyConfig

func (l *GetCurrencyConfigLogic) GetCurrencyConfig() (resp *dto.CurrencyConfig, err error)

type GetInviteConfigLogic

type GetInviteConfigLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*GetInviteConfigLogic) GetInviteConfig

func (l *GetInviteConfigLogic) GetInviteConfig() (*dto.InviteConfig, error)

type GetModuleConfigLogic

type GetModuleConfigLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*GetModuleConfigLogic) GetModuleConfig

func (l *GetModuleConfigLogic) GetModuleConfig() (resp *dto.ModuleConfig, err error)

type GetNodeConfigLogic

type GetNodeConfigLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*GetNodeConfigLogic) GetNodeConfig

func (l *GetNodeConfigLogic) GetNodeConfig() (*dto.NodeConfig, error)

type GetNodeMultiplierLogic

type GetNodeMultiplierLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*GetNodeMultiplierLogic) GetNodeMultiplier

func (l *GetNodeMultiplierLogic) GetNodeMultiplier() (resp *dto.GetNodeMultiplierResponse, err error)

type GetPrivacyPolicyConfigLogic

type GetPrivacyPolicyConfigLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*GetPrivacyPolicyConfigLogic) GetPrivacyPolicyConfig

func (l *GetPrivacyPolicyConfigLogic) GetPrivacyPolicyConfig() (resp *dto.PrivacyPolicyConfig, err error)

type GetRegisterConfigLogic

type GetRegisterConfigLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*GetRegisterConfigLogic) GetRegisterConfig

func (l *GetRegisterConfigLogic) GetRegisterConfig() (*dto.RegisterConfig, error)

type GetSiteConfigLogic

type GetSiteConfigLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*GetSiteConfigLogic) GetSiteConfig

func (l *GetSiteConfigLogic) GetSiteConfig() (resp *dto.SiteConfig, err error)

type GetSubscribeConfigLogic

type GetSubscribeConfigLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*GetSubscribeConfigLogic) GetSubscribeConfig

func (l *GetSubscribeConfigLogic) GetSubscribeConfig() (resp *dto.SubscribeConfig, err error)

type GetTosConfigLogic

type GetTosConfigLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*GetTosConfigLogic) GetTosConfig

func (l *GetTosConfigLogic) GetTosConfig() (resp *dto.TosConfig, err error)

type GetVerifyCodeConfigLogic

type GetVerifyCodeConfigLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*GetVerifyCodeConfigLogic) GetVerifyCodeConfig

func (l *GetVerifyCodeConfigLogic) GetVerifyCodeConfig() (resp *dto.VerifyCodeConfig, err error)

type GetVerifyConfigLogic

type GetVerifyConfigLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*GetVerifyConfigLogic) GetVerifyConfig

func (l *GetVerifyConfigLogic) GetVerifyConfig() (*dto.VerifyConfig, error)

type MultiplierFunc

type MultiplierFunc = func(at time.Time) float32

MultiplierFunc evaluates the current node traffic multiplier.

type PlatformTransactor

type PlatformTransactor interface {
	InPlatformTx(ctx context.Context, fn func(repository.PlatformStore) error) error
}

PlatformTransactor mirrors the store's platform-scoped transaction.

type PreViewNodeMultiplierLogic

type PreViewNodeMultiplierLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*PreViewNodeMultiplierLogic) PreViewNodeMultiplier

func (l *PreViewNodeMultiplierLogic) PreViewNodeMultiplier() (resp *dto.PreViewNodeMultiplierResponse, err error)

type Service

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

func NewService

func NewService(deps Deps) *Service

func (*Service) GetCurrencyConfig

func (s *Service) GetCurrencyConfig(ctx context.Context) (*dto.CurrencyConfig, error)

func (*Service) GetInviteConfig

func (s *Service) GetInviteConfig(ctx context.Context) (*dto.InviteConfig, error)

func (*Service) GetModuleConfig

func (s *Service) GetModuleConfig(ctx context.Context) (*dto.ModuleConfig, error)

func (*Service) GetNodeConfig

func (s *Service) GetNodeConfig(ctx context.Context) (*dto.NodeConfig, error)

func (*Service) GetNodeMultiplier

func (s *Service) GetNodeMultiplier(ctx context.Context) (*dto.GetNodeMultiplierResponse, error)

func (*Service) GetPrivacyPolicyConfig

func (s *Service) GetPrivacyPolicyConfig(ctx context.Context) (*dto.PrivacyPolicyConfig, error)

func (*Service) GetRegisterConfig

func (s *Service) GetRegisterConfig(ctx context.Context) (*dto.RegisterConfig, error)

func (*Service) GetSiteConfig

func (s *Service) GetSiteConfig(ctx context.Context) (*dto.SiteConfig, error)

func (*Service) GetSubscribeConfig

func (s *Service) GetSubscribeConfig(ctx context.Context) (*dto.SubscribeConfig, error)

func (*Service) GetTosConfig

func (s *Service) GetTosConfig(ctx context.Context) (*dto.TosConfig, error)

func (*Service) GetVerifyCodeConfig

func (s *Service) GetVerifyCodeConfig(ctx context.Context) (*dto.VerifyCodeConfig, error)

func (*Service) GetVerifyConfig

func (s *Service) GetVerifyConfig(ctx context.Context) (*dto.VerifyConfig, error)

func (*Service) PreViewNodeMultiplier

func (s *Service) PreViewNodeMultiplier(ctx context.Context) (*dto.PreViewNodeMultiplierResponse, error)

func (*Service) SetNodeMultiplier

func (s *Service) SetNodeMultiplier(ctx context.Context, req *dto.SetNodeMultiplierRequest) error

func (*Service) SettingTelegramBot

func (s *Service) SettingTelegramBot(ctx context.Context) error

func (*Service) UpdateCurrencyConfig

func (s *Service) UpdateCurrencyConfig(ctx context.Context, req *dto.CurrencyConfig) error

func (*Service) UpdateInviteConfig

func (s *Service) UpdateInviteConfig(ctx context.Context, req *dto.InviteConfig) error

func (*Service) UpdateNodeConfig

func (s *Service) UpdateNodeConfig(ctx context.Context, req *dto.NodeConfig) error

func (*Service) UpdatePrivacyPolicyConfig

func (s *Service) UpdatePrivacyPolicyConfig(ctx context.Context, req *dto.PrivacyPolicyConfig) error

func (*Service) UpdateRegisterConfig

func (s *Service) UpdateRegisterConfig(ctx context.Context, req *dto.RegisterConfig) error

func (*Service) UpdateSiteConfig

func (s *Service) UpdateSiteConfig(ctx context.Context, req *dto.SiteConfig) error

func (*Service) UpdateSubscribeConfig

func (s *Service) UpdateSubscribeConfig(ctx context.Context, req *dto.SubscribeConfig) error

func (*Service) UpdateTosConfig

func (s *Service) UpdateTosConfig(ctx context.Context, req *dto.TosConfig) error

func (*Service) UpdateVerifyCodeConfig

func (s *Service) UpdateVerifyCodeConfig(ctx context.Context, req *dto.VerifyCodeConfig) error

func (*Service) UpdateVerifyConfig

func (s *Service) UpdateVerifyConfig(ctx context.Context, req *dto.VerifyConfig) error

type SetNodeMultiplierLogic

type SetNodeMultiplierLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*SetNodeMultiplierLogic) SetNodeMultiplier

func (l *SetNodeMultiplierLogic) SetNodeMultiplier(req *dto.SetNodeMultiplierRequest) error

type SettingTelegramBotLogic

type SettingTelegramBotLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*SettingTelegramBotLogic) SettingTelegramBot

func (l *SettingTelegramBotLogic) SettingTelegramBot() error

type UpdateCurrencyConfigLogic

type UpdateCurrencyConfigLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*UpdateCurrencyConfigLogic) UpdateCurrencyConfig

func (l *UpdateCurrencyConfigLogic) UpdateCurrencyConfig(req *dto.CurrencyConfig) error

type UpdateInviteConfigLogic

type UpdateInviteConfigLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*UpdateInviteConfigLogic) UpdateInviteConfig

func (l *UpdateInviteConfigLogic) UpdateInviteConfig(req *dto.InviteConfig) error

type UpdateNodeConfigLogic

type UpdateNodeConfigLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*UpdateNodeConfigLogic) UpdateNodeConfig

func (l *UpdateNodeConfigLogic) UpdateNodeConfig(req *dto.NodeConfig) error

type UpdatePrivacyPolicyConfigLogic

type UpdatePrivacyPolicyConfigLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*UpdatePrivacyPolicyConfigLogic) UpdatePrivacyPolicyConfig

func (l *UpdatePrivacyPolicyConfigLogic) UpdatePrivacyPolicyConfig(req *dto.PrivacyPolicyConfig) error

type UpdateRegisterConfigLogic

type UpdateRegisterConfigLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*UpdateRegisterConfigLogic) UpdateRegisterConfig

func (l *UpdateRegisterConfigLogic) UpdateRegisterConfig(req *dto.RegisterConfig) error

type UpdateSiteConfigLogic

type UpdateSiteConfigLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*UpdateSiteConfigLogic) UpdateSiteConfig

func (l *UpdateSiteConfigLogic) UpdateSiteConfig(req *dto.SiteConfig) error

type UpdateSubscribeConfigLogic

type UpdateSubscribeConfigLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*UpdateSubscribeConfigLogic) UpdateSubscribeConfig

func (l *UpdateSubscribeConfigLogic) UpdateSubscribeConfig(req *dto.SubscribeConfig) error

type UpdateTosConfigLogic

type UpdateTosConfigLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*UpdateTosConfigLogic) UpdateTosConfig

func (l *UpdateTosConfigLogic) UpdateTosConfig(req *dto.TosConfig) error

type UpdateVerifyCodeConfigLogic

type UpdateVerifyCodeConfigLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*UpdateVerifyCodeConfigLogic) UpdateVerifyCodeConfig

func (l *UpdateVerifyCodeConfigLogic) UpdateVerifyCodeConfig(req *dto.VerifyCodeConfig) error

type UpdateVerifyConfigLogic

type UpdateVerifyConfigLogic struct {
	logger.Logger
	// contains filtered or unexported fields
}

func (*UpdateVerifyConfigLogic) UpdateVerifyConfig

func (l *UpdateVerifyConfigLogic) UpdateVerifyConfig(req *dto.VerifyConfig) error

Jump to

Keyboard shortcuts

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