Skip to content

Instantly share code, notes, and snippets.

@L04DB4L4NC3R
Created December 26, 2019 22:12
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save L04DB4L4NC3R/0f6862642ff871b1a754af9829c2ac18 to your computer and use it in GitHub Desktop.
Clean Arch
package user
import (
"context"
)
type Repository interface {
FindByID(ctx context.Context, id uint) (*User, error)
BuildProfile(ctx context.Context, user *User) (*User, error)
CreateMinimal(ctx context.Context, email, password, phoneNumber string) (*User, error)
FindByEmailAndPassword(ctx context.Context, email, password string) (*User, error)
FindByEmail(ctx context.Context, email string) (*User, error)
DoesEmailExist(ctx context.Context, email string) (bool, error)
ChangePassword(ctx context.Context, email, password string) error
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment