Documentation ¶
Index ¶
- type Comment
- type CreatePostParams
- type CreateUserParams
- type DBTX
- type Dislike
- type Gender
- type GetPopularPostsParams
- type GetUserRow
- type LanguagePreference
- type Like
- type NullGender
- type NullLanguagePreference
- type Post
- type Queries
- func (q *Queries) CreatePost(ctx context.Context, arg CreatePostParams) (Post, error)
- func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (User, error)
- func (q *Queries) GetEmailById(ctx context.Context, id uuid.UUID) (string, error)
- func (q *Queries) GetPopularPosts(ctx context.Context, arg GetPopularPostsParams) ([]Post, error)
- func (q *Queries) GetPostById(ctx context.Context, id uuid.UUID) (Post, error)
- func (q *Queries) GetUser(ctx context.Context, username string) (GetUserRow, error)
- func (q *Queries) GetUserById(ctx context.Context, id uuid.UUID) (User, error)
- func (q *Queries) ListPosts(ctx context.Context) ([]Post, error)
- func (q *Queries) ListUsers(ctx context.Context) ([]User, error)
- func (q *Queries) VerifyEmail(ctx context.Context, id uuid.UUID) 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 CreatePostParams ¶
type CreateUserParams ¶
type GetPopularPostsParams ¶
type GetUserRow ¶
type LanguagePreference ¶
type LanguagePreference string
const ( LanguagePreferenceEn LanguagePreference = "en" LanguagePreferenceRu LanguagePreference = "ru" )
func (*LanguagePreference) Scan ¶
func (e *LanguagePreference) Scan(src interface{}) error
type NullGender ¶
type NullGender struct { Gender Gender `json:"gender"` Valid bool `json:"valid"` // Valid is true if Gender is not NULL }
func (*NullGender) Scan ¶
func (ns *NullGender) Scan(value interface{}) error
Scan implements the Scanner interface.
type NullLanguagePreference ¶
type NullLanguagePreference struct { LanguagePreference LanguagePreference `json:"language_preference"` Valid bool `json:"valid"` // Valid is true if LanguagePreference is not NULL }
func (*NullLanguagePreference) Scan ¶
func (ns *NullLanguagePreference) Scan(value interface{}) error
Scan implements the Scanner interface.
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) CreatePost ¶
func (*Queries) CreateUser ¶
func (*Queries) GetEmailById ¶
func (*Queries) GetPopularPosts ¶
func (*Queries) GetPostById ¶
func (*Queries) GetUserById ¶
func (*Queries) VerifyEmail ¶
type User ¶
type User struct { ID uuid.UUID `db:"id" json:"id"` Username string `db:"username" json:"username"` PasswordHash string `db:"password_hash" json:"password_hash"` Salt string `db:"salt" json:"salt"` Email string `db:"email" json:"email"` EmailVerified *bool `db:"email_verified" json:"email_verified"` FirstName *string `db:"first_name" json:"first_name"` LastName *string `db:"last_name" json:"last_name"` PhoneNumber *string `db:"phone_number" json:"phone_number"` DateOfBirth pgtype.Date `db:"date_of_birth" json:"date_of_birth"` Gender NullGender `db:"gender" json:"gender"` Bio *string `db:"bio" json:"bio"` LanguagePreference NullLanguagePreference `db:"language_preference" json:"language_preference"` CreatedAt pgtype.Timestamp `db:"created_at" json:"created_at"` UpdatedAt pgtype.Timestamp `db:"updated_at" json:"updated_at"` FailedLoginAttempts *int32 `db:"failed_login_attempts" json:"failed_login_attempts"` }
Click to show internal directories.
Click to hide internal directories.