queries

package
v0.0.0-...-95f8b43 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	UserNumber   string
	ServerNumber string
	DiscordToken string
}

type AccountRow

type AccountRow struct {
	ServerNumber string
	DiscordToken string
}

type ChannelFromNicknameParams

type ChannelFromNicknameParams struct {
	UserNumber string
	Nickname   string
}

type ChannelNickname

type ChannelNickname struct {
	UserNumber string
	ChannelID  int64
	Nickname   string
}

type ChannelNicknameParams

type ChannelNicknameParams struct {
	UserNumber string
	ChannelID  int64
}

type ChannelNicknamesRow

type ChannelNicknamesRow struct {
	ChannelID int64
	Nickname  string
}

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 NumbersMuted

type NumbersMuted struct {
	UserNumber string
	Muted      int64
	Until      int64
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) Account

func (q *Queries) Account(ctx context.Context, userNumber string) (AccountRow, error)

func (*Queries) Accounts

func (q *Queries) Accounts(ctx context.Context) ([]Account, error)

func (*Queries) ChannelFromNickname

func (q *Queries) ChannelFromNickname(ctx context.Context, arg ChannelFromNicknameParams) (int64, error)

func (*Queries) ChannelNickname

func (q *Queries) ChannelNickname(ctx context.Context, arg ChannelNicknameParams) (string, error)

func (*Queries) ChannelNicknames

func (q *Queries) ChannelNicknames(ctx context.Context, userNumber string) ([]ChannelNicknamesRow, error)

func (*Queries) NumberIsMuted

func (q *Queries) NumberIsMuted(ctx context.Context, userNumber string) (int64, error)

func (*Queries) SetAccount

func (q *Queries) SetAccount(ctx context.Context, arg SetAccountParams) error

func (*Queries) SetChannelNickname

func (q *Queries) SetChannelNickname(ctx context.Context, arg SetChannelNicknameParams) error

func (*Queries) SetNumberMuted

func (q *Queries) SetNumberMuted(ctx context.Context, arg SetNumberMutedParams) error

func (*Queries) WithTx

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

type SetAccountParams

type SetAccountParams struct {
	UserNumber   string
	ServerNumber string
	DiscordToken string
}

type SetChannelNicknameParams

type SetChannelNicknameParams struct {
	UserNumber string
	ChannelID  int64
	Nickname   string
}

type SetNumberMutedParams

type SetNumberMutedParams struct {
	UserNumber string
	Muted      int64
	Until      int64
}

Jump to

Keyboard shortcuts

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