Documentation
¶
Index ¶
- type APIKeyCreator
- type AgentStat
- type AgentsStats
- type CompanyOverview
- type Environment
- type EnvironmentRequestSummary
- type RequestKind
- type RequestSource
- type RequestTotals
- type Stat
- type System
- func (s *System) AddAgentError(companyId, agentId, environmentId string)
- func (s *System) AddAgentSuccess(companyId, agentId, environmentId string)
- func (s *System) GetAgentEnvironmentStats(ctx context.Context, agentId string, timePeriod int) (*AgentStat, error)
- func (s *System) GetAgentName(ctx context.Context, agentId string) (string, error)
- func (s *System) GetAgentStats(w http.ResponseWriter, r *http.Request)
- func (s *System) GetAgentsStats(w http.ResponseWriter, r *http.Request)
- func (s *System) GetAgentsStatsFromInflux(ctx context.Context, companyId string) (*AgentsStats, error)
- func (s *System) GetCompanyOverview(ctx context.Context, companyId string) (*CompanyOverview, error)
- func (s *System) GetCompanyStats(w http.ResponseWriter, r *http.Request)
- func (s *System) GetEnvironmentName(ctx context.Context, environmentId string) (string, error)
- func (s *System) GetEnvironmentStats(w http.ResponseWriter, r *http.Request)
- func (s *System) GetNamesForData(ctx context.Context, data *AgentStat) (*AgentStat, error)
- func (s *System) GetProjectStats(w http.ResponseWriter, r *http.Request)
- func (s *System) RecordAPIKeyCreation(ctx context.Context, userSubject, projectId, agentId, environmentId string) error
- func (s *System) RecordEnvironmentRequest(ctx context.Context, projectId, agentId, environmentId string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIKeyCreator ¶ added in v0.15.0
type APIKeyCreator struct {
Subject string `json:"subject"`
Name string `json:"name"`
Email string `json:"email"`
CreatedAt string `json:"created_at"`
ProjectID string `json:"project_id"`
ProjectName string `json:"project_name"`
AgentID string `json:"agent_id"`
AgentName string `json:"agent_name"`
EnvironmentID string `json:"environment_id,omitempty"`
EnvironmentName string `json:"environment_name,omitempty"`
}
type AgentStat ¶
type AgentStat struct {
ID string `json:"id"`
Name string `json:"name"`
Stats []Stat `json:"stats"`
Environments []Environment `json:"environments"`
}
type AgentsStats ¶
type AgentsStats struct {
Agents []AgentStat `json:"agents"`
}
type CompanyOverview ¶ added in v0.15.0
type CompanyOverview struct {
RequestTotals RequestTotals `json:"request_totals"`
EnvironmentRequests []EnvironmentRequestSummary `json:"environment_requests"`
LatestAPIKeyCreator *APIKeyCreator `json:"latest_api_key_creator,omitempty"`
}
type Environment ¶
type EnvironmentRequestSummary ¶ added in v0.15.0
type EnvironmentRequestSummary struct {
EnvironmentID string `json:"environment_id"`
EnvironmentName string `json:"environment_name"`
AgentID string `json:"agent_id"`
AgentName string `json:"agent_name"`
ProjectID string `json:"project_id"`
ProjectName string `json:"project_name"`
SingleFlagRequests int `json:"single_flag_requests"`
AllFlagsRequests int `json:"all_flags_requests"`
TotalRequests int `json:"total_requests"`
}
type RequestKind ¶ added in v0.15.0
type RequestKind string
const ( RequestKindSingleFlag RequestKind = "single_flag" RequestKindAllFlags RequestKind = "all_flags" )
type RequestSource ¶ added in v0.15.0
type RequestSource string
const ( RequestSourceOFREPSingle RequestSource = "ofrep_single" RequestSourceOFREPBulk RequestSource = "ofrep_bulk" RequestSourceSDKAll RequestSource = "sdk_all" )
type RequestTotals ¶ added in v0.15.0
type System ¶
type System struct {
Config *ConfigBuilder.Config
}
func NewSystem ¶
func NewSystem(cfg *ConfigBuilder.Config) *System
func (*System) AddAgentError ¶
func (*System) AddAgentSuccess ¶
func (*System) GetAgentEnvironmentStats ¶
func (*System) GetAgentName ¶
func (*System) GetAgentStats ¶
func (s *System) GetAgentStats(w http.ResponseWriter, r *http.Request)
func (*System) GetAgentsStats ¶
func (s *System) GetAgentsStats(w http.ResponseWriter, r *http.Request)
func (*System) GetAgentsStatsFromInflux ¶
func (*System) GetCompanyOverview ¶ added in v0.15.0
func (*System) GetCompanyStats ¶
func (s *System) GetCompanyStats(w http.ResponseWriter, r *http.Request)
func (*System) GetEnvironmentName ¶
func (*System) GetEnvironmentStats ¶
func (s *System) GetEnvironmentStats(w http.ResponseWriter, r *http.Request)
func (*System) GetNamesForData ¶
func (*System) GetProjectStats ¶
func (s *System) GetProjectStats(w http.ResponseWriter, r *http.Request)
func (*System) RecordAPIKeyCreation ¶ added in v0.15.0
func (*System) RecordEnvironmentRequest ¶ added in v0.15.0
func (s *System) RecordEnvironmentRequest(ctx context.Context, projectId, agentId, environmentId string, requestKind RequestKind, requestSource RequestSource) error
Click to show internal directories.
Click to hide internal directories.