Documentation ¶
Index ¶
- Variables
- type SQLUserProvider
- func (up *SQLUserProvider) Create(ctx context.Context, u User) (User, error)
- func (up *SQLUserProvider) Delete(ctx context.Context, idString string) error
- func (up *SQLUserProvider) Get(ctx context.Context, ent string) (User, error)
- func (up SQLUserProvider) List(ctx context.Context, offset, limit int) ([]User, error)
- func (up *SQLUserProvider) Update(ctx context.Context, u User) error
- type User
- type UserRepo
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrAppNotFound = errors.New("not found") ErrAppNotImplemented = errors.New("not implemented") )
Functions ¶
This section is empty.
Types ¶
type SQLUserProvider ¶
type SQLUserProvider struct {
// contains filtered or unexported fields
}
func NewSQLUserProvider ¶
func NewSQLUserProvider(repo UserRepo) (*SQLUserProvider, error)
func (*SQLUserProvider) Delete ¶
func (up *SQLUserProvider) Delete(ctx context.Context, idString string) error
type UserRepo ¶
type UserRepo interface { CreateUser(ctx context.Context, u User) (User, error) FindUserByID(ctx context.Context, id int) (User, error) FindUserByName(ctx context.Context, name string) (User, error) DeleteUser(ctx context.Context, id int) error UpdateUser(ctx context.Context, u User) error ListUsers(ctx context.Context, offset, limit int) ([]User, error) }
Click to show internal directories.
Click to hide internal directories.