Documentation ¶
Index ¶
- Constants
- Variables
- func ErrorCode(err error) string
- type CreateUserParams
- type CreateVideoParams
- type DBTX
- type Follow
- type FollowUserParams
- type GetListFollowerParams
- type GetListFollowingParams
- type GetListVideoParams
- type Querier
- type Queries
- func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (User, error)
- func (q *Queries) CreateVideo(ctx context.Context, arg CreateVideoParams) (Video, error)
- func (q *Queries) DeleteVideo(ctx context.Context, id int64) error
- func (q *Queries) FollowUser(ctx context.Context, arg FollowUserParams) (Follow, error)
- func (q *Queries) GetListFollower(ctx context.Context, arg GetListFollowerParams) ([]Follow, error)
- func (q *Queries) GetListFollowing(ctx context.Context, arg GetListFollowingParams) ([]Follow, error)
- func (q *Queries) GetListVideo(ctx context.Context, arg GetListVideoParams) ([]Video, error)
- func (q *Queries) GetUser(ctx context.Context, id int64) (User, error)
- func (q *Queries) GetUserByUsername(ctx context.Context, username string) (User, error)
- func (q *Queries) GetVideo(ctx context.Context, id int64) (Video, error)
- func (q *Queries) UnfollowUser(ctx context.Context, arg UnfollowUserParams) error
- func (q *Queries) UpdateUser(ctx context.Context, arg UpdateUserParams) (User, error)
- func (q *Queries) UpdateVideo(ctx context.Context, arg UpdateVideoParams) (Video, error)
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type SQLStore
- type Store
- type UnfollowUserParams
- type UpdateUserParams
- type UpdateVideoParams
- type User
- type Video
Constants ¶
View Source
const (
UniqueViolation = "23505"
)
Variables ¶
View Source
var ErrRecordNotFound = pgx.ErrNoRows
Functions ¶
Types ¶
type CreateUserParams ¶
type CreateVideoParams ¶
type FollowUserParams ¶
type GetListFollowerParams ¶
type GetListFollowingParams ¶
type GetListVideoParams ¶
type Querier ¶
type Querier interface { CreateUser(ctx context.Context, arg CreateUserParams) (User, error) CreateVideo(ctx context.Context, arg CreateVideoParams) (Video, error) DeleteVideo(ctx context.Context, id int64) error FollowUser(ctx context.Context, arg FollowUserParams) (Follow, error) GetListFollower(ctx context.Context, arg GetListFollowerParams) ([]Follow, error) GetListFollowing(ctx context.Context, arg GetListFollowingParams) ([]Follow, error) GetListVideo(ctx context.Context, arg GetListVideoParams) ([]Video, error) GetUser(ctx context.Context, id int64) (User, error) GetUserByUsername(ctx context.Context, username string) (User, error) GetVideo(ctx context.Context, id int64) (Video, error) UnfollowUser(ctx context.Context, arg UnfollowUserParams) error UpdateUser(ctx context.Context, arg UpdateUserParams) (User, error) UpdateVideo(ctx context.Context, arg UpdateVideoParams) (Video, error) }
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) CreateUser ¶
func (*Queries) CreateVideo ¶
func (*Queries) FollowUser ¶
func (*Queries) GetListFollower ¶
func (*Queries) GetListFollowing ¶
func (*Queries) GetListVideo ¶
func (*Queries) GetUserByUsername ¶
func (*Queries) UnfollowUser ¶
func (q *Queries) UnfollowUser(ctx context.Context, arg UnfollowUserParams) error
func (*Queries) UpdateUser ¶
func (*Queries) UpdateVideo ¶
type UnfollowUserParams ¶
type UpdateUserParams ¶
type UpdateVideoParams ¶
type Video ¶
type Video struct { ID int64 `json:"id"` Title string `json:"title"` StreamUrl string `json:"stream_url"` Description pgtype.Text `json:"description"` ThumbnailUrl pgtype.Text `json:"thumbnail_url"` CreatedBy int64 `json:"created_by"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
Click to show internal directories.
Click to hide internal directories.