Documentation
¶
Overview ¶
Package delivery implements the subscription delivery subdomain of the subscription module: token-authenticated rendering of client configs via the adapter, with notice placeholders for expired/exhausted subscriptions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
SiteName string
Host string
SubscribeDomain string
ProfileUpdateInterval int64
ProfileWebPageURL string
UserAgentList string
GatewayMode bool
}
Config is the runtime configuration snapshot for a delivery request; it is re-read per request because the subscribe/site settings are mutable.
type Deps ¶
type Deps struct {
Clients repository.ClientRepo
Plans repository.SubscribeRepo
UserSubs repository.UserSubscriptionRepo
// Users is the identity read port for the account-enabled gate.
Users repository.UserRepo
Nodes repository.NodeRepo
Logs repository.LogRepo
// ConfigSnapshot reads the current delivery configuration.
ConfigSnapshot func() Config
}
type RequestMeta ¶
RequestMeta carries the raw transport details of the subscription request.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) Deliver ¶
func (s *Service) Deliver(ctx context.Context, meta RequestMeta, req *dto.SubscribeRequest) (*dto.SubscribeResponse, error)
Deliver renders the client configuration for a subscription token.
type SubscribeLogic ¶
func (*SubscribeLogic) Handler ¶
func (l *SubscribeLogic) Handler(req *dto.SubscribeRequest) (resp *dto.SubscribeResponse, err error)
Click to show internal directories.
Click to hide internal directories.