Documentation
¶
Index ¶
- Constants
- Variables
- type AnalyticsData
- type EnvironmentInfo
- type IAnalytics
- type Service
- func (s *Service) GetAnalyticsData(ctx context.Context) (*AnalyticsData, error)
- func (s *Service) GetEnvironmentInfo(ctx context.Context) (*EnvironmentInfo, error)
- func (s *Service) GetSystemInfo(ctx context.Context) (*SystemInfo, error)
- func (s *Service) GetTransferStatsByCurrency(ctx context.Context) ([]TransferStatsByCurrency, error)
- func (s *Service) IsAnalyticsEnabled(ctx context.Context) (bool, error)
- type SystemInfo
- type TransferStatsByCurrency
Constants ¶
View Source
const (
SystemInfoCacheKey = "system_info_cache_key"
)
Variables ¶
View Source
var (
ErrAnalyticsDisabled = errors.New("analytics is disabled")
)
Functions ¶
This section is empty.
Types ¶
type AnalyticsData ¶
type AnalyticsData struct {
EnvironmentInfo *EnvironmentInfo `json:"environment_info"`
SystemInfo *SystemInfo `json:"system_info"`
TransferStats []TransferStatsByCurrency `json:"transfer_stats"`
}
func (AnalyticsData) ConvertToAdminModel ¶
func (o AnalyticsData) ConvertToAdminModel() *admin_requests.AnalyticsData
type EnvironmentInfo ¶
type EnvironmentInfo struct {
BackendVersionHash string `json:"backend_version_hash"`
BackendVersionTag string `json:"backend_version_tag"`
ProcessingVersionHash string `json:"processing_version_hash"`
ProcessingVersionTag string `json:"processing_version_tag"`
UpdaterVersionHash string `json:"updater_version_hash"`
UpdaterVersionTag string `json:"updater_version_tag"`
}
type IAnalytics ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService( storage storage.IStorage, cache cache.ICache, settings setting.IRootSettings, adminGateway *admin_gateway.Service, processingSvc processing.IProcessingSystem, updaterSvc updater.IUpdateClient, appVersion, appHash string, ) *Service
func (*Service) GetAnalyticsData ¶
func (s *Service) GetAnalyticsData(ctx context.Context) (*AnalyticsData, error)
func (*Service) GetEnvironmentInfo ¶
func (s *Service) GetEnvironmentInfo(ctx context.Context) (*EnvironmentInfo, error)
func (*Service) GetSystemInfo ¶
func (s *Service) GetSystemInfo(ctx context.Context) (*SystemInfo, error)
func (*Service) GetTransferStatsByCurrency ¶
func (s *Service) GetTransferStatsByCurrency(ctx context.Context) ([]TransferStatsByCurrency, error)
type SystemInfo ¶
type SystemInfo struct {
OS string `json:"os"`
Architecture string `json:"architecture"`
Distribution string `json:"distribution"`
Family string `json:"family"`
IsVM bool `json:"is_vm"`
Version string `json:"version"`
GoVersion string `json:"go_version"`
CollectionTime time.Time `json:"collection_time"`
}
Click to show internal directories.
Click to hide internal directories.