query

package
v0.0.0-...-37f5ccb Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateDeploymentEventParams

type CreateDeploymentEventParams struct {
	UserID       uuid.NullUUID  `json:"user_id"`
	DeploymentID uuid.NullUUID  `json:"deployment_id"`
	EventType    sql.NullString `json:"event_type"`
	Message      sql.NullString `json:"message"`
}

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 DeploymentEvent

type DeploymentEvent struct {
	ID           uuid.UUID      `json:"id"`
	CreatedAt    sql.NullTime   `json:"created_at"`
	UserID       uuid.NullUUID  `json:"user_id"`
	DeploymentID uuid.NullUUID  `json:"deployment_id"`
	Message      sql.NullString `json:"message"`
	EventType    sql.NullString `json:"event_type"`
}

type ListDeploymentEventsParams

type ListDeploymentEventsParams struct {
	UserID       uuid.NullUUID `json:"user_id"`
	DeploymentID uuid.NullUUID `json:"deployment_id"`
}

type Querier

type Querier interface {
	CreateDeploymentEvent(ctx context.Context, arg CreateDeploymentEventParams) (DeploymentEvent, error)
	ListDeploymentEvents(ctx context.Context, arg ListDeploymentEventsParams) ([]DeploymentEvent, error)
	ListUserEvents(ctx context.Context, userID uuid.NullUUID) ([]DeploymentEvent, error)
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CreateDeploymentEvent

func (q *Queries) CreateDeploymentEvent(ctx context.Context, arg CreateDeploymentEventParams) (DeploymentEvent, error)

func (*Queries) ListDeploymentEvents

func (q *Queries) ListDeploymentEvents(ctx context.Context, arg ListDeploymentEventsParams) ([]DeploymentEvent, error)

func (*Queries) ListUserEvents

func (q *Queries) ListUserEvents(ctx context.Context, userID uuid.NullUUID) ([]DeploymentEvent, error)

func (*Queries) WithTx

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

Jump to

Keyboard shortcuts

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