Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type UserRepository ¶
type UserRepository interface {
Create(ctx context.Context, user *model.User) error // 注意使用 model.User
GetByID(ctx context.Context, id int64) (*model.User, error)
Update(ctx context.Context, user *model.User) error
Delete(ctx context.Context, id int64) error
List(ctx context.Context) ([]*model.User, error)
}
func NewUserMySQLRepository ¶
func NewUserMySQLRepository(db *bun.DB) UserRepository
Click to show internal directories.
Click to hide internal directories.