Documentation ¶
Index ¶
- type MockUserRepo
- func (mur *MockUserRepo) CreateUser(ctx context.Context, params user.UserCommand) (string, error)
- func (mur *MockUserRepo) GetListFeatureByProductID(ctx context.Context, productID int32) ([]user.FeatureQuery, error)
- func (mur *MockUserRepo) GetListProduct(ctx context.Context) ([]user.ProductQuery, error)
- func (mur *MockUserRepo) GetListUserByUsername(ctx context.Context, username string) ([]user.UserQuery, error)
- func (mur *MockUserRepo) GetProductByUserID(ctx context.Context, userID string) (user.ProductQuery, error)
- func (mur *MockUserRepo) GetUser(ctx context.Context, params string) (user.User, error)
- func (mur *MockUserRepo) GetUserExistance(ctx context.Context, username string) (bool, error)
- type MockUserRepository
- type MySQLUserRepository
- type PostgresUserRepository
- func (r *PostgresUserRepository) CreateUser(ctx context.Context, params user.UserCommand) (string, error)
- func (r *PostgresUserRepository) GetListFeatureByProductID(ctx context.Context, productID int32) ([]user.FeatureQuery, error)
- func (r *PostgresUserRepository) GetListProduct(ctx context.Context) ([]user.ProductQuery, error)
- func (r *PostgresUserRepository) GetListUserByUsername(ctx context.Context, username string) ([]user.UserQuery, error)
- func (r *PostgresUserRepository) GetProductByUserID(ctx context.Context, userID string) (user.ProductQuery, error)
- func (r *PostgresUserRepository) GetUser(ctx context.Context, params string) (user.User, error)
- func (r *PostgresUserRepository) GetUserExistance(ctx context.Context, username string) (bool, error)
- type ProductRepoQuery
- type UserRepo
- type UserRepository
- type Username
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockUserRepo ¶
type MockUserRepo struct {
User *MockUserRepository
}
func NewMockUserRepo ¶
func NewMockUserRepo() *MockUserRepo
func (*MockUserRepo) CreateUser ¶
func (mur *MockUserRepo) CreateUser( ctx context.Context, params user.UserCommand, ) (string, error)
func (*MockUserRepo) GetListFeatureByProductID ¶
func (mur *MockUserRepo) GetListFeatureByProductID( ctx context.Context, productID int32, ) ([]user.FeatureQuery, error)
func (*MockUserRepo) GetListProduct ¶
func (mur *MockUserRepo) GetListProduct( ctx context.Context, ) ([]user.ProductQuery, error)
func (*MockUserRepo) GetListUserByUsername ¶
func (*MockUserRepo) GetProductByUserID ¶
func (mur *MockUserRepo) GetProductByUserID( ctx context.Context, userID string, ) (user.ProductQuery, error)
TODO: Implement this
func (*MockUserRepo) GetUserExistance ¶
type MockUserRepository ¶
type MySQLUserRepository ¶
func NewMySQLUserRepository ¶
func NewMySQLUserRepository(sqlRepo *database.SqlRepository) *MySQLUserRepository
func (*MySQLUserRepository) CreateUser ¶
func (*MySQLUserRepository) GetUserExistance ¶
type PostgresUserRepository ¶
type PostgresUserRepository struct { Postgres *userpostgres.Queries // contains filtered or unexported fields }
func NewPostgresUserRepository ¶
func NewPostgresUserRepository(sqlRepo *database.SqlRepository) *PostgresUserRepository
func (*PostgresUserRepository) CreateUser ¶
func (r *PostgresUserRepository) CreateUser( ctx context.Context, params user.UserCommand, ) (string, error)
func (*PostgresUserRepository) GetListFeatureByProductID ¶
func (r *PostgresUserRepository) GetListFeatureByProductID( ctx context.Context, productID int32, ) ([]user.FeatureQuery, error)
func (*PostgresUserRepository) GetListProduct ¶
func (r *PostgresUserRepository) GetListProduct( ctx context.Context, ) ([]user.ProductQuery, error)
func (*PostgresUserRepository) GetListUserByUsername ¶
func (*PostgresUserRepository) GetProductByUserID ¶
func (r *PostgresUserRepository) GetProductByUserID( ctx context.Context, userID string, ) (user.ProductQuery, error)
func (*PostgresUserRepository) GetUserExistance ¶
type ProductRepoQuery ¶
type UserRepo ¶
type UserRepo interface { UserRepository ProductRepoQuery }
type UserRepository ¶
type UserRepository interface { GetUser( ctx context.Context, params string, ) (user.User, error) GetListUserByUsername( ctx context.Context, username string, ) ([]user.UserQuery, error) GetUserExistance( ctx context.Context, username string, ) (bool, error) CreateUser( ctx context.Context, params user.UserCommand, ) (string, error) }
Click to show internal directories.
Click to hide internal directories.