identity

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store provides minimal identity lookups/mutations against profiles schema.

func NewStore

func NewStore(pg *pgxpool.Pool, schema string) *Store

func (*Store) GetByID

func (s *Store) GetByID(ctx context.Context, id uuid.UUID) (*User, error)

func (*Store) GetEmailsByIDs

func (s *Store) GetEmailsByIDs(ctx context.Context, ids []uuid.UUID) (map[uuid.UUID]string, error)

GetEmailsByIDs returns user_id -> email.

func (*Store) GetIDByUsername

func (s *Store) GetIDByUsername(ctx context.Context, username string) (uuid.UUID, error)

func (*Store) GetUsernamesByIDs

func (s *Store) GetUsernamesByIDs(ctx context.Context, ids []uuid.UUID) (map[uuid.UUID]string, error)

GetUsernamesByIDs returns user_id -> username (empty if NULL).

func (*Store) GetUsersByIDs

func (s *Store) GetUsersByIDs(ctx context.Context, ids []uuid.UUID) (map[uuid.UUID]struct{ Username, Email string }, error)

GetUsersByIDs returns username+email pairs for given IDs.

func (*Store) UpdateEmail

func (s *Store) UpdateEmail(ctx context.Context, id uuid.UUID, email string) error

func (*Store) UpdateUsername

func (s *Store) UpdateUsername(ctx context.Context, id uuid.UUID, username string) error

type User

type User struct {
	ID            uuid.UUID
	Email         string
	Username      *string
	EmailVerified bool
}

Jump to

Keyboard shortcuts

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