Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alert ¶
type Alert struct {
ID uint64 `db:"id"`
NamespaceID sql.NullInt64 `db:"namespace_id"`
ProviderID uint64 `db:"provider_id"`
ResourceName string `db:"resource_name"`
MetricName string `db:"metric_name"`
MetricValue string `db:"metric_value"`
Severity string `db:"severity"`
Rule string `db:"rule"`
TriggeredAt time.Time `db:"triggered_at"`
CreatedAt time.Time `db:"created_at"`
UpdatedAt time.Time `db:"updated_at"`
}
func (*Alert) FromDomain ¶
type Namespace ¶
type Namespace struct {
ID uint64 `db:"id"`
ProviderID uint64 `db:"provider_id"`
URN string `db:"urn"`
Name string `db:"name"`
CredentialString string `db:"credentials"`
Labels pgc.StringStringMap `db:"labels"`
CreatedAt time.Time `db:"created_at"`
UpdatedAt time.Time `db:"updated_at"`
}
func (*Namespace) FromDomain ¶
func (ns *Namespace) FromDomain(n namespace.EncryptedNamespace)
func (*Namespace) ToDomain ¶
func (ns *Namespace) ToDomain() *namespace.EncryptedNamespace
type NamespaceDetail ¶ added in v0.5.0
type NamespaceDetail struct {
ID uint64 `db:"id"`
Provider Provider `db:"provider"`
URN string `db:"urn"`
Name string `db:"name"`
CredentialString string `db:"credentials"`
Labels pgc.StringStringMap `db:"labels"`
CreatedAt time.Time `db:"created_at"`
UpdatedAt time.Time `db:"updated_at"`
}
func (*NamespaceDetail) FromDomain ¶ added in v0.5.0
func (ns *NamespaceDetail) FromDomain(n namespace.EncryptedNamespace)
func (*NamespaceDetail) ToDomain ¶ added in v0.5.0
func (ns *NamespaceDetail) ToDomain() *namespace.EncryptedNamespace
type Provider ¶
type Provider struct {
ID uint64 `db:"id"`
Host string `db:"host"`
URN string `db:"urn"`
Name string `db:"name"`
Type string `db:"type"`
Credentials pgc.StringInterfaceMap `db:"credentials"`
Labels pgc.StringStringMap `db:"labels"`
CreatedAt time.Time `db:"created_at"`
UpdatedAt time.Time `db:"updated_at"`
}
func (*Provider) FromDomain ¶
type Receiver ¶
type Receiver struct {
ID uint64 `db:"id"`
Name string `db:"name"`
Type string `db:"type"`
Labels pgc.StringStringMap `db:"labels"`
Configurations pgc.StringInterfaceMap `db:"configurations"`
Data pgc.StringInterfaceMap `db:"-"` //TODO do we need this?
CreatedAt time.Time `db:"created_at"`
UpdatedAt time.Time `db:"updated_at"`
}
func (*Receiver) FromDomain ¶
type Rule ¶
type Rule struct {
ID uint64 `db:"id"`
Name string `db:"name"`
Namespace string `db:"namespace"`
GroupName string `db:"group_name"`
Template string `db:"template"`
Enabled bool `db:"enabled"`
Variables string `db:"variables"`
ProviderNamespace uint64 `db:"provider_namespace"`
CreatedAt time.Time `db:"created_at"`
UpdatedAt time.Time `db:"updated_at"`
}
type Subscription ¶
type Subscription struct {
ID uint64 `db:"id"`
NamespaceID uint64 `db:"namespace_id"`
URN string `db:"urn"`
Receiver SubscriptionReceivers `db:"receiver"`
Match pgc.StringStringMap `db:"match"`
CreatedAt time.Time `db:"created_at"`
UpdatedAt time.Time `db:"updated_at"`
}
func (*Subscription) FromDomain ¶
func (s *Subscription) FromDomain(sub subscription.Subscription)
func (*Subscription) ToDomain ¶
func (s *Subscription) ToDomain() *subscription.Subscription
type SubscriptionReceiver ¶
type SubscriptionReceivers ¶
type SubscriptionReceivers []SubscriptionReceiver
func (*SubscriptionReceivers) Scan ¶
func (list *SubscriptionReceivers) Scan(src interface{}) error
Click to show internal directories.
Click to hide internal directories.