repo

package
v0.0.0-rc8 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// User errors
	ErrDuplicateUser = fmt.Errorf("duplicate user")

	// Master Profile errors
	ErrDuplicateMasterProfile       = fmt.Errorf("duplicate master profile")
	ErrUserForMasterProfileNotExist = fmt.Errorf("user for master profile does not exist")
)

Functions

This section is empty.

Types

type BannedTokenRepository

type BannedTokenRepository interface {
	CreateOrUpdateBannedToken(ctx context.Context, bannedToken *model2.BannedTokenEntity) (*model2.BannedTokenEntity, error)
	ExistsBannedTokenByJTI(ctx context.Context, jti string) (bool, error)
	DeleteExpiredBannedToken(ctx context.Context) error
}

type MasterProfileRepository

type MasterProfileRepository interface {
	CreateMasterProfile(ctx context.Context, masterProfile *model2.MasterProfileEntity) (*model2.MasterProfileEntity, error)
	UpdateMasterProfile(ctx context.Context, masterProfile *model2.MasterProfileEntity) (*model2.MasterProfileEntity, error)
	FindMasterProfiles(
		ctx context.Context,
		filter map[model2.MasterProfileFilter]interface{},
		pagination *model2.Pagination,
		sort []*model2.Sort,
	) ([]*model2.MasterProfileEntity, error)
	CountMasterProfiles(
		ctx context.Context,
		filter map[model2.MasterProfileFilter]interface{},
	) (int64, error)
	FindMasterProfileByUserId(ctx context.Context, id uuid.UUID) (*model2.MasterProfileEntity, error)
	FindEnabledMasterProfileByUsername(ctx context.Context, username string) (*model2.MasterProfileEntity, error)
	ExistsMasterProfileByUserId(ctx context.Context, id uuid.UUID) (bool, error)
}

type UserRepository

type UserRepository interface {
	CreateUser(ctx context.Context, user *model2.UserEntity) (*model2.UserEntity, error)
	UpdateUser(ctx context.Context, user *model2.UserEntity) (*model2.UserEntity, error)
	FindUserById(ctx context.Context, id uuid.UUID, rolePreload bool) (*model2.UserEntity, error)
	FindUserByUsername(ctx context.Context, username string, rolePreload bool) (*model2.UserEntity, error)
	FindUserByEmail(ctx context.Context, email string, rolePreload bool) (*model2.UserEntity, error)
	FindUserByUsernameOrEmail(ctx context.Context, login string, rolePreload bool) (*model2.UserEntity, error)
	ExistsUserById(ctx context.Context, id uuid.UUID) (bool, error)
	ExistsUserByUsername(ctx context.Context, username string) (bool, error)
	ExistsUserByEmail(ctx context.Context, email string) (bool, error)
	ExistsUserByUsernameOrEmail(ctx context.Context, username string, email string) (bool, error)
	DeleteExpiredUser(ctx context.Context) (*model2.UserEntity, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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