gensql

package
v0.0.0-...-1333f46 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChartDeleteParams

type ChartDeleteParams struct {
	TeamID    string
	ChartType ChartType
}

type ChartGlobalValue

type ChartGlobalValue struct {
	ID        uuid.UUID
	Created   sql.NullTime
	Key       string
	Value     string
	ChartType ChartType
	Encrypted bool
}

type ChartTeamValue

type ChartTeamValue struct {
	ID        uuid.UUID
	Created   sql.NullTime
	Key       string
	Value     string
	ChartType ChartType
	TeamID    string
}

type ChartType

type ChartType string
const (
	ChartTypeJupyterhub ChartType = "jupyterhub"
	ChartTypeAirflow    ChartType = "airflow"
)

func (*ChartType) Scan

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

type ComputeInstance

type ComputeInstance struct {
	Owner    string
	Name     string
	DiskSize int32
}

type ComputeInstanceCreateParams

type ComputeInstanceCreateParams struct {
	Owner    string
	Name     string
	DiskSize int32
}

type ComputeInstanceUpdateParams

type ComputeInstanceUpdateParams struct {
	DiskSize int32
	Owner    string
}

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 Event

type Event struct {
	ID         uuid.UUID
	Type       string
	Payload    json.RawMessage
	Status     string
	Deadline   string
	CreatedAt  time.Time
	UpdatedAt  time.Time
	Owner      string
	RetryCount int32
}

type EventCreateParams

type EventCreateParams struct {
	Owner    string
	Type     string
	Payload  json.RawMessage
	Deadline string
}

type EventLog

type EventLog struct {
	ID        uuid.UUID
	EventID   uuid.UUID
	LogType   string
	Message   string
	CreatedAt time.Time
}

type EventLogCreateParams

type EventLogCreateParams struct {
	EventID uuid.UUID
	LogType string
	Message string
}

type EventSetStatusParams

type EventSetStatusParams struct {
	Status string
	ID     uuid.UUID
}

type EventsByOwnerGetParams

type EventsByOwnerGetParams struct {
	Owner string
	Lim   sql.NullInt32
}

type GlobalValueDeleteParams

type GlobalValueDeleteParams struct {
	Key       string
	ChartType ChartType
}

type GlobalValueGetParams

type GlobalValueGetParams struct {
	ChartType ChartType
	Key       string
}

type GlobalValueInsertParams

type GlobalValueInsertParams struct {
	Key       string
	Value     string
	ChartType ChartType
	Encrypted bool
}

type NullChartType

type NullChartType struct {
	ChartType ChartType
	Valid     bool // Valid is true if ChartType is not NULL
}

func (*NullChartType) Scan

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

Scan implements the Scanner interface.

func (NullChartType) Value

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

Value implements the driver Valuer interface.

type Querier

type Querier interface {
	ChartDelete(ctx context.Context, arg ChartDeleteParams) error
	ChartsForTeamGet(ctx context.Context, teamID string) ([]ChartType, error)
	ComputeInstanceCreate(ctx context.Context, arg ComputeInstanceCreateParams) error
	ComputeInstanceDelete(ctx context.Context, owner string) error
	ComputeInstanceGet(ctx context.Context, owner string) (ComputeInstance, error)
	ComputeInstanceUpdate(ctx context.Context, arg ComputeInstanceUpdateParams) error
	ComputeInstancesGet(ctx context.Context) ([]ComputeInstance, error)
	EventCreate(ctx context.Context, arg EventCreateParams) error
	EventGet(ctx context.Context, id uuid.UUID) (Event, error)
	EventIncrementRetryCount(ctx context.Context, id uuid.UUID) error
	EventLogCreate(ctx context.Context, arg EventLogCreateParams) error
	EventLogsForEventGet(ctx context.Context, id uuid.UUID) ([]EventLog, error)
	EventSetStatus(ctx context.Context, arg EventSetStatusParams) error
	EventsByOwnerGet(ctx context.Context, arg EventsByOwnerGetParams) ([]Event, error)
	EventsGetType(ctx context.Context, eventType string) ([]Event, error)
	EventsProcessingGet(ctx context.Context) ([]Event, error)
	EventsReset(ctx context.Context) error
	EventsUpcomingGet(ctx context.Context) ([]Event, error)
	GlobalValueDelete(ctx context.Context, arg GlobalValueDeleteParams) error
	GlobalValueGet(ctx context.Context, arg GlobalValueGetParams) (ChartGlobalValue, error)
	GlobalValueInsert(ctx context.Context, arg GlobalValueInsertParams) error
	GlobalValuesGet(ctx context.Context, chartType ChartType) ([]ChartGlobalValue, error)
	SessionCreate(ctx context.Context, arg SessionCreateParams) error
	SessionDelete(ctx context.Context, token string) error
	SessionGet(ctx context.Context, token string) (Session, error)
	TeamBySlugGet(ctx context.Context, slug string) (TeamBySlugGetRow, error)
	TeamCreate(ctx context.Context, arg TeamCreateParams) error
	TeamDelete(ctx context.Context, id string) error
	TeamGet(ctx context.Context, id string) (TeamGetRow, error)
	TeamUpdate(ctx context.Context, arg TeamUpdateParams) error
	TeamValueDelete(ctx context.Context, arg TeamValueDeleteParams) error
	TeamValueGet(ctx context.Context, arg TeamValueGetParams) (ChartTeamValue, error)
	TeamValueInsert(ctx context.Context, arg TeamValueInsertParams) error
	TeamValuesGet(ctx context.Context, arg TeamValuesGetParams) ([]ChartTeamValue, error)
	TeamsForChartGet(ctx context.Context, chartType ChartType) ([]string, error)
	TeamsForUserGet(ctx context.Context, email string) ([]TeamsForUserGetRow, error)
	TeamsGet(ctx context.Context) ([]Team, error)
	UserGoogleSecretManagerCreate(ctx context.Context, arg UserGoogleSecretManagerCreateParams) error
	UserGoogleSecretManagerDelete(ctx context.Context, owner string) error
	UserGoogleSecretManagerGet(ctx context.Context, owner string) (UserGoogleSecretManager, error)
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) ChartDelete

func (q *Queries) ChartDelete(ctx context.Context, arg ChartDeleteParams) error

func (*Queries) ChartsForTeamGet

func (q *Queries) ChartsForTeamGet(ctx context.Context, teamID string) ([]ChartType, error)

func (*Queries) ComputeInstanceCreate

func (q *Queries) ComputeInstanceCreate(ctx context.Context, arg ComputeInstanceCreateParams) error

func (*Queries) ComputeInstanceDelete

func (q *Queries) ComputeInstanceDelete(ctx context.Context, owner string) error

func (*Queries) ComputeInstanceGet

func (q *Queries) ComputeInstanceGet(ctx context.Context, owner string) (ComputeInstance, error)

func (*Queries) ComputeInstanceUpdate

func (q *Queries) ComputeInstanceUpdate(ctx context.Context, arg ComputeInstanceUpdateParams) error

func (*Queries) ComputeInstancesGet

func (q *Queries) ComputeInstancesGet(ctx context.Context) ([]ComputeInstance, error)

func (*Queries) EventCreate

func (q *Queries) EventCreate(ctx context.Context, arg EventCreateParams) error

func (*Queries) EventGet

func (q *Queries) EventGet(ctx context.Context, id uuid.UUID) (Event, error)

func (*Queries) EventIncrementRetryCount

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

func (*Queries) EventLogCreate

func (q *Queries) EventLogCreate(ctx context.Context, arg EventLogCreateParams) error

func (*Queries) EventLogsForEventGet

func (q *Queries) EventLogsForEventGet(ctx context.Context, id uuid.UUID) ([]EventLog, error)

func (*Queries) EventSetStatus

func (q *Queries) EventSetStatus(ctx context.Context, arg EventSetStatusParams) error

func (*Queries) EventsByOwnerGet

func (q *Queries) EventsByOwnerGet(ctx context.Context, arg EventsByOwnerGetParams) ([]Event, error)

func (*Queries) EventsGetType

func (q *Queries) EventsGetType(ctx context.Context, eventType string) ([]Event, error)

func (*Queries) EventsProcessingGet

func (q *Queries) EventsProcessingGet(ctx context.Context) ([]Event, error)

func (*Queries) EventsReset

func (q *Queries) EventsReset(ctx context.Context) error

func (*Queries) EventsUpcomingGet

func (q *Queries) EventsUpcomingGet(ctx context.Context) ([]Event, error)

func (*Queries) GlobalValueDelete

func (q *Queries) GlobalValueDelete(ctx context.Context, arg GlobalValueDeleteParams) error

func (*Queries) GlobalValueGet

func (q *Queries) GlobalValueGet(ctx context.Context, arg GlobalValueGetParams) (ChartGlobalValue, error)

func (*Queries) GlobalValueInsert

func (q *Queries) GlobalValueInsert(ctx context.Context, arg GlobalValueInsertParams) error

