readmodel

package
v1.21.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package readmodel holds the platform's own views of other modules' data: the figures its dashboards, audit views and public statistics show. The composition root converts the owning modules' facade results into them, so the shared kernel depends on no other module (ADR-001).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthMethod

type AuthMethod struct {
	Method  string
	Config  string
	Enabled bool
}

AuthMethod is a configured authentication method.

type OrdersTotal

type OrdersTotal struct {
	AmountTotal        int64
	NewOrderAmount     int64
	RenewalOrderAmount int64
}

OrdersTotal sums the orders of a period, in minor units.

type OrdersTotalWithDate

type OrdersTotalWithDate struct {
	Date               string
	AmountTotal        int64
	NewOrderAmount     int64
	RenewalOrderAmount int64
}

OrdersTotalWithDate is one period of an order breakdown.

type Server

type Server struct {
	Id   int64
	Name string
}

Server is a server as the traffic rankings name it.

type ServerTrafficRanking

type ServerTrafficRanking struct {
	ServerId int64
	Download int64
	Upload   int64
	Total    int64
}

ServerTrafficRanking is one server's traffic in a ranking.

type TotalTraffic

type TotalTraffic struct {
	Download int64
	Upload   int64
}

TotalTraffic sums the traffic of a period, in bytes.

type TrafficLog

type TrafficLog struct {
	Id          int64
	ServerId    int64
	UserId      int64
	SubscribeId int64
	Download    int64
	Upload      int64
	Timestamp   time.Time
}

TrafficLog is one traffic log entry.

type TrafficLogDetailsFilter

type TrafficLogDetailsFilter struct {
	ServerId    int64
	UserId      int64
	SubscribeId int64
	Start       time.Time
	End         time.Time
	Page        int
	Size        int
}

TrafficLogDetailsFilter selects one page of the traffic log entries logged in [Start, End), a zero bound leaving that side open, for the non-zero ids.

type UserStatisticsWithDate

type UserStatisticsWithDate struct {
	Date              string
	Register          int64
	NewOrderUsers     int64
	RenewalOrderUsers int64
}

UserStatisticsWithDate is one period of the registration and paying-user breakdown.

type UserTrafficRanking

type UserTrafficRanking struct {
	UserId      int64
	SubscribeId int64
	Download    int64
	Upload      int64
	Total       int64
}

UserTrafficRanking is one subscription's traffic in a ranking.

Jump to

Keyboard shortcuts

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