56e7b9a9a83fe5aabd41f98555d46f937889d9fc.svn-base 381 B

12345678910111213141516
  1. package user
  2. import "context"
  3. type UserService interface {
  4. CheckPassword(ctx context.Context, username string, password string) (bool, error)
  5. }
  6. type UserServiceImpl struct{}
  7. func (s UserServiceImpl) CheckPassword(ctx context.Context, username string, password string) (bool, error) {
  8. if username == "admin" && password == "admin" {
  9. return true, nil
  10. }
  11. return false, nil
  12. }