Documentation
¶
Overview ¶
Package models contains the database models
Index ¶
- type Acl
- type Adminlog
- type Ban
- type Channel
- type Channellog
- type Complaint
- type ComplaintType
- type ComplaintsReference
- type ComplaintsThread
- type Count
- type CreatePendingUserParams
- type CreateUserParams
- type DBTX
- type DefaultMsg
- type DeletionTransaction
- type Domain
- type FraudList
- type FraudListDatum
- type GetUserByIDRow
- type GetUserChannelsRow
- type Gline
- type Help
- type IpRestrict
- type Language
- type Lastrequest
- type Level
- type Lock
- type Noreg
- type Note
- type Notice
- type Objection
- type Pending
- type PendingChanfixScore
- type PendingEmailchange
- type PendingMgrchange
- type PendingPasswordchange
- type PendingPwreset
- type PendingTraffic
- type Pendinguser
- type Querier
- type Queries
- func (q *Queries) CreatePendingUser(ctx context.Context, arg CreatePendingUserParams) (*string, error)
- func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (User, error)
- func (q *Queries) DeletePendingUserByCookie(ctx context.Context, cookie *string) error
- func (q *Queries) GetGlineByIP(ctx context.Context, host string) (Gline, error)
- func (q *Queries) GetUserByEmail(ctx context.Context, email *string) (User, error)
- func (q *Queries) GetUserByID(ctx context.Context, id int32) (GetUserByIDRow, error)
- func (q *Queries) GetUserByUsername(ctx context.Context, userName string) (User, error)
- func (q *Queries) GetUserChannels(ctx context.Context, userID int32) ([]GetUserChannelsRow, error)
- func (q *Queries) GetWhiteListByIP(ctx context.Context, ip pgtype.Inet) (Whitelist, error)
- func (q *Queries) ListPendingUsers(ctx context.Context) ([]Pendinguser, error)
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type Service
- func (s *Service) CreatePendingUser(ctx context.Context, arg CreatePendingUserParams) (*string, error)
- func (s *Service) CreateUser(ctx context.Context, arg CreateUserParams) (User, error)
- func (s *Service) DeletePendingUserByCookie(ctx context.Context, cookie *string) error
- func (s *Service) GetGlineByIP(ctx context.Context, ip string) (Gline, error)
- func (s *Service) GetUserByEmail(ctx context.Context, email *string) (User, error)
- func (s *Service) GetUserByID(ctx context.Context, id int32) (GetUserByIDRow, error)
- func (s *Service) GetUserByUsername(ctx context.Context, username string) (User, error)
- func (s *Service) GetUserChannels(ctx context.Context, userID int32) ([]GetUserChannelsRow, error)
- func (s *Service) GetWhiteListByIP(ctx context.Context, ip pgtype.Inet) (Whitelist, error)
- func (s *Service) ListPendingUsers(ctx context.Context) ([]Pendinguser, error)
- type Statistic
- type Supporter
- type Timezone
- type Translation
- type User
- type UserSecHistory
- type Userlog
- type UsersLastseen
- type Variable
- type Webnotice
- type Whitelist
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Acl ¶
type Acl struct {
AclID *int32 `json:"acl_id"`
UserID int32 `json:"user_id"`
Isstaff int16 `json:"isstaff"`
Flags flags.ACL `json:"flags"`
Xtra int32 `json:"xtra"`
LastUpdated int32 `json:"last_updated"`
LastUpdatedBy int32 `json:"last_updated_by"`
SuspendExpire int32 `json:"suspend_expire"`
SuspendBy int32 `json:"suspend_by"`
Deleted int16 `json:"deleted"`
}
type Ban ¶
type Ban struct {
ID *int32 `json:"id"`
ChannelID int32 `json:"channel_id"`
Banmask string `json:"banmask"`
SetBy *string `json:"set_by"`
SetTs *int32 `json:"set_ts"`
Level *int16 `json:"level"`
Expires *int32 `json:"expires"`
Reason *string `json:"reason"`
LastUpdated int32 `json:"last_updated"`
Deleted *int16 `json:"deleted"`
}
type Channel ¶
type Channel struct {
ID int32 `json:"id"`
Name string `json:"name"`
Flags int32 `json:"flags"`
MassDeopPro int16 `json:"mass_deop_pro"`
FloodPro int32 `json:"flood_pro"`
Url *string `json:"url"`
Description *string `json:"description"`
Comment *string `json:"comment"`
Keywords *string `json:"keywords"`
RegisteredTs *int32 `json:"registered_ts"`
ChannelTs int32 `json:"channel_ts"`
ChannelMode *string `json:"channel_mode"`
Userflags *int16 `json:"userflags"`
LimitOffset *int32 `json:"limit_offset"`
LimitPeriod *int32 `json:"limit_period"`
LimitGrace *int32 `json:"limit_grace"`
LimitMax *int32 `json:"limit_max"`
NoTake *int32 `json:"no_take"`
LastUpdated int32 `json:"last_updated"`
Deleted *int16 `json:"deleted"`
MaxBans *int32 `json:"max_bans"`
Welcome *string `json:"welcome"`
}
type Channellog ¶
type Complaint ¶
type Complaint struct {
ID int32 `json:"id"`
FromID int32 `json:"from_id"`
FromEmail string `json:"from_email"`
InrecEmail string `json:"inrec_email"`
ComplaintType int32 `json:"complaint_type"`
ComplaintText string `json:"complaint_text"`
ComplaintLogs string `json:"complaint_logs"`
ComplaintChannel1ID int32 `json:"complaint_channel1_id"`
ComplaintChannel1Name string `json:"complaint_channel1_name"`
ComplaintChannel2ID int32 `json:"complaint_channel2_id"`
ComplaintChannel2Name string `json:"complaint_channel2_name"`
ComplaintUsersID int32 `json:"complaint_users_id"`
Status int32 `json:"status"`
Nicelevel int32 `json:"nicelevel"`
ReviewedByID int32 `json:"reviewed_by_id"`
ReviewedTs int32 `json:"reviewed_ts"`
CreatedTs int32 `json:"created_ts"`
CreatedIp string `json:"created_ip"`
CreatedCrc string `json:"created_crc"`
CrcExpiration int32 `json:"crc_expiration"`
TicketNumber string `json:"ticket_number"`
CurrentOwner int32 `json:"current_owner"`
}
type ComplaintType ¶
type ComplaintsReference ¶
type ComplaintsThread ¶
type CreatePendingUserParams ¶
type CreatePendingUserParams struct {
UserName *string `json:"user_name"`
Cookie *string `json:"cookie"`
Expire *int32 `json:"expire"`
Email *string `json:"email"`
Language int32 `json:"language"`
QuestionID *int16 `json:"question_id"`
Verificationdata *string `json:"verificationdata"`
PosterIp *string `json:"poster_ip"`
}
type CreateUserParams ¶
type CreateUserParams struct {
UserName string `json:"user_name"`
Password string `json:"password"`
Flags flags.User `json:"flags"`
Email *string `json:"email"`
LastUpdated int32 `json:"last_updated"`
LastUpdatedBy *string `json:"last_updated_by"`
LanguageID *int32 `json:"language_id"`
QuestionID *int16 `json:"question_id"`
Verificationdata *string `json:"verificationdata"`
PostForms int32 `json:"post_forms"`
SignupTs *int32 `json:"signup_ts"`
SignupIp *string `json:"signup_ip"`
Maxlogins *int32 `json:"maxlogins"`
}
type DefaultMsg ¶
type DeletionTransaction ¶
type FraudListDatum ¶
type GetUserByIDRow ¶
type GetUserByIDRow struct {
ID int32 `json:"id"`
UserName string `json:"user_name"`
Password string `json:"password"`
Email *string `json:"email"`
Url *string `json:"url"`
QuestionID *int16 `json:"question_id"`
Verificationdata *string `json:"verificationdata"`
LanguageID *int32 `json:"language_id"`
PublicKey *string `json:"public_key"`
PostForms int32 `json:"post_forms"`
Flags flags.User `json:"flags"`
LastUpdatedBy *string `json:"last_updated_by"`
LastUpdated int32 `json:"last_updated"`
Deleted *int16 `json:"deleted"`
TzSetting *string `json:"tz_setting"`
SignupCookie *string `json:"signup_cookie"`
SignupTs *int32 `json:"signup_ts"`
SignupIp *string `json:"signup_ip"`
Maxlogins *int32 `json:"maxlogins"`
TotpKey *string `json:"totp_key"`
LastSeen *int32 `json:"last_seen"`
LanguageCode *string `json:"language_code"`
LanguageName *string `json:"language_name"`
}
type GetUserChannelsRow ¶
type GetUserChannelsRow struct {
Name string `json:"name"`
ChannelID int32 `json:"channel_id"`
UserID int32 `json:"user_id"`
Access int32 `json:"access"`
Flags int16 `json:"flags"`
LastModif *int32 `json:"last_modif"`
SuspendExpires *int32 `json:"suspend_expires"`
SuspendBy *string `json:"suspend_by"`
}
type IpRestrict ¶
type IpRestrict struct {
ID *int32 `json:"id"`
UserID int32 `json:"user_id"`
Added int32 `json:"added"`
AddedBy int32 `json:"added_by"`
Type int32 `json:"type"`
Value pgtype.Inet `json:"value"`
LastUpdated int32 `json:"last_updated"`
LastUsed int32 `json:"last_used"`
Expiry int32 `json:"expiry"`
Description *string `json:"description"`
}
type Lastrequest ¶
type Level ¶
type Level struct {
ChannelID int32 `json:"channel_id"`
UserID int32 `json:"user_id"`
Access int32 `json:"access"`
Flags int16 `json:"flags"`
SuspendExpires *int32 `json:"suspend_expires"`
SuspendLevel *int32 `json:"suspend_level"`
SuspendBy *string `json:"suspend_by"`
SuspendReason *string `json:"suspend_reason"`
Added *int32 `json:"added"`
AddedBy *string `json:"added_by"`
LastModif *int32 `json:"last_modif"`
LastModifBy *string `json:"last_modif_by"`
LastUpdated int32 `json:"last_updated"`
Deleted *int16 `json:"deleted"`
}
type Noreg ¶
type Noreg struct {
ID *int32 `json:"id"`
UserName *string `json:"user_name"`
Email *string `json:"email"`
ChannelName *string `json:"channel_name"`
Type int32 `json:"type"`
NeverReg int32 `json:"never_reg"`
ForReview int32 `json:"for_review"`
ExpireTime *int32 `json:"expire_time"`
CreatedTs *int32 `json:"created_ts"`
SetBy *string `json:"set_by"`
Reason *string `json:"reason"`
}
type Pending ¶
type Pending struct {
ChannelID int32 `json:"channel_id"`
ManagerID *int32 `json:"manager_id"`
CreatedTs int32 `json:"created_ts"`
CheckStartTs int32 `json:"check_start_ts"`
Status *int32 `json:"status"`
JoinCount *int32 `json:"join_count"`
UniqueJoinCount *int32 `json:"unique_join_count"`
DecisionTs *int32 `json:"decision_ts"`
Decision *string `json:"decision"`
Managername *string `json:"managername"`
RegAcknowledged *string `json:"reg_acknowledged"`
Comments *string `json:"comments"`
LastUpdated int32 `json:"last_updated"`
Description *string `json:"description"`
Reviewed string `json:"reviewed"`
FirstInit string `json:"first_init"`
ReviewedByID *int32 `json:"reviewed_by_id"`
}
type PendingChanfixScore ¶
type PendingChanfixScore struct {
ChannelID *int32 `json:"channel_id"`
UserID string `json:"user_id"`
Rank int32 `json:"rank"`
Score int32 `json:"score"`
Account string `json:"account"`
FirstOpped *string `json:"first_opped"`
LastOpped *string `json:"last_opped"`
LastUpdated int32 `json:"last_updated"`
First string `json:"first"`
}
type PendingEmailchange ¶
type PendingMgrchange ¶
type PendingMgrchange struct {
ID *int32 `json:"id"`
ChannelID int32 `json:"channel_id"`
ManagerID int32 `json:"manager_id"`
NewManagerID int32 `json:"new_manager_id"`
ChangeType *int16 `json:"change_type"`
OptDuration *int32 `json:"opt_duration"`
Reason *string `json:"reason"`
Expiration *int32 `json:"expiration"`
Crc *string `json:"crc"`
Confirmed *int16 `json:"confirmed"`
FromHost *string `json:"from_host"`
}
type PendingPasswordchange ¶
type PendingPwreset ¶
type PendingTraffic ¶
type Pendinguser ¶
type Pendinguser struct {
UserName *string `json:"user_name"`
Cookie *string `json:"cookie"`
Email *string `json:"email"`
Expire *int32 `json:"expire"`
QuestionID *int16 `json:"question_id"`
Verificationdata *string `json:"verificationdata"`
PosterIp *string `json:"poster_ip"`
Language int32 `json:"language"`
}
type Querier ¶
type Querier interface {
CreatePendingUser(ctx context.Context, arg CreatePendingUserParams) (*string, error)
CreateUser(ctx context.Context, arg CreateUserParams) (User, error)
DeletePendingUserByCookie(ctx context.Context, cookie *string) error
GetGlineByIP(ctx context.Context, host string) (Gline, error)
GetUserByEmail(ctx context.Context, email *string) (User, error)
GetUserByID(ctx context.Context, id int32) (GetUserByIDRow, error)
GetUserByUsername(ctx context.Context, userName string) (User, error)
GetUserChannels(ctx context.Context, userID int32) ([]GetUserChannelsRow, error)
GetWhiteListByIP(ctx context.Context, ip pgtype.Inet) (Whitelist, error)
ListPendingUsers(ctx context.Context) ([]Pendinguser, error)
}
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) CreatePendingUser ¶
func (*Queries) CreateUser ¶
func (*Queries) DeletePendingUserByCookie ¶
func (*Queries) GetGlineByIP ¶ added in v0.0.3
func (*Queries) GetUserByEmail ¶
func (*Queries) GetUserByID ¶
func (*Queries) GetUserByUsername ¶
func (*Queries) GetUserChannels ¶
func (*Queries) GetWhiteListByIP ¶ added in v0.0.3
func (*Queries) ListPendingUsers ¶
func (q *Queries) ListPendingUsers(ctx context.Context) ([]Pendinguser, error)
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is a wrapper around the database queries
func (*Service) CreatePendingUser ¶
func (s *Service) CreatePendingUser(ctx context.Context, arg CreatePendingUserParams) (*string, error)
CreatePendingUser creates a new pending user
func (*Service) CreateUser ¶
CreateUser creates a new user
func (*Service) DeletePendingUserByCookie ¶
DeletePendingUserByCookie deletes a pending user by cookie
func (*Service) GetGlineByIP ¶ added in v0.0.3
GetGlineByIP returns a gline entry by IP if it exists
func (*Service) GetUserByEmail ¶
GetUserByEmail gets a user by email
func (*Service) GetUserByID ¶
GetUserByID gets a user by ID
func (*Service) GetUserByUsername ¶
GetUserByUsername gets a user by username
func (*Service) GetUserChannels ¶
GetUserChannels gets a user's channels
func (*Service) GetWhiteListByIP ¶ added in v0.0.3
GetWhiteListByIP returns a whitelist entry by IP if it exists
func (*Service) ListPendingUsers ¶
func (s *Service) ListPendingUsers(ctx context.Context) ([]Pendinguser, error)
ListPendingUsers lists all pending users
type Translation ¶
type User ¶
type User struct {
ID int32 `json:"id"`
UserName string `json:"user_name"`
Password string `json:"password"`
Email *string `json:"email"`
Url *string `json:"url"`
QuestionID *int16 `json:"question_id"`
Verificationdata *string `json:"verificationdata"`
LanguageID *int32 `json:"language_id"`
PublicKey *string `json:"public_key"`
PostForms int32 `json:"post_forms"`
Flags flags.User `json:"flags"`
LastUpdatedBy *string `json:"last_updated_by"`
LastUpdated int32 `json:"last_updated"`
Deleted *int16 `json:"deleted"`
TzSetting *string `json:"tz_setting"`
SignupCookie *string `json:"signup_cookie"`
SignupTs *int32 `json:"signup_ts"`
SignupIp *string `json:"signup_ip"`
Maxlogins *int32 `json:"maxlogins"`
TotpKey *string `json:"totp_key"`
}
type UserSecHistory ¶
type UsersLastseen ¶
Click to show internal directories.
Click to hide internal directories.