database

package
v0.0.0-...-422987d Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Communication

type Communication struct {
	ID        string
	CreatedAt string
	UpdatedAt string
	Model     string
	Question  string
	Reply     sql.NullString
	UserID    string
}

type CreateComunParams

type CreateComunParams struct {
	ID        string
	CreatedAt string
	UpdatedAt string
	Model     string
	Question  string
	Reply     sql.NullString
	UserID    string
}

type CreateUserParams

type CreateUserParams struct {
	ID             string
	CreatedAt      string
	UpdatedAt      string
	Login          string
	Email          sql.NullString
	HashedPassword string
	ApiKey         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 Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CreateComun

func (q *Queries) CreateComun(ctx context.Context, arg CreateComunParams) error

func (*Queries) CreateUser

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

func (*Queries) DeleteUsers

func (q *Queries) DeleteUsers(ctx context.Context) error

func (*Queries) GetComunsById

func (q *Queries) GetComunsById(ctx context.Context, id string) (Communication, error)

func (*Queries) GetComunsByUser

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

func (*Queries) GetUser

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

func (*Queries) GetUserByLogin

func (q *Queries) GetUserByLogin(ctx context.Context, login string) (User, error)

func (*Queries) UpdateReply

func (q *Queries) UpdateReply(ctx context.Context, arg UpdateReplyParams) error

func (*Queries) WithTx

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

type UpdateReplyParams

type UpdateReplyParams struct {
	UpdatedAt string
	Reply     sql.NullString
	ID        string
}

type User

type User struct {
	ID             string
	CreatedAt      string
	UpdatedAt      string
	Login          string
	Email          sql.NullString
	HashedPassword string
	ApiKey         string
}

Jump to

Keyboard shortcuts

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