Documentation
¶
Index ¶
- type Analysis
- type AnalysisState
- type CopyUsersParams
- type CreateUserParams
- type DBTX
- type GetAnalysisParams
- type GetUserParams
- type NullAnalysisState
- type Querier
- type Queries
- func (q *Queries) CopyUsers(ctx context.Context, arg []*CopyUsersParams) (int64, error)
- func (q *Queries) CreateUser(ctx context.Context, arg *CreateUserParams) (*User, error)
- func (q *Queries) GetAnalysis(ctx context.Context, arg *GetAnalysisParams) (*Analysis, error)
- func (q *Queries) GetUser(ctx context.Context, arg *GetUserParams) (*User, error)
- func (q *Queries) ListUsers(ctx context.Context) ([]*User, error)
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Analysis ¶
type Analysis struct {
ID int64
TenantID int64
Description *string
State NullAnalysisState
Source netip.Addr
ActiveWindow pgtype.Range[pgtype.Timestamptz]
}
type AnalysisState ¶
type AnalysisState string
const ( AnalysisStatePending AnalysisState = "pending" AnalysisStateComplete AnalysisState = "complete" )
func (*AnalysisState) Scan ¶
func (e *AnalysisState) Scan(src interface{}) error
type CopyUsersParams ¶
type CreateUserParams ¶
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
CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error)
}
type GetAnalysisParams ¶
type GetUserParams ¶
type NullAnalysisState ¶
type NullAnalysisState struct {
AnalysisState AnalysisState
Valid bool // Valid is true if AnalysisState is not NULL
}
func (*NullAnalysisState) Scan ¶
func (ns *NullAnalysisState) Scan(value interface{}) error
Scan implements the Scanner interface.
type Querier ¶
type Querier interface {
// kind: write
CopyUsers(ctx context.Context, arg []*CopyUsersParams) (int64, error)
// kind: write
// shard: tenant(tenant_id)
CreateUser(ctx context.Context, arg *CreateUserParams) (*User, error)
// kind: read
// shard: tenant(tenant_id)
GetAnalysis(ctx context.Context, arg *GetAnalysisParams) (*Analysis, error)
// kind: read
// shard: tenant(tenant_id)
GetUser(ctx context.Context, arg *GetUserParams) (*User, error)
// kind: read
ListUsers(ctx context.Context) ([]*User, error)
}
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) CreateUser ¶
kind: write shard: tenant(tenant_id)
func (*Queries) GetAnalysis ¶
kind: read shard: tenant(tenant_id)
Click to show internal directories.
Click to hide internal directories.