reconcilersql

package
v0.0.0-...-f3a14d9 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigureParams

type ConfigureParams struct {
	Value          string
	ReconcilerName string
	Key            string
}

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type GetConfigParams

type GetConfigParams struct {
	IncludeSecret  bool
	ReconcilerName string
}

type GetConfigRow

type GetConfigRow struct {
	Reconciler  string
	Key         string
	DisplayName string
	Description string
	Configured  bool
	Value       *string
	Secret      bool
}

type ListParams

type ListParams struct {
	Offset int32
	Limit  int32
}

type ListReconcilerErrorsParams

type ListReconcilerErrorsParams struct {
	Reconciler string
	Offset     int32
	Limit      int32
}

type Querier

type Querier interface {
	Configure(ctx context.Context, arg ConfigureParams) error
	Count(ctx context.Context) (int64, error)
	Disable(ctx context.Context, name string) (*Reconciler, error)
	Enable(ctx context.Context, name string) (*Reconciler, error)
	Get(ctx context.Context, name string) (*Reconciler, error)
	GetConfig(ctx context.Context, arg GetConfigParams) ([]*GetConfigRow, error)
	GetReconcilerErrorByID(ctx context.Context, id uuid.UUID) (*ReconcilerError, error)
	List(ctx context.Context, arg ListParams) ([]*Reconciler, error)
	ListByNames(ctx context.Context, names []string) ([]*Reconciler, error)
	ListEnabledReconcilers(ctx context.Context) ([]*Reconciler, error)
	ListReconcilerErrors(ctx context.Context, arg ListReconcilerErrorsParams) ([]*ReconcilerError, error)
	ListReconcilerErrorsCount(ctx context.Context, reconciler string) (int64, error)
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) Configure

func (q *Queries) Configure(ctx context.Context, arg ConfigureParams) error

func (*Queries) Count

func (q *Queries) Count(ctx context.Context) (int64, error)

func (*Queries) Disable

func (q *Queries) Disable(ctx context.Context, name string) (*Reconciler, error)

func (*Queries) Enable

func (q *Queries) Enable(ctx context.Context, name string) (*Reconciler, error)

func (*Queries) Get

func (q *Queries) Get(ctx context.Context, name string) (*Reconciler, error)

func (*Queries) GetConfig

func (q *Queries) GetConfig(ctx context.Context, arg GetConfigParams) ([]*GetConfigRow, error)

func (*Queries) GetReconcilerErrorByID

func (q *Queries) GetReconcilerErrorByID(ctx context.Context, id uuid.UUID) (*ReconcilerError, error)

func (*Queries) List

func (q *Queries) List(ctx context.Context, arg ListParams) ([]*Reconciler, error)

func (*Queries) ListByNames

func (q *Queries) ListByNames(ctx context.Context, names []string) ([]*Reconciler, error)

func (*Queries) ListEnabledReconcilers

func (q *Queries) ListEnabledReconcilers(ctx context.Context) ([]*Reconciler, error)

func (*Queries) ListReconcilerErrors

func (q *Queries) ListReconcilerErrors(ctx context.Context, arg ListReconcilerErrorsParams) ([]*ReconcilerError, error)

func (*Queries) ListReconcilerErrorsCount

func (q *Queries) ListReconcilerErrorsCount(ctx context.Context, reconciler string) (int64, error)

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

type Reconciler

type Reconciler struct {
	Name        string
	DisplayName string
	Description string
	Enabled     bool
	MemberAware bool
}

type ReconcilerError

type ReconcilerError struct {
	ID            uuid.UUID
	CorrelationID uuid.UUID
	Reconciler    string
	CreatedAt     pgtype.Timestamptz
	ErrorMessage  string
	TeamSlug      slug.Slug
}

Jump to

Keyboard shortcuts

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