Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrAddingToCollection = errors.New("error adding cube to the collection") ErrCubeAlreadyInCollection = errors.New("cube already in collection") )
View Source
var ( ErrUserAlreadyExists = errors.New("user already exists") ErrInvalidCredentials = errors.New("invalid credentials") )
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service interface { RegisterUser(ctx context.Context, userEmail, name, password string) error LoginUser(ctx context.Context, userEmail, password string) (*models.User, error) AddCube(ctx context.Context, userEmail, name, brand, shape, image string) error DeleteCube(ctx context.Context, userEmail string, cubeID int64) error AddCubeToCollection(ctx context.Context, userEmail string, cubeID int64) error GetOwnedCubes(ctx context.Context, useEmail string) ([]models.Cube, error) RemoveCubeFromCollection(ctx context.Context, userEmail string, cubeID int64) error }
func New ¶
func New(_repo repository.Repository) Service
Click to show internal directories.
Click to hide internal directories.