sql

package
v0.405.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type ModuleConfiguration

type ModuleConfiguration struct {
	ID        int64
	CreatedAt time.Time
	Module    optional.Option[string]
	Name      string
	Value     json.RawMessage
}

type ModuleSecret

type ModuleSecret struct {
	ID        int64
	CreatedAt time.Time
	Module    optional.Option[string]
	Name      string
	Url       string
}

type Querier

type Querier interface {
	GetModuleConfiguration(ctx context.Context, module optional.Option[string], name string) (json.RawMessage, error)
	GetModuleSecretURL(ctx context.Context, module optional.Option[string], name string) (string, error)
	ListModuleConfiguration(ctx context.Context) ([]ModuleConfiguration, error)
	ListModuleSecrets(ctx context.Context) ([]ModuleSecret, error)
	SetModuleConfiguration(ctx context.Context, module optional.Option[string], name string, value json.RawMessage) error
	SetModuleSecretURL(ctx context.Context, module optional.Option[string], name string, url string) error
	UnsetModuleConfiguration(ctx context.Context, module optional.Option[string], name string) error
	UnsetModuleSecret(ctx context.Context, module optional.Option[string], name string) error
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) GetModuleConfiguration

func (q *Queries) GetModuleConfiguration(ctx context.Context, module optional.Option[string], name string) (json.RawMessage, error)

func (*Queries) GetModuleSecretURL

func (q *Queries) GetModuleSecretURL(ctx context.Context, module optional.Option[string], name string) (string, error)

func (*Queries) ListModuleConfiguration

func (q *Queries) ListModuleConfiguration(ctx context.Context) ([]ModuleConfiguration, error)

func (*Queries) ListModuleSecrets

func (q *Queries) ListModuleSecrets(ctx context.Context) ([]ModuleSecret, error)

func (*Queries) SetModuleConfiguration

func (q *Queries) SetModuleConfiguration(ctx context.Context, module optional.Option[string], name string, value json.RawMessage) error

func (*Queries) SetModuleSecretURL

func (q *Queries) SetModuleSecretURL(ctx context.Context, module optional.Option[string], name string, url string) error

func (*Queries) UnsetModuleConfiguration

func (q *Queries) UnsetModuleConfiguration(ctx context.Context, module optional.Option[string], name string) error

func (*Queries) UnsetModuleSecret

func (q *Queries) UnsetModuleSecret(ctx context.Context, module optional.Option[string], name string) error

func (*Queries) WithTx

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

type Type

type Type = sqltypes.Type

Jump to

Keyboard shortcuts

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