Documentation
¶
Index ¶
- type Analysis
- type AnalysisState
- type CreateUserParams
- type DBTX
- type GetAnalysisParams
- type GetUserParams
- type NullAnalysisState
- type Querier
- type Queries
- 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) UpdateUserName(ctx context.Context, arg *UpdateUserNameParams) (*User, error)
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type UpdateUserNameParams
- 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 CreateUserParams ¶
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
// shard: tenant(tenant_id)
// store: Users
CreateUser(ctx context.Context, arg *CreateUserParams) (*User, error)
// kind: read
// shard: tenant(tenant_id)
// store: Analyses
GetAnalysis(ctx context.Context, arg *GetAnalysisParams) (*Analysis, error)
// kind: read
// shard: tenant(tenant_id)
// store: Users
GetUser(ctx context.Context, arg *GetUserParams) (*User, error)
// kind: write
// shard: tenant(tenant_id)
// store: Users
UpdateUserName(ctx context.Context, arg *UpdateUserNameParams) (*User, error)
}
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) CreateUser ¶
kind: write shard: tenant(tenant_id) store: Users
func (*Queries) GetAnalysis ¶
kind: read shard: tenant(tenant_id) store: Analyses
func (*Queries) UpdateUserName ¶ added in v0.0.2
kind: write shard: tenant(tenant_id) store: Users
type UpdateUserNameParams ¶ added in v0.0.2
Click to show internal directories.
Click to hide internal directories.