postgres

package
v0.5.9 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Migrate added in v0.5.0

func Migrate(cfg db.Config) error

Types

type AlertRepository

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

AlertRepository talks to the store to read or insert data

func NewAlertRepository

func NewAlertRepository(client *pgc.Client) *AlertRepository

NewAlertRepository returns repository struct

func (AlertRepository) BulkUpdateSilence added in v0.5.8

func (r AlertRepository) BulkUpdateSilence(ctx context.Context, alertIDs []int64, silenceStatus string) error

func (AlertRepository) Create

func (r AlertRepository) Create(ctx context.Context, alrt alert.Alert) (alert.Alert, error)

func (AlertRepository) List

func (r AlertRepository) List(ctx context.Context, flt alert.Filter) ([]alert.Alert, error)

type IdempotencyRepository added in v0.5.6

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

IdempotencyRepository talks to the store to read or insert idempotency keys

func NewIdempotencyRepository added in v0.5.6

func NewIdempotencyRepository(client *pgc.Client) *IdempotencyRepository

NewIdempotencyRepository returns repository struct

func (*IdempotencyRepository) Delete added in v0.5.6

func (*IdempotencyRepository) InsertOnConflictReturning added in v0.5.6

func (r *IdempotencyRepository) InsertOnConflictReturning(ctx context.Context, scope, key string) (*notification.Idempotency, error)

func (*IdempotencyRepository) UpdateSuccess added in v0.5.6

func (r *IdempotencyRepository) UpdateSuccess(ctx context.Context, id uint64, success bool) error

type LogRepository added in v0.5.8

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

LogRepository talks to the store to read or insert data

func NewLogRepository added in v0.5.8

func NewLogRepository(client *pgc.Client) *LogRepository

NewLogRepository returns LogRepository struct

func (*LogRepository) BulkCreate added in v0.5.8

func (r *LogRepository) BulkCreate(ctx context.Context, nss []log.Notification) error

func (*LogRepository) ListAlertIDsBySilenceID added in v0.5.8

func (r *LogRepository) ListAlertIDsBySilenceID(ctx context.Context, silenceID string) ([]int64, error)

func (*LogRepository) ListSubscriptionIDsBySilenceID added in v0.5.8

func (r *LogRepository) ListSubscriptionIDsBySilenceID(ctx context.Context, silenceID string) ([]int64, error)

type NamespaceRepository

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

NamespaceRepository talks to the store to read or insert data

func NewNamespaceRepository

func NewNamespaceRepository(client *pgc.Client) *NamespaceRepository

NewNamespaceRepository returns repository struct

func (*NamespaceRepository) Commit added in v0.5.0

func (r *NamespaceRepository) Commit(ctx context.Context) error

func (NamespaceRepository) Create

func (NamespaceRepository) Delete

func (r NamespaceRepository) Delete(ctx context.Context, id uint64) error

func (NamespaceRepository) Get

func (NamespaceRepository) List

func (*NamespaceRepository) Rollback added in v0.5.0

func (r *NamespaceRepository) Rollback(ctx context.Context, err error) error

func (NamespaceRepository) Update

func (*NamespaceRepository) WithTransaction added in v0.5.0

func (r *NamespaceRepository) WithTransaction(ctx context.Context) context.Context

type NotificationRepository added in v0.5.8

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

NotificationRepository talks to the store to read or insert data

func NewNotificationRepository added in v0.5.8

func NewNotificationRepository(client *pgc.Client) *NotificationRepository

NewNotificationRepository returns NotificationRepository struct

func (*NotificationRepository) Create added in v0.5.8

type ProviderRepository

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

ProviderRepository talks to the store to read or insert data

func NewProviderRepository

func NewProviderRepository(client *pgc.Client) *ProviderRepository

NewProviderRepository returns repository struct

func (ProviderRepository) Create

func (ProviderRepository) Delete

func (r ProviderRepository) Delete(ctx context.Context, id uint64) error

func (ProviderRepository) Get

func (ProviderRepository) List

func (ProviderRepository) Update

func (r ProviderRepository) Update(ctx context.Context, provDomain *provider.Provider) error

type ReceiverRepository

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

ReceiverRepository talks to the store to read or insert data

func NewReceiverRepository

func NewReceiverRepository(client *pgc.Client) *ReceiverRepository

NewReceiverRepository returns repository struct

func (ReceiverRepository) Create

func (ReceiverRepository) Delete

func (r ReceiverRepository) Delete(ctx context.Context, id uint64) error

func (ReceiverRepository) Get

func (ReceiverRepository) List

func (ReceiverRepository) Update

type RuleRepository

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

RuleRepository talks to the store to read or insert data

func NewRuleRepository

func NewRuleRepository(client *pgc.Client) *RuleRepository

NewRuleRepository returns repository struct

func (*RuleRepository) Commit

func (r *RuleRepository) Commit(ctx context.Context) error

func (*RuleRepository) List

func (r *RuleRepository) List(ctx context.Context, flt rule.Filter) ([]rule.Rule, error)

func (*RuleRepository) Rollback

func (r *RuleRepository) Rollback(ctx context.Context, err error) error

func (*RuleRepository) Upsert

func (r *RuleRepository) Upsert(ctx context.Context, rl *rule.Rule) error

func (*RuleRepository) WithTransaction

func (r *RuleRepository) WithTransaction(ctx context.Context) context.Context

type SilenceRepository added in v0.5.8

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

SilenceRepository talks to the store to read or insert data

func NewSilenceRepository added in v0.5.8

func NewSilenceRepository(client *pgc.Client) *SilenceRepository

NewSilenceRepository returns repository struct

func (*SilenceRepository) Create added in v0.5.8

func (*SilenceRepository) Get added in v0.5.8

func (*SilenceRepository) List added in v0.5.8

func (*SilenceRepository) SoftDelete added in v0.5.8

func (r *SilenceRepository) SoftDelete(ctx context.Context, id string) error

type SubscriptionRepository

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

SubscriptionRepository talks to the store to read or insert data

func NewSubscriptionRepository

func NewSubscriptionRepository(client *pgc.Client) *SubscriptionRepository

NewSubscriptionRepository returns SubscriptionRepository struct

func (*SubscriptionRepository) Create

func (*SubscriptionRepository) Delete

func (r *SubscriptionRepository) Delete(ctx context.Context, id uint64) error

func (*SubscriptionRepository) Get

func (*SubscriptionRepository) List

func (*SubscriptionRepository) Update

type TemplateRepository

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

TemplateRepository talks to the store to read or insert data

func NewTemplateRepository

func NewTemplateRepository(client *pgc.Client) *TemplateRepository

NewTemplateRepository returns repository struct

func (TemplateRepository) Delete

func (r TemplateRepository) Delete(ctx context.Context, name string) error

func (TemplateRepository) GetByName

func (r TemplateRepository) GetByName(ctx context.Context, name string) (*template.Template, error)

func (TemplateRepository) List

func (TemplateRepository) Upsert

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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