Documentation
¶
Index ¶
- type Analysis
- type AnalysisState
- type CopyUsersParams
- type CreateUserParams
- type DBTX
- type GetAnalysisParams
- type GetTenantUserAnalysisParams
- type GetTenantUserAnalysisRow
- type GetUserParams
- type ListP2PMessageIDsByChatParams
- type ListP2PMessagesByChatParams
- type Message
- type MessageInbox
- 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) DeleteAllUsers(ctx context.Context) error
- func (q *Queries) DeleteAllUsersByName(ctx context.Context, name string) (int64, error)
- func (q *Queries) GetAnalysis(ctx context.Context, arg *GetAnalysisParams) (*Analysis, error)
- func (q *Queries) GetTenantUserAnalysis(ctx context.Context, arg *GetTenantUserAnalysisParams) (*GetTenantUserAnalysisRow, error)
- func (q *Queries) GetUser(ctx context.Context, arg *GetUserParams) (*User, error)
- func (q *Queries) ListAllUsers(ctx context.Context) ([]*User, error)
- func (q *Queries) ListP2PMessageIDsByChat(ctx context.Context, arg *ListP2PMessageIDsByChatParams) ([]interface{}, error)
- func (q *Queries) ListP2PMessagesByChat(ctx context.Context, arg *ListP2PMessagesByChatParams) ([]*Message, error)
- func (q *Queries) ListUsersByIDs(ctx context.Context, ids []int64) ([]*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 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 ListP2PMessageIDsByChatParams ¶
type ListP2PMessageIDsByChatParams struct {
Limit int32
UserID int64
PeerID int64
CreatedSince pgtype.Timestamptz
LastID interface{}
}
type ListP2PMessagesByChatParams ¶
type ListP2PMessagesByChatParams struct {
Limit int32
UserID int64
PeerID int64
CreatedSince pgtype.Timestamptz
LastID interface{}
}
type Message ¶
type Message struct {
ID interface{}
UserID int64
ToUserOrGroupID int64
InGroup bool
CreatedAt pgtype.Timestamptz
DeletedAt pgtype.Timestamptz
}
type MessageInbox ¶
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: tenantKey(tenant_id)
// store: Users
CopyUsers(ctx context.Context, arg []*CopyUsersParams) (int64, error)
// kind: write
// shard: tenantKey(tenant_id)
// store: Users
CreateUser(ctx context.Context, arg *CreateUserParams) (*User, error)
// kind: write
// shard: all()
// store: Users
DeleteAllUsers(ctx context.Context) error
// kind: write
// shard: all()
// store: Users
DeleteAllUsersByName(ctx context.Context, name string) (int64, error)
// kind: read
// shard: tenantKey(tenant_id)
// store: Analyses
GetAnalysis(ctx context.Context, arg *GetAnalysisParams) (*Analysis, error)
// kind: read
// shard: tenantKey(tenant_id)
// store: Analyses
GetTenantUserAnalysis(ctx context.Context, arg *GetTenantUserAnalysisParams) (*GetTenantUserAnalysisRow, error)
// kind: read
// shard: tenantKey(tenant_id)
// store: Users
GetUser(ctx context.Context, arg *GetUserParams) (*User, error)
// kind: read
// shard: all()
// store: Users
ListAllUsers(ctx context.Context) ([]*User, error)
// kind: read
// shard: messageKey(user_id, to_user_or_group_id, in_group)
// store: QueryMessage
ListP2PMessageIDsByChat(ctx context.Context, arg *ListP2PMessageIDsByChatParams) ([]interface{}, error)
// kind: read
// shard: messageKey(user_id, to_user_or_group_id, in_group)
// store: QueryMessage
ListP2PMessagesByChat(ctx context.Context, arg *ListP2PMessagesByChatParams) ([]*Message, error)
// kind: read
// shard: tenantKey(tenant_id)
// store: Users
ListUsersByIDs(ctx context.Context, ids []int64) ([]*User, error)
// kind: write
// shard: tenantKey(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: tenantKey(tenant_id) store: Users
func (*Queries) DeleteAllUsers ¶
kind: write shard: all() store: Users
func (*Queries) DeleteAllUsersByName ¶
kind: write shard: all() store: Users
func (*Queries) GetAnalysis ¶
kind: read shard: tenantKey(tenant_id) store: Analyses
func (*Queries) GetTenantUserAnalysis ¶
func (q *Queries) GetTenantUserAnalysis(ctx context.Context, arg *GetTenantUserAnalysisParams) (*GetTenantUserAnalysisRow, error)
kind: read shard: tenantKey(tenant_id) store: Analyses
func (*Queries) ListAllUsers ¶
kind: read shard: all() store: Users
func (*Queries) ListP2PMessageIDsByChat ¶
func (q *Queries) ListP2PMessageIDsByChat(ctx context.Context, arg *ListP2PMessageIDsByChatParams) ([]interface{}, error)
kind: read shard: messageKey(user_id, to_user_or_group_id, in_group) store: QueryMessage
func (*Queries) ListP2PMessagesByChat ¶
func (q *Queries) ListP2PMessagesByChat(ctx context.Context, arg *ListP2PMessagesByChatParams) ([]*Message, error)
kind: read shard: messageKey(user_id, to_user_or_group_id, in_group) store: QueryMessage
func (*Queries) ListUsersByIDs ¶
kind: read shard: tenantKey(tenant_id) store: Users
func (*Queries) UpdateUserName ¶
kind: write shard: tenantKey(tenant_id) store: Users
type UpdateUserNameParams ¶
Click to show internal directories.
Click to hide internal directories.