Documentation
¶
Index ¶
- type CreateMessageParams
- type CreateMessageTextParams
- type CreateMessageTypeParams
- type CreateUserParams
- type DBTX
- type GetMessageByIdPublicRow
- type GetMessageByIdRow
- type GetUserByNameAndUuidParams
- type MessageMetum
- type MessageStatus
- type MessageText
- type MessageText0
- type MessageText1
- type MessageText2
- type MessageText3
- type MessageText4
- type MessageText5
- type MessageText6
- type MessageText7
- type MessageText8
- type MessageText9
- type MessageType
- type MessageTypeMetum
- type NullMessageStatus
- type NullMessageType
- type Queries
- func (q *Queries) CreateMessage(ctx context.Context, arg CreateMessageParams) (MessageMetum, error)
- func (q *Queries) CreateMessageText(ctx context.Context, arg CreateMessageTextParams) (MessageText, error)
- func (q *Queries) CreateMessageType(ctx context.Context, arg CreateMessageTypeParams) (MessageTypeMetum, error)
- func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (User, error)
- func (q *Queries) DeleteUserDetails(ctx context.Context, pvtID int32) (User, error)
- func (q *Queries) GetMessageById(ctx context.Context, mssgID int64) (GetMessageByIdRow, error)
- func (q *Queries) GetMessageByIdPublic(ctx context.Context, mssgID int64) (GetMessageByIdPublicRow, error)
- func (q *Queries) GetUserById(ctx context.Context, pvtID int32) (User, error)
- func (q *Queries) GetUserByName(ctx context.Context, username string) (User, error)
- func (q *Queries) GetUserByNameAndUuid(ctx context.Context, arg GetUserByNameAndUuidParams) (User, error)
- func (q *Queries) GetUserByUuid(ctx context.Context, userID pgtype.UUID) (User, error)
- func (q *Queries) UpdateLoggedInTime(ctx context.Context, arg UpdateLoggedInTimeParams) error
- func (q *Queries) UpdateUserDetails(ctx context.Context, arg UpdateUserDetailsParams) (User, error)
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type UpdateLoggedInTimeParams
- type UpdateUserDetailsParams
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateMessageParams ¶
type CreateMessageTextParams ¶
type CreateMessageTypeParams ¶
type CreateMessageTypeParams struct { MssgID int64 `json:"mssg_id"` MssgType MessageType `json:"mssg_type"` AttachMssgID pgtype.Int8 `json:"attach_mssg_id"` }
type CreateUserParams ¶
type GetMessageByIdPublicRow ¶
type GetMessageByIdPublicRow struct { MssgID int64 `json:"mssg_id"` FromUserID pgtype.UUID `json:"from_user_id"` ToUserID pgtype.UUID `json:"to_user_id"` MssgStatus MessageStatus `json:"mssg_status"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` MssgType MessageType `json:"mssg_type"` AttachMssgID pgtype.Int8 `json:"attach_mssg_id"` MssgBody string `json:"mssg_body"` }
type GetMessageByIdRow ¶
type GetMessageByIdRow struct { MssgID int64 `json:"mssg_id"` FromPvtID int32 `json:"from_pvt_id"` ToPvtID int32 `json:"to_pvt_id"` MssgStatus MessageStatus `json:"mssg_status"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` MssgType MessageType `json:"mssg_type"` AttachMssgID pgtype.Int8 `json:"attach_mssg_id"` MssgBody string `json:"mssg_body"` }
type MessageMetum ¶
type MessageStatus ¶
type MessageStatus string
const ( MessageStatusSent MessageStatus = "sent" MessageStatusDelivered MessageStatus = "delivered" MessageStatusRead MessageStatus = "read" )
func (*MessageStatus) Scan ¶
func (e *MessageStatus) Scan(src interface{}) error
type MessageText ¶
type MessageText0 ¶
type MessageText1 ¶
type MessageText2 ¶
type MessageText3 ¶
type MessageText4 ¶
type MessageText5 ¶
type MessageText6 ¶
type MessageText7 ¶
type MessageText8 ¶
type MessageText9 ¶
type MessageType ¶
type MessageType string
const ( MessageTypeNormal MessageType = "normal" MessageTypeReply MessageType = "reply" MessageTypeReaction MessageType = "reaction" )
func (*MessageType) Scan ¶
func (e *MessageType) Scan(src interface{}) error
type MessageTypeMetum ¶
type MessageTypeMetum struct { MssgID int64 `json:"mssg_id"` MssgType MessageType `json:"mssg_type"` AttachMssgID pgtype.Int8 `json:"attach_mssg_id"` }
type NullMessageStatus ¶
type NullMessageStatus struct { MessageStatus MessageStatus `json:"message_status"` Valid bool `json:"valid"` // Valid is true if MessageStatus is not NULL }
func (*NullMessageStatus) Scan ¶
func (ns *NullMessageStatus) Scan(value interface{}) error
Scan implements the Scanner interface.
type NullMessageType ¶
type NullMessageType struct { MessageType MessageType `json:"message_type"` Valid bool `json:"valid"` // Valid is true if MessageType is not NULL }
func (*NullMessageType) Scan ¶
func (ns *NullMessageType) Scan(value interface{}) error
Scan implements the Scanner interface.
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) CreateMessage ¶
func (q *Queries) CreateMessage(ctx context.Context, arg CreateMessageParams) (MessageMetum, error)
func (*Queries) CreateMessageText ¶
func (q *Queries) CreateMessageText(ctx context.Context, arg CreateMessageTextParams) (MessageText, error)
func (*Queries) CreateMessageType ¶
func (q *Queries) CreateMessageType(ctx context.Context, arg CreateMessageTypeParams) (MessageTypeMetum, error)
func (*Queries) CreateUser ¶
func (*Queries) DeleteUserDetails ¶
func (*Queries) GetMessageById ¶
func (*Queries) GetMessageByIdPublic ¶
func (*Queries) GetUserById ¶
func (*Queries) GetUserByName ¶
func (*Queries) GetUserByNameAndUuid ¶
func (*Queries) GetUserByUuid ¶
func (*Queries) UpdateLoggedInTime ¶
func (q *Queries) UpdateLoggedInTime(ctx context.Context, arg UpdateLoggedInTimeParams) error
func (*Queries) UpdateUserDetails ¶
type UpdateUserDetailsParams ¶
type User ¶
type User struct { PvtID int32 `json:"pvt_id"` UserID pgtype.UUID `json:"user_id"` Username string `json:"username"` DisplayName string `json:"display_name"` Password []byte `json:"password"` PasswordSalt []byte `json:"password_salt"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` LastLoggedIn pgtype.Timestamp `json:"last_logged_in"` }
Click to show internal directories.
Click to hide internal directories.