Documentation
¶
Index ¶
- func ConfigureThreadWindsCredentials(ctx context.Context, deps *ClientDependencies, twConfig *ThreadWindsConfig) error
- type BackendClient
- func (c *BackendClient) GetIncidentAlerts(ctx context.Context, incidentID int64) ([]*models.IncidentAlert, error)
- func (c *BackendClient) GetRecentIncidents(ctx context.Context) ([]*models.Incident, error)
- func (c *BackendClient) GetThreadWindsConfig(ctx context.Context) (*ThreadWindsConfig, error)
- func (c *BackendClient) SaveThreadWindsCredentials(ctx context.Context, apiKey, apiSecret string, keyID, secretID int64) error
- type ClientDependencies
- type ConfigParameter
- type CustomersManagerClient
- type OpenSearchClient
- type RegistrationResponse
- type ThreadWindsClient
- type ThreadWindsConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureThreadWindsCredentials ¶
func ConfigureThreadWindsCredentials(ctx context.Context, deps *ClientDependencies, twConfig *ThreadWindsConfig) error
Types ¶
type BackendClient ¶
type BackendClient struct {
// contains filtered or unexported fields
}
func NewBackendClient ¶
func NewBackendClient(cfg *config.TWConfig) *BackendClient
func (*BackendClient) GetIncidentAlerts ¶
func (c *BackendClient) GetIncidentAlerts(ctx context.Context, incidentID int64) ([]*models.IncidentAlert, error)
func (*BackendClient) GetRecentIncidents ¶
func (*BackendClient) GetThreadWindsConfig ¶
func (c *BackendClient) GetThreadWindsConfig(ctx context.Context) (*ThreadWindsConfig, error)
func (*BackendClient) SaveThreadWindsCredentials ¶
type ClientDependencies ¶
type ClientDependencies struct {
Backend *BackendClient
CM *CustomersManagerClient
ThreadWinds *ThreadWindsClient
OpenSearch *OpenSearchClient
}
func NewClientDependencies ¶
func NewClientDependencies(cfg *config.TWConfig) (*ClientDependencies, error)
type ConfigParameter ¶
type ConfigParameter struct {
ID int64 `json:"id"`
SectionID int64 `json:"sectionId"`
ConfParamShort string `json:"confParamShort"`
ConfParamLarge string `json:"confParamLarge,omitempty"`
ConfParamDescription string `json:"confParamDescription,omitempty"`
ConfParamValue string `json:"confParamValue"`
ConfParamRequired bool `json:"confParamRequired,omitempty"`
ConfParamDatatype string `json:"confParamDatatype,omitempty"`
}
type CustomersManagerClient ¶
type CustomersManagerClient struct {
Server string `yaml:"server"`
InstanceID string `yaml:"instance_id"`
InstanceKey string `yaml:"instance_key"`
}
func (*CustomersManagerClient) LoadInstanceConfig ¶
func (c *CustomersManagerClient) LoadInstanceConfig() error
func (*CustomersManagerClient) RegisterUserReporter ¶
func (c *CustomersManagerClient) RegisterUserReporter() (*RegistrationResponse, error)
type OpenSearchClient ¶
type OpenSearchClient struct {
// contains filtered or unexported fields
}
func NewOpenSearchClient ¶
func NewOpenSearchClient(cfg *config.TWConfig) (*OpenSearchClient, error)
func (*OpenSearchClient) GetAlertByID ¶
type RegistrationResponse ¶
type ThreadWindsClient ¶
type ThreadWindsClient struct {
// contains filtered or unexported fields
}
func NewThreadWindsClient ¶
func NewThreadWindsClient(cfg *config.TWConfig) *ThreadWindsClient
func (*ThreadWindsClient) IngestBatch ¶
func (*ThreadWindsClient) UpdateCredentials ¶
func (c *ThreadWindsClient) UpdateCredentials(apiKey, apiSecret string)
Click to show internal directories.
Click to hide internal directories.