issuesql

package
v0.0.0-...-aa7570c Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: MIT Imports: 7 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 {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type GetSeverityScoreForWorkloadParams

type GetSeverityScoreForWorkloadParams struct {
	ResourceName string
	ResourceType string
	Env          string
	Team         string
}

type Issue

type Issue struct {
	ID           uuid.UUID
	IssueType    string
	ResourceName string
	ResourceType string
	Team         string
	Env          string
	Severity     SeverityLevel
	Message      string
	IssueDetails []byte
	CreatedAt    pgtype.Timestamptz
}

type ListIssuesParams

type ListIssuesParams struct {
	Team         string
	Env          []string
	IssueType    *string
	Severity     *SeverityLevel
	ResourceType *string
	ResourceName *string
	OrderBy      string
	Offset       int32
	Limit        int32
}

type ListIssuesRow

type ListIssuesRow struct {
	ID           uuid.UUID
	IssueType    string
	ResourceName string
	ResourceType string
	Team         string
	Env          string
	Severity     SeverityLevel
	Message      string
	IssueDetails []byte
	CreatedAt    pgtype.Timestamptz
	TotalCount   int64
}

type NullSeverityLevel

type NullSeverityLevel struct {
	SeverityLevel SeverityLevel
	Valid         bool // Valid is true if SeverityLevel is not NULL
}

func (*NullSeverityLevel) Scan

func (ns *NullSeverityLevel) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullSeverityLevel) Value

func (ns NullSeverityLevel) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type Querier

type Querier interface {
	GetIssueByID(ctx context.Context, id uuid.UUID) (*Issue, error)
	GetSeverityScoreForWorkload(ctx context.Context, arg GetSeverityScoreForWorkloadParams) (int64, error)
	ListIssues(ctx context.Context, arg ListIssuesParams) ([]*ListIssuesRow, error)
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) GetIssueByID

func (q *Queries) GetIssueByID(ctx context.Context, id uuid.UUID) (*Issue, error)

func (*Queries) GetSeverityScoreForWorkload

func (q *Queries) GetSeverityScoreForWorkload(ctx context.Context, arg GetSeverityScoreForWorkloadParams) (int64, error)

func (*Queries) ListIssues

func (q *Queries) ListIssues(ctx context.Context, arg ListIssuesParams) ([]*ListIssuesRow, error)

func (*Queries) WithTx

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

type SeverityLevel

type SeverityLevel string
const (
	SeverityLevelTODO     SeverityLevel = "TODO"
	SeverityLevelWARNING  SeverityLevel = "WARNING"
	SeverityLevelCRITICAL SeverityLevel = "CRITICAL"
)

func AllSeverityLevelValues

func AllSeverityLevelValues() []SeverityLevel

func (*SeverityLevel) Scan

func (e *SeverityLevel) Scan(src interface{}) error

func (SeverityLevel) Valid

func (e SeverityLevel) Valid() bool

Jump to

Keyboard shortcuts

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