Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct { ID uuid.UUID Username string Email string Image *string Password string AccountAddresses []string }
func (*User) CheckPassword ¶
func (*User) DecodePassword ¶
func (*User) EncodePassword ¶
func (*User) HasAccount ¶
type UserRepository ¶
type UserRepository interface { Save(context.Context, User) error Get(ctx context.Context, ID uuid.UUID) (User, error) GetAll(ctx context.Context) ([]User, error) }
func NewUserRepository ¶
func NewUserRepository(storagePath string) UserRepository
type UserService ¶
type UserService interface { Register(ctx context.Context, userName string, email string, password string) error Login(ctx context.Context, userName string, password string) (*User, error) GetByID(ctx context.Context, userID uuid.UUID) (*User, error) GetByEmail(ctx context.Context, email string) (*User, error) AddAccount(ctx context.Context, userID uuid.UUID, password string) (string, error) GetBalance(ctx context.Context, userID uuid.UUID, address string) (balanceFiat string, balanceETH string, err error) }
func NewUserService ¶
func NewUserService(userRepository UserRepository, accountService accounts.AccountService, priceService price.PriceService) UserService
Click to show internal directories.
Click to hide internal directories.