publicinfo

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: GPL-3.0 Imports: 18 Imported by: 0

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

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

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

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

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

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

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

func (*GetPrivacyPolicyLogic) GetPrivacyPolicy

func (l *GetPrivacyPolicyLogic) GetPrivacyPolicy() (resp *dto.PrivacyPolicyConfig, err error)

type GetStatLogic

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

func (*GetStatLogic) GetStat

func (l *GetStatLogic) GetStat() (resp *dto.GetStatResponse, err error)

type GetTosLogic

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

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

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

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.

func NewService

func NewService(deps Deps) *Service

func (*Service) GetClient

func (*Service) GetGlobalConfig

func (s *Service) GetGlobalConfig(ctx context.Context) (*dto.GetGlobalConfigResponse, error)

func (*Service) GetPrivacyPolicy

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

func (*Service) GetStat

func (s *Service) GetStat(ctx context.Context) (*dto.GetStatResponse, error)

func (*Service) GetTos

func (s *Service) GetTos(ctx context.Context) (*dto.GetTosResponse, error)

func (*Service) Heartbeat

func (s *Service) Heartbeat(ctx context.Context) (*dto.HeartbeatResponse, error)

Jump to

Keyboard shortcuts

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