database

package
v0.0.0-...-0504a8b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	ChannelID       string
	ChannelUploadID string
	ChannelHandle   string
	ChannelUrl      string
}

type ContainsFeedChannelParams

type ContainsFeedChannelParams struct {
	FeedID    int32
	ChannelID string
}

type ContainsFeedParams

type ContainsFeedParams struct {
	UserID int32
	Name   string
}

type CreateFeedParams

type CreateFeedParams struct {
	CreatedAt time.Time
	UpdatedAt time.Time
	Name      string
	UserID    int32
}

type CreateUserParams

type CreateUserParams struct {
	FbUserID  string
	CreatedAt time.Time
	UpdatedAt time.Time
}

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type DeleteFeedChannelParams

type DeleteFeedChannelParams struct {
	FeedID    int32
	ChannelID string
}

type DeleteFeedParams

type DeleteFeedParams struct {
	UserID int32
	Name   string
}

type Feed

type Feed struct {
	ID        int32
	CreatedAt time.Time
	UpdatedAt time.Time
	Name      string
	UserID    int32
}

type FeedsChannel

type FeedsChannel struct {
	FeedID    int32
	ChannelID string
}

type GetAllUserFeedsRow

type GetAllUserFeedsRow struct {
	ID   int32
	Name string
}

type GetChannelHandleUploadIdRow

type GetChannelHandleUploadIdRow struct {
	ChannelHandle   string
	ChannelUploadID string
}

type GetChannelIdUploadIdByHandleRow

type GetChannelIdUploadIdByHandleRow struct {
	ChannelID       string
	ChannelUploadID string
}

type GetFeedIdParams

type GetFeedIdParams struct {
	UserID int32
	Name   string
}

type InsertChannelParams

type InsertChannelParams struct {
	ChannelID       string
	ChannelUploadID string
	ChannelHandle   string
	ChannelUrl      string
}

type InsertFeedChannelParams

type InsertFeedChannelParams struct {
	FeedID    int32
	ChannelID string
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func (*Queries) ContainsChannel

func (q *Queries) ContainsChannel(ctx context.Context, channelID string) (bool, error)

func (*Queries) ContainsChannelInDB

func (q *Queries) ContainsChannelInDB(ctx context.Context, channelHandle string) (bool, error)

func (*Queries) ContainsFeed

func (q *Queries) ContainsFeed(ctx context.Context, arg ContainsFeedParams) (bool, error)

func (*Queries) ContainsFeedChannel

func (q *Queries) ContainsFeedChannel(ctx context.Context, arg ContainsFeedChannelParams) (bool, error)

func (*Queries) ContainsUserByFirebaseId

func (q *Queries) ContainsUserByFirebaseId(ctx context.Context, fbUserID string) (bool, error)

func (*Queries) ContainsUserById

func (q *Queries) ContainsUserById(ctx context.Context, id int32) (bool, error)

func (*Queries) CreateFeed

func (q *Queries) CreateFeed(ctx context.Context, arg CreateFeedParams) (Feed, error)

func (*Queries) CreateUser

func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (int32, error)

func (*Queries) DeleteAllFeedChannels

func (q *Queries) DeleteAllFeedChannels(ctx context.Context, feedID int32) error

func (*Queries) DeleteAllFeeds

func (q *Queries) DeleteAllFeeds(ctx context.Context, userID int32) error

func (*Queries) DeleteChannel

func (q *Queries) DeleteChannel(ctx context.Context, channelID string) error

func (*Queries) DeleteFeed

func (q *Queries) DeleteFeed(ctx context.Context, arg DeleteFeedParams) error

func (*Queries) DeleteFeedChannel

func (q *Queries) DeleteFeedChannel(ctx context.Context, arg DeleteFeedChannelParams) error

func (*Queries) DeleteUserById

func (q *Queries) DeleteUserById(ctx context.Context, id int32) error

func (*Queries) GetAllFeedChannels

func (q *Queries) GetAllFeedChannels(ctx context.Context, feedID int32) ([]string, error)

func (*Queries) GetAllUserFeedNames

func (q *Queries) GetAllUserFeedNames(ctx context.Context, userID int32) ([]string, error)

func (*Queries) GetAllUserFeeds

func (q *Queries) GetAllUserFeeds(ctx context.Context, userID int32) ([]GetAllUserFeedsRow, error)

func (*Queries) GetAllUsers

func (q *Queries) GetAllUsers(ctx context.Context) ([]User, error)

func (*Queries) GetChannelHandle

func (q *Queries) GetChannelHandle(ctx context.Context, channelID string) (string, error)

func (*Queries) GetChannelHandleUploadId

func (q *Queries) GetChannelHandleUploadId(ctx context.Context, channelID string) (GetChannelHandleUploadIdRow, error)

func (*Queries) GetChannelIdByHandle

func (q *Queries) GetChannelIdByHandle(ctx context.Context, channelHandle string) (string, error)

func (*Queries) GetChannelIdUploadIdByHandle

func (q *Queries) GetChannelIdUploadIdByHandle(ctx context.Context, channelHandle string) (GetChannelIdUploadIdByHandleRow, error)

func (*Queries) GetFeedId

func (q *Queries) GetFeedId(ctx context.Context, arg GetFeedIdParams) (int32, error)

func (*Queries) GetUploadId

func (q *Queries) GetUploadId(ctx context.Context, channelID string) (string, error)

func (*Queries) GetUserById

func (q *Queries) GetUserById(ctx context.Context, id int32) (User, error)

func (*Queries) GetUserIdByFirebaseId

func (q *Queries) GetUserIdByFirebaseId(ctx context.Context, fbUserID string) (int32, error)

func (*Queries) InsertChannel

func (q *Queries) InsertChannel(ctx context.Context, arg InsertChannelParams) (Channel, error)

func (*Queries) InsertFeedChannel

func (q *Queries) InsertFeedChannel(ctx context.Context, arg InsertFeedChannelParams) error

func (*Queries) UpdateFeedNameQuery

func (q *Queries) UpdateFeedNameQuery(ctx context.Context, arg UpdateFeedNameQueryParams) error

func (*Queries) WithTx

func (q *Queries) WithTx(tx *sql.Tx) *Queries

type UpdateFeedNameQueryParams

type UpdateFeedNameQueryParams struct {
	ID        int32
	Name      string
	UpdatedAt time.Time
}

type User

type User struct {
	ID        int32
	FbUserID  string
	CreatedAt time.Time
	UpdatedAt time.Time
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL