Documentation
¶
Overview ¶
Service assembly for the public-info subdomain: unauthenticated site-level reads (global configuration, ToS/privacy, aggregate stats, client downloads, liveness). Only the module facade may reach it.
Index ¶
- type Deps
- type GetClientLogic
- type GetGlobalConfigDependencies
- type GetGlobalConfigLogic
- type GetPrivacyPolicyLogic
- type GetStatLogic
- type GetTosLogic
- type GlobalConfigSnapshot
- type GlobalConfigStore
- type HeartbeatLogic
- type Service
- func (s *Service) GetClient(ctx context.Context) (*dto.GetSubscribeClientResponse, error)
- func (s *Service) GetGlobalConfig(ctx context.Context) (*dto.GetGlobalConfigResponse, error)
- func (s *Service) GetPrivacyPolicy(ctx context.Context) (*dto.PrivacyPolicyConfig, error)
- func (s *Service) GetStat(ctx context.Context) (*dto.GetStatResponse, error)
- func (s *Service) GetTos(ctx context.Context) (*dto.GetTosResponse, error)
- func (s *Service) Heartbeat(ctx context.Context) (*dto.HeartbeatResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deps ¶
type Deps struct {
// Store carries the public read surface (system settings, auth methods,
// user/node counters, client downloads).
Store repository.Store
Redis *redis.Client
// Config snapshots the runtime-mutable public configuration per request.
Config func() GlobalConfigSnapshot
}
Deps declares the subdomain's dependencies; the module facade forwards them from the composition root.
type GetClientLogic ¶
func (*GetClientLogic) GetClient ¶
func (l *GetClientLogic) GetClient() (resp *dto.GetSubscribeClientResponse, err error)
type GetGlobalConfigDependencies ¶
type GetGlobalConfigDependencies struct {
Store GlobalConfigStore
Config GlobalConfigSnapshot
}
GetGlobalConfigDependencies explicitly declares the collaborators of the global configuration query instead of passing ServiceContext to business logic.
type GetGlobalConfigLogic ¶
func NewGetGlobalConfigLogic ¶
func NewGetGlobalConfigLogic(ctx context.Context, deps GetGlobalConfigDependencies) *GetGlobalConfigLogic
Get global config
func (*GetGlobalConfigLogic) GetGlobalConfig ¶
func (l *GetGlobalConfigLogic) GetGlobalConfig() (resp *dto.GetGlobalConfigResponse, err error)
type GetPrivacyPolicyLogic ¶
func (*GetPrivacyPolicyLogic) GetPrivacyPolicy ¶
func (l *GetPrivacyPolicyLogic) GetPrivacyPolicy() (resp *dto.PrivacyPolicyConfig, err error)
type GetStatLogic ¶
func (*GetStatLogic) GetStat ¶
func (l *GetStatLogic) GetStat() (resp *dto.GetStatResponse, err error)
type GetTosLogic ¶
func (*GetTosLogic) GetTos ¶
func (l *GetTosLogic) GetTos() (resp *dto.GetTosResponse, err error)
type GlobalConfigSnapshot ¶
type GlobalConfigSnapshot struct {
Site config.SiteConfig
Subscribe config.SubscribeConfig
Email config.EmailConfig
Mobile config.MobileConfig
Register config.RegisterConfig
Verify config.Verify
Invite config.InviteConfig
}
GlobalConfigSnapshot is the public runtime configuration consumed when assembling the global configuration response.
type GlobalConfigStore ¶
type GlobalConfigStore interface {
System() repository.SystemRepo
Auth() repository.AuthRepo
}
GlobalConfigStore is the persistence surface used by public global configuration reads. It excludes unrelated application repositories.
type HeartbeatLogic ¶
func (*HeartbeatLogic) Heartbeat ¶
func (l *HeartbeatLogic) Heartbeat() (resp *dto.HeartbeatResponse, err error)
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the public-info subdomain entry point used by the platform facade.