store

package
v0.0.0-...-4041dc2 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitDbVar

func InitDbVar() db

func New

func New() error

func NewChatOpsExtensionConn

func NewChatOpsExtensionConn() chatOpsExtensionDBConn

func NewComponentDBConn

func NewComponentDBConn() componentDBConn

func NewIncidentDBConn

func NewIncidentDBConn() incidentDBConn

func NewPagerdutyExtensionConn

func NewPagerdutyExtensionConn() pagedutyExtensionDBConn

func NewServiceDBConn

func NewServiceDBConn() serviceDBConn

func NewSquadcastExtensionConn

func NewSquadcastExtensionConn() squadcastExtensionDBConn

func NewSubscriptionConn

func NewSubscriptionConn() subscriptionDBConn

func NewWebhookExtensionConn

func NewWebhookExtensionConn() webhookExtensionDBConn

Types

type ChatopsExtensionStore

type ChatopsExtensionStore interface {
	Get() ([]schema.ChatopsExtension, error)
	GetByType(chatopType string) (schema.ChatopsExtension, error)
	Save(chatopsType string, webhookURL string, uuid uuid.UUID) error
	Delete(uuid uuid.UUID) error
}

type ComponentStore

type ComponentStore interface {
	Create(components []schema.Component) ([]schema.Component, error)
	GetAllByServiceID(serviceID uint) ([]schema.Component, error)
}

type IncidentStore

type IncidentStore interface {
	Create([]schema.Incident) ([]schema.Incident, error)
	GetByProviderIDs(providerIDs []string) ([]schema.Incident, error)
	CreateIncidentUpdates(incidentUpdates []schema.IncidentUpdate) ([]schema.IncidentUpdate, error)
	CreateIncidentComponents(incidentComponents []schema.IncidentComponent) error
	GetIncidentUpdatesByProviderIDs(providerIDs []string) ([]schema.IncidentUpdate, error)
}

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger(l *slog.Logger) *Logger

func (*Logger) Log

func (l *Logger) Log(ctx context.Context, level tracelog.LogLevel, msg string, data map[string]interface{})

type PagerdutyExtensionStore

type PagerdutyExtensionStore interface {
	Get() (schema.PagerdutyExtension, error)
	Save(routingKey string, uuid uuid.UUID) error
	Delete(uuid uuid.UUID) error
}

type ServiceStore

type ServiceStore interface {
	Create(services []schema.Service) error
	GetAll() ([]schema.Service, error)
}

type SquadcastExtensionStore

type SquadcastExtensionStore interface {
	Get() (schema.SquadcastExtension, error)
	Save(webhookURL string, uuid uuid.UUID) error
	Delete(uuid uuid.UUID) error
}

type SubscriptionStore

type SubscriptionStore interface {
	GetAllServicesForSubscriptions(serviceName string) ([]schema.ServicesForSubsciption, error)
	Create(serviceID uint, componentIDs []uint, isAllComponents bool) error
	GetByID(subscriptionID uuid.UUID) (schema.SubscriptionWithService, error)
	GetWithComponents(subscriptionID uuid.UUID) ([]schema.SubscriptionWithComponent, error)
	Update(subscriptionID uuid.UUID, componentIDs []uint, isAllComponents bool) error
	GetForIncidentUpdates(incidentUpdateID uint) ([]schema.SubscriptionForIncidentUpdate, error)
	DashboardSubscription(serviceName string, offset, limit uint) ([]schema.DashboardSubscription, error)
	GetIncidentsForSubscription(subscriptionUUID uuid.UUID, offset, limit uint) ([]schema.SubscriptionIncident, error)
	Delete(subscriptionID uuid.UUID) error
}

type WebhookExtensionStore

type WebhookExtensionStore interface {
	Get() (schema.WebhookExtension, error)
	Save(webhookURL string, secret sql.NullString, uuid uuid.UUID) error
	Delete(uuid uuid.UUID) error
}

Jump to

Keyboard shortcuts

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