store

package
v0.0.0-...-123baa4 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateOrgParams

type CreateOrgParams struct {
	Name   string `json:"name"`
	ApiKey string `json:"api_key"`
}

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 Org

type Org struct {
	ID     uuid.UUID `json:"id"`
	Name   string    `json:"name"`
	ApiKey string    `json:"api_key"`
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CreateOrg

func (q *Queries) CreateOrg(ctx context.Context, arg CreateOrgParams) (Org, error)

func (*Queries) GetOrgByAPIKey

func (q *Queries) GetOrgByAPIKey(ctx context.Context, apiKey string) (Org, error)

func (*Queries) ResetOrgAPIKey

func (q *Queries) ResetOrgAPIKey(ctx context.Context, arg ResetOrgAPIKeyParams) (Org, error)

func (*Queries) WithTx

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

type ResetOrgAPIKeyParams

type ResetOrgAPIKeyParams struct {
	ApiKey string    `json:"api_key"`
	ID     uuid.UUID `json:"id"`
}

Jump to

Keyboard shortcuts

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