func (*Queries) GlobalValuesGet

func (q *Queries) GlobalValuesGet(ctx context.Context, chartType ChartType) ([]ChartGlobalValue, error)

func (*Queries) SessionCreate

func (q *Queries) SessionCreate(ctx context.Context, arg SessionCreateParams) error

func (*Queries) SessionDelete

func (q *Queries) SessionDelete(ctx context.Context, token string) error

func (*Queries) SessionGet

func (q *Queries) SessionGet(ctx context.Context, token string) (Session, error)

func (*Queries) TeamBySlugGet

func (q *Queries) TeamBySlugGet(ctx context.Context, slug string) (TeamBySlugGetRow, error)

func (*Queries) TeamCreate

func (q *Queries) TeamCreate(ctx context.Context, arg TeamCreateParams) error

func (*Queries) TeamDelete

func (q *Queries) TeamDelete(ctx context.Context, id string) error

func (*Queries) TeamGet

func (q *Queries) TeamGet(ctx context.Context, id string) (TeamGetRow, error)

func (*Queries) TeamUpdate

func (q *Queries) TeamUpdate(ctx context.Context, arg TeamUpdateParams) error

func (*Queries) TeamValueDelete

func (q *Queries) TeamValueDelete(ctx context.Context, arg TeamValueDeleteParams) error

func (*Queries) TeamValueGet

func (q *Queries) TeamValueGet(ctx context.Context, arg TeamValueGetParams) (ChartTeamValue, error)

func (*Queries) TeamValueInsert

func (q *Queries) TeamValueInsert(ctx context.Context, arg TeamValueInsertParams) error

func (*Queries) TeamValuesGet

func (q *Queries) TeamValuesGet(ctx context.Context, arg TeamValuesGetParams) ([]ChartTeamValue, error)

func (*Queries) TeamsForChartGet

func (q *Queries) TeamsForChartGet(ctx context.Context, chartType ChartType) ([]string, error)

func (*Queries) TeamsForUserGet

func (q *Queries) TeamsForUserGet(ctx context.Context, email string) ([]TeamsForUserGetRow, error)

func (*Queries) TeamsGet

func (q *Queries) TeamsGet(ctx context.Context) ([]Team, error)

func (*Queries) UserGoogleSecretManagerCreate

func (q *Queries) UserGoogleSecretManagerCreate(ctx context.Context, arg UserGoogleSecretManagerCreateParams) error

func (*Queries) UserGoogleSecretManagerDelete

func (q *Queries) UserGoogleSecretManagerDelete(ctx context.Context, owner string) error

func (*Queries) UserGoogleSecretManagerGet

func (q *Queries) UserGoogleSecretManagerGet(ctx context.Context, owner string) (UserGoogleSecretManager, error)

func (*Queries) WithTx

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

type Session

type Session struct {
	Token       string
	AccessToken string
	Email       string
	Name        string
	Created     time.Time
	Expires     time.Time
	IsAdmin     bool
}

type SessionCreateParams

type SessionCreateParams struct {
	Name        string
	Email       string
	Token       string
	AccessToken string
	Expires     time.Time
	IsAdmin     bool
}

type Team

type Team struct {
	ID      string
	Slug    string
	Users   []string
	Created sql.NullTime
}

type TeamBySlugGetRow

type TeamBySlugGetRow struct {
	ID    string
	Users []string
	Slug  string
}

type TeamCreateParams

type TeamCreateParams struct {
	ID    string
	Users []string
	Slug  string
}

type TeamGetRow

type TeamGetRow struct {
	ID    string
	Users []string
	Slug  string
}

type TeamUpdateParams

type TeamUpdateParams struct {
	Users []string
	ID    string
}

type TeamValueDeleteParams

type TeamValueDeleteParams struct {
	Key    string
	TeamID string
}

type TeamValueGetParams

type TeamValueGetParams struct {
	Key    string
	TeamID string
}

type TeamValueInsertParams

type TeamValueInsertParams struct {
	Key       string
	Value     string
	TeamID    string
	ChartType ChartType
}

type TeamValuesGetParams

type TeamValuesGetParams struct {
	ChartType ChartType
	TeamID    string
}

type TeamsForUserGetRow

type TeamsForUserGetRow struct {
	ID   string
	Slug string
}

type UserGoogleSecretManager

type UserGoogleSecretManager struct {
	Owner string
	Name  string
}

type UserGoogleSecretManagerCreateParams

type UserGoogleSecretManagerCreateParams struct {
	Owner string
	Name  string
}

Jump to

Keyboard shortcuts

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