suser

package
v0.0.0-...-36d6306 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUserNotFound = sql.ErrNoRows

Functions

This section is empty.

Types

type Reader

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

func NewReader

func NewReader(db *sql.DB) *Reader

func NewReaderFromQueries

func NewReaderFromQueries(queries *gen.Queries) *Reader

func (*Reader) CheckUserBelongsToWorkspace

func (r *Reader) CheckUserBelongsToWorkspace(ctx context.Context, userID idwrap.IDWrap, workspaceID idwrap.IDWrap) (bool, error)

func (*Reader) GetUser

func (r *Reader) GetUser(ctx context.Context, id idwrap.IDWrap) (*muser.User, error)

WARNING: this is also get user password hash do not use for public api

func (*Reader) GetUserByEmail

func (r *Reader) GetUserByEmail(ctx context.Context, email string) (*muser.User, error)

func (*Reader) GetUserByExternalID

func (r *Reader) GetUserByExternalID(ctx context.Context, externalID string) (*muser.User, error)

func (*Reader) GetUserWithOAuthIDAndType

func (r *Reader) GetUserWithOAuthIDAndType(ctx context.Context, oauthID string, oauthType muser.ProviderType) (*muser.User, error)

WARNING: this is also get user password hash do not use for public api

type UserService

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

func New

func New(queries *gen.Queries) UserService

func (UserService) CheckUserBelongsToWorkspace

func (us UserService) CheckUserBelongsToWorkspace(ctx context.Context, userID idwrap.IDWrap, workspaceID idwrap.IDWrap) (bool, error)

func (UserService) CreateUser

func (us UserService) CreateUser(ctx context.Context, user *muser.User) error

func (UserService) DeleteUser

func (us UserService) DeleteUser(ctx context.Context, id idwrap.IDWrap) error

func (UserService) GetUser

func (us UserService) GetUser(ctx context.Context, id idwrap.IDWrap) (*muser.User, error)

WARNING: this is also get user password hash do not use for public api

func (UserService) GetUserByEmail

func (us UserService) GetUserByEmail(ctx context.Context, email string) (*muser.User, error)

func (UserService) GetUserByExternalID

func (us UserService) GetUserByExternalID(ctx context.Context, externalID string) (*muser.User, error)

func (UserService) GetUserWithOAuthIDAndType

func (us UserService) GetUserWithOAuthIDAndType(ctx context.Context, oauthID string, oauthType muser.ProviderType) (*muser.User, error)

WARNING: this is also get user password hash do not use for public api

func (UserService) Reader

func (us UserService) Reader() *Reader

func (UserService) TX

func (us UserService) TX(tx *sql.Tx) UserService

func (UserService) UpdateUser

func (us UserService) UpdateUser(ctx context.Context, user *muser.User) error

type Writer

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

func NewWriter

func NewWriter(tx gen.DBTX) *Writer

func NewWriterFromQueries

func NewWriterFromQueries(queries *gen.Queries) *Writer

func (*Writer) CreateUser

func (w *Writer) CreateUser(ctx context.Context, user *muser.User) error

func (*Writer) DeleteUser

func (w *Writer) DeleteUser(ctx context.Context, id idwrap.IDWrap) error

func (*Writer) UpdateUser

func (w *Writer) UpdateUser(ctx context.Context, user *muser.User) error

Jump to

Keyboard shortcuts

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