idm

package
v0.0.0-...-513cc63 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateUserParams

type CreateUserParams struct {
	Username  string
	Password  []byte
	FirstName string
	LastName  sql.NullString
}

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type FindUserByUsernameRow

type FindUserByUsernameRow struct {
	Uuid     uuid.UUID
	Username string
	Password []byte
}

type IdmUser

type IdmUser struct {
	Uuid           uuid.UUID
	Username       string
	Password       []byte
	FirstName      string
	LastName       sql.NullString
	CreatedAt      time.Time
	LastModifiedAt time.Time
	DeletedAt      sql.NullTime
}

type IdmUserEmail

type IdmUserEmail struct {
	Uuid      uuid.UUID
	Email     string
	UserUuid  uuid.UUID
	CreatedAt time.Time
	DeletedAt sql.NullTime
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CreateUser

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

func (*Queries) DeleteUserByUsername

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

func (*Queries) FindUserByUsername

func (q *Queries) FindUserByUsername(ctx context.Context, username string) (FindUserByUsernameRow, error)

func (*Queries) UpdateUser

func (q *Queries) UpdateUser(ctx context.Context, arg UpdateUserParams) error

func (*Queries) WithTx

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

type UpdateUserParams

type UpdateUserParams struct {
	Uuid      uuid.UUID
	Username  string
	Password  []byte
	FirstName string
	LastName  sql.NullString
}

Jump to

Keyboard shortcuts

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