Documentation
¶
Index ¶
- type Account
- type CreateAccountParams
- type CreatePostParams
- type CreateUserParams
- type DBTX
- type Follow
- type LikePostParams
- type ListAccountsParams
- type ListPostsParams
- type ListUsersParams
- type Post
- type Querier
- type Queries
- func (q *Queries) Close() error
- func (q *Queries) CreateAccount(ctx context.Context, arg CreateAccountParams) (Account, error)
- 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) DeleteAccount(ctx context.Context, userID int32) error
- func (q *Queries) DeleteUser(ctx context.Context, id int64) error
- func (q *Queries) GetAccount(ctx context.Context, userID int32) (Account, error)
- func (q *Queries) GetPost(ctx context.Context, id int64) (Post, error)
- func (q *Queries) GetUserById(ctx context.Context, id int64) (User, error)
- func (q *Queries) GetUserByUsername(ctx context.Context, username string) (User, error)
- func (q *Queries) LikePost(ctx context.Context, id int64) error
- func (q *Queries) ListAccounts(ctx context.Context, arg ListAccountsParams) ([]Account, error)
- func (q *Queries) ListPosts(ctx context.Context, arg ListPostsParams) ([]Post, error)
- func (q *Queries) ListUsers(ctx context.Context, arg ListUsersParams) ([]User, error)
- func (q *Queries) UpdateEmail(ctx context.Context, arg UpdateEmailParams) error
- func (q *Queries) UpdatePassword(ctx context.Context, arg UpdatePasswordParams) error
- func (q *Queries) UpdateReputation(ctx context.Context, arg UpdateReputationParams) error
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- type SQLStore
- type Store
- type UpdateEmailParams
- type UpdatePasswordParams
- type UpdateReputationParams
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateAccountParams ¶
type CreatePostParams ¶
type CreateUserParams ¶
type LikePostParams ¶
type ListAccountsParams ¶
type ListPostsParams ¶
type ListUsersParams ¶
type Querier ¶
type Querier interface { CreateAccount(ctx context.Context, arg CreateAccountParams) (Account, error) CreatePost(ctx context.Context, arg CreatePostParams) (Post, error) CreateUser(ctx context.Context, arg CreateUserParams) (User, error) DeleteAccount(ctx context.Context, userID int32) error DeleteUser(ctx context.Context, id int64) error GetAccount(ctx context.Context, userID int32) (Account, error) GetPost(ctx context.Context, id int64) (Post, error) GetUserById(ctx context.Context, id int64) (User, error) GetUserByUsername(ctx context.Context, username string) (User, error) LikePost(ctx context.Context, id int64) error ListAccounts(ctx context.Context, arg ListAccountsParams) ([]Account, error) ListPosts(ctx context.Context, arg ListPostsParams) ([]Post, error) ListUsers(ctx context.Context, arg ListUsersParams) ([]User, error) UpdateEmail(ctx context.Context, arg UpdateEmailParams) error UpdatePassword(ctx context.Context, arg UpdatePasswordParams) error UpdateReputation(ctx context.Context, arg UpdateReputationParams) error }
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) CreateAccount ¶
func (*Queries) CreatePost ¶
func (*Queries) CreateUser ¶
func (*Queries) DeleteAccount ¶
func (*Queries) GetAccount ¶
func (*Queries) GetUserById ¶
func (*Queries) GetUserByUsername ¶
func (*Queries) ListAccounts ¶
func (*Queries) UpdateEmail ¶
func (q *Queries) UpdateEmail(ctx context.Context, arg UpdateEmailParams) error
func (*Queries) UpdatePassword ¶
func (q *Queries) UpdatePassword(ctx context.Context, arg UpdatePasswordParams) error
func (*Queries) UpdateReputation ¶
func (q *Queries) UpdateReputation(ctx context.Context, arg UpdateReputationParams) error
type SQLStore ¶
type SQLStore struct { *Queries // contains filtered or unexported fields }
has db and set of queries to interact with the database
type Store ¶
type Store interface { Querier //genrated by sqlc LikeTx(ctx context.Context, arg LikePostParams) error }
generic interface for all the queries anyone who wants to be a store must implement this interface
type UpdateEmailParams ¶
type UpdatePasswordParams ¶
type UpdateReputationParams ¶
Click to show internal directories.
Click to hide internal directories.