queries

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppFlagsCreateGameParams

type AppFlagsCreateGameParams struct {
	Uid            sql.NullString
	Tags           []string
	QuestionAmount int32
	Seconds        int32
}

type AppFlagsCreateGameRow

type AppFlagsCreateGameRow struct {
	GameID   uuid.UUID
	GameSeed uuid.UUID
}

type AppFlagsCreateGameWithSeedParams

type AppFlagsCreateGameWithSeedParams struct {
	Uid            sql.NullString
	Tags           []string
	QuestionAmount int32
	Seconds        int32
	GameSeed       uuid.UUID
}

type AppFlagsGame

type AppFlagsGame struct {
	GameID          uuid.UUID
	GameSeed        uuid.UUID
	Uid             sql.NullString
	Tags            []string
	Seconds         int32
	QuestionAmount  int32
	QuestionCurrent int32
	QuestionsErrors int32
	CreatedAt       time.Time
	LastActivity    time.Time
}

type AppFlagsGamesAnswer

type AppFlagsGamesAnswer struct {
	GameID    uuid.UUID
	Question  int32
	Errors    int32
	CreatedAt time.Time
}

type AppFlagsGamesSharedDatum

type AppFlagsGamesSharedDatum struct {
	ID        int32
	Uid       string
	ShareKey  string
	GameSeed  uuid.UUID
	Questions int32
	Tags      []string
	Seconds   int32
	CreatedAt time.Time
}

type AppFlagsNewSharedDataParams

type AppFlagsNewSharedDataParams struct {
	Uid       string
	ShareKey  string
	GameSeed  uuid.UUID
	Tags      []string
	Questions int32
	Seconds   int32
}

type AppFlagsUpdateGameParams

type AppFlagsUpdateGameParams struct {
	QuestionCurrent int32
	GameID          uuid.UUID
}

type AppFlagsUpsertGameAnswerParams

type AppFlagsUpsertGameAnswerParams struct {
	GameID   uuid.UUID
	Question int32
	Errors   int32
}

type AppUploaderAccessCreateParams

type AppUploaderAccessCreateParams struct {
	FileID    uuid.UUID
	Uid       sql.NullString
	IpAddress string
	Agent     string
}

type AppUploaderCreateParams

type AppUploaderCreateParams struct {
	Uid        string
	FileCrypto string
	Expire     time.Time
	MaxVisits  int32
}

type AppUploaderFile

type AppUploaderFile struct {
	ID         uuid.UUID
	Uid        string
	FileCrypto string
	CreatedAt  time.Time
	Expire     time.Time
	MaxVisits  int32
}

type AppUploaderFilesAccess

type AppUploaderFilesAccess struct {
	FileID     uuid.UUID
	Uid        sql.NullString
	IpAddress  string
	Agent      string
	AccessTime time.Time
}

type CreateSessionParams

type CreateSessionParams struct {
	Uid   string
	Token string
}

type CreateUserParams

type CreateUserParams struct {
	Uid           string
	Email         string
	EmailVerified bool
	FullName      string
	Username      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 GetActiveSessionsParams

type GetActiveSessionsParams struct {
	Uid     string
	Column2 interface{}
}

type GetSessionsParams

type GetSessionsParams struct {
	Uid     string
	Column2 interface{}
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) AppFlagsCreateGame

func (q *Queries) AppFlagsCreateGame(ctx context.Context, arg AppFlagsCreateGameParams) (AppFlagsCreateGameRow, error)

func (*Queries) AppFlagsCreateGameWithSeed

func (q *Queries) AppFlagsCreateGameWithSeed(ctx context.Context, arg AppFlagsCreateGameWithSeedParams) (uuid.UUID, error)

func (*Queries) AppFlagsGetGame

func (q *Queries) AppFlagsGetGame(ctx context.Context, gameID uuid.UUID) (AppFlagsGame, error)

func (*Queries) AppFlagsGetSharedData

func (q *Queries) AppFlagsGetSharedData(ctx context.Context, shareKey string) (AppFlagsGamesSharedDatum, error)

func (*Queries) AppFlagsNewSharedData

func (q *Queries) AppFlagsNewSharedData(ctx context.Context, arg AppFlagsNewSharedDataParams) (uuid.UUID, error)

func (*Queries) AppFlagsUpdateGame

func (q *Queries) AppFlagsUpdateGame(ctx context.Context, arg AppFlagsUpdateGameParams) error

func (*Queries) AppFlagsUpdateQuestionCorrect

func (q *Queries) AppFlagsUpdateQuestionCorrect(ctx context.Context, gameID uuid.UUID) error

func (*Queries) AppFlagsUpsertGameAnswer

func (q *Queries) AppFlagsUpsertGameAnswer(ctx context.Context, arg AppFlagsUpsertGameAnswerParams) error

func (*Queries) AppUploaderAccessCount

func (q *Queries) AppUploaderAccessCount(ctx context.Context, fileID uuid.UUID) (int64, error)

func (*Queries) AppUploaderAccessCreate

func (q *Queries) AppUploaderAccessCreate(ctx context.Context, arg AppUploaderAccessCreateParams) error

func (*Queries) AppUploaderCreate

func (q *Queries) AppUploaderCreate(ctx context.Context, arg AppUploaderCreateParams) (uuid.UUID, error)

func (*Queries) AppUploaderGet

func (q *Queries) AppUploaderGet(ctx context.Context, fileCrypto string) (AppUploaderFile, error)

func (*Queries) CreateSession

func (q *Queries) CreateSession(ctx context.Context, arg CreateSessionParams) error

func (*Queries) CreateUser

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

func (*Queries) DeleteUser

func (q *Queries) DeleteUser(ctx context.Context, uid string) error

func (*Queries) ExpireSession

func (q *Queries) ExpireSession(ctx context.Context, token string) error

func (*Queries) GetActiveSessions

func (q *Queries) GetActiveSessions(ctx context.Context, arg GetActiveSessionsParams) ([]Session, error)

func (*Queries) GetPGSize

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

func (*Queries) GetSession

func (q *Queries) GetSession(ctx context.Context, token string) (Session, error)

func (*Queries) GetSessions

func (q *Queries) GetSessions(ctx context.Context, arg GetSessionsParams) ([]Session, error)

func (*Queries) GetUser

func (q *Queries) GetUser(ctx context.Context, uid string) (User, error)

func (*Queries) GetUserById

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

func (*Queries) GetUserUid

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

func (*Queries) QuickUpdateSession

func (q *Queries) QuickUpdateSession(ctx context.Context, arg QuickUpdateSessionParams) (string, error)

func (*Queries) UpdateUserData

func (q *Queries) UpdateUserData(ctx context.Context, arg UpdateUserDataParams) error

func (*Queries) WithTx

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

type QuickUpdateSessionParams

type QuickUpdateSessionParams struct {
	Token     string
	IpAddress string
	Agent     string
}

type Session

type Session struct {
	ID           int32
	Uid          string
	Token        string
	Expires      sql.NullTime
	LastActivity time.Time
	CreatedAt    time.Time
}

type SessionIp

type SessionIp struct {
	ID         int32
	SessionID  int32
	IpAddress  string
	Agent      string
	AccessTime time.Time
}

type UpdateUserDataParams

type UpdateUserDataParams struct {
	Uid           string
	Email         string
	EmailVerified bool
	FullName      string
	Username      string
}

type User

type User struct {
	ID            int32
	Uid           string
	Email         string
	EmailVerified bool
	FullName      string
	Username      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