Documentation ¶
Index ¶
- type CreateAccountParams
- type CreateProfileParams
- type DBTX
- type FollowProfileParams
- type GetProfileRow
- type NullUsersPrivileges
- type Querier
- type Queries
- func (q *Queries) CreateAccount(ctx context.Context, arg *CreateAccountParams) (*UsersAccount, error)
- func (q *Queries) CreateProfile(ctx context.Context, arg *CreateProfileParams) (*UsersProfile, error)
- func (q *Queries) DeleteAccount(ctx context.Context, id uuid.UUID) error
- func (q *Queries) DeleteProfile(ctx context.Context, id uuid.UUID) error
- func (q *Queries) FollowProfile(ctx context.Context, arg *FollowProfileParams) (*UsersFollow, error)
- func (q *Queries) GetAccount(ctx context.Context, id uuid.UUID) (*UsersAccount, error)
- func (q *Queries) GetAccountByEmail(ctx context.Context, email string) (*UsersAccount, error)
- func (q *Queries) GetAccountByName(ctx context.Context, name string) (*UsersAccount, error)
- func (q *Queries) GetFollowedProfiles(ctx context.Context, follower uuid.UUID) ([]*UsersFollow, error)
- func (q *Queries) GetProfile(ctx context.Context, userID uuid.UUID) (*GetProfileRow, error)
- func (q *Queries) GetProfileFollows(ctx context.Context, followed uuid.UUID) ([]*UsersFollow, error)
- func (q *Queries) UnfollowProfile(ctx context.Context, arg *UnfollowProfileParams) error
- func (q *Queries) UpdateAccount(ctx context.Context, arg *UpdateAccountParams) (*UsersAccount, error)
- func (q *Queries) UpdateLastLoggedIn(ctx context.Context, id uuid.UUID) error
- func (q *Queries) UpdateProfile(ctx context.Context, arg *UpdateProfileParams) (*UsersProfile, error)
- func (q *Queries) UpdateUserPrivileges(ctx context.Context, arg *UpdateUserPrivilegesParams) (*UsersAccount, error)
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type UnfollowProfileParams
- type UpdateAccountParams
- type UpdateProfileParams
- type UpdateUserPrivilegesParams
- type UsersAccount
- type UsersFollow
- type UsersPrivileges
- type UsersProfile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateAccountParams ¶
type CreateProfileParams ¶
type CreateProfileParams struct { UserID uuid.UUID DisplayName sql.NullString Description sql.NullString AvatarUrl sql.NullString }
type FollowProfileParams ¶
type GetProfileRow ¶
type GetProfileRow struct { ID uuid.UUID UserID uuid.UUID UpdatedAt sql.NullTime DisplayName sql.NullString AvatarUrl sql.NullString Description sql.NullString Links []string ID_2 uuid.UUID CreatedAt time.Time UpdatedAt_2 sql.NullTime LastLoggedIn time.Time Name string Email string HashedPassword string Privilege UsersPrivileges }
type NullUsersPrivileges ¶
type NullUsersPrivileges struct { UsersPrivileges UsersPrivileges Valid bool // Valid is true if UsersPrivileges is not NULL }
func (*NullUsersPrivileges) Scan ¶
func (ns *NullUsersPrivileges) Scan(value interface{}) error
Scan implements the Scanner interface.
type Querier ¶
type Querier interface { //------ Accounts -------- CreateAccount(ctx context.Context, arg *CreateAccountParams) (*UsersAccount, error) //------ Profiles -------- CreateProfile(ctx context.Context, arg *CreateProfileParams) (*UsersProfile, error) DeleteAccount(ctx context.Context, id uuid.UUID) error DeleteProfile(ctx context.Context, id uuid.UUID) error FollowProfile(ctx context.Context, arg *FollowProfileParams) (*UsersFollow, error) GetAccount(ctx context.Context, id uuid.UUID) (*UsersAccount, error) GetAccountByEmail(ctx context.Context, email string) (*UsersAccount, error) GetAccountByName(ctx context.Context, name string) (*UsersAccount, error) GetFollowedProfiles(ctx context.Context, follower uuid.UUID) ([]*UsersFollow, error) GetProfile(ctx context.Context, userID uuid.UUID) (*GetProfileRow, error) GetProfileFollows(ctx context.Context, followed uuid.UUID) ([]*UsersFollow, error) UnfollowProfile(ctx context.Context, arg *UnfollowProfileParams) error UpdateAccount(ctx context.Context, arg *UpdateAccountParams) (*UsersAccount, error) UpdateLastLoggedIn(ctx context.Context, id uuid.UUID) error UpdateProfile(ctx context.Context, arg *UpdateProfileParams) (*UsersProfile, error) UpdateUserPrivileges(ctx context.Context, arg *UpdateUserPrivilegesParams) (*UsersAccount, error) }
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) CreateAccount ¶
func (q *Queries) CreateAccount(ctx context.Context, arg *CreateAccountParams) (*UsersAccount, error)
------ Accounts --------
func (*Queries) CreateProfile ¶
func (q *Queries) CreateProfile(ctx context.Context, arg *CreateProfileParams) (*UsersProfile, error)
------ Profiles --------
func (*Queries) DeleteAccount ¶
func (*Queries) DeleteProfile ¶
func (*Queries) FollowProfile ¶
func (q *Queries) FollowProfile(ctx context.Context, arg *FollowProfileParams) (*UsersFollow, error)
func (*Queries) GetAccount ¶
func (*Queries) GetAccountByEmail ¶
func (*Queries) GetAccountByName ¶
func (*Queries) GetFollowedProfiles ¶
func (*Queries) GetProfile ¶
func (*Queries) GetProfileFollows ¶
func (*Queries) UnfollowProfile ¶
func (q *Queries) UnfollowProfile(ctx context.Context, arg *UnfollowProfileParams) error
func (*Queries) UpdateAccount ¶
func (q *Queries) UpdateAccount(ctx context.Context, arg *UpdateAccountParams) (*UsersAccount, error)
func (*Queries) UpdateLastLoggedIn ¶
func (*Queries) UpdateProfile ¶
func (q *Queries) UpdateProfile(ctx context.Context, arg *UpdateProfileParams) (*UsersProfile, error)
func (*Queries) UpdateUserPrivileges ¶
func (q *Queries) UpdateUserPrivileges(ctx context.Context, arg *UpdateUserPrivilegesParams) (*UsersAccount, error)
type UnfollowProfileParams ¶
type UpdateAccountParams ¶
type UpdateProfileParams ¶
type UpdateProfileParams struct { ID uuid.UUID DisplayName sql.NullString Description sql.NullString AvatarUrl sql.NullString Links []string }
type UpdateUserPrivilegesParams ¶
type UpdateUserPrivilegesParams struct { ID uuid.UUID Privilege UsersPrivileges }
type UsersAccount ¶
type UsersFollow ¶
type UsersPrivileges ¶
type UsersPrivileges string
const ( UsersPrivilegesUser UsersPrivileges = "user" UsersPrivilegesModerator UsersPrivileges = "moderator" UsersPrivilegesAdmin UsersPrivileges = "admin" )
func AllUsersPrivilegesValues ¶
func AllUsersPrivilegesValues() []UsersPrivileges
func (*UsersPrivileges) Scan ¶
func (e *UsersPrivileges) Scan(src interface{}) error
func (UsersPrivileges) Valid ¶
func (e UsersPrivileges) Valid() bool
type UsersProfile ¶
type UsersProfile struct { ID uuid.UUID UserID uuid.UUID UpdatedAt sql.NullTime DisplayName sql.NullString AvatarUrl sql.NullString Description sql.NullString Links []string }
Click to show internal directories.
Click to hide internal directories.