Documentation ¶
Index ¶
Constants ¶
View Source
const ( LOCAL_URL = "http://localhost:3000" VERIFY_EMAIL_ROUTE = "register/verify_email" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JWTService ¶
type JWTService interface { GenerateToken(userId string, role string) string ValidateToken(token string) (*jwt.Token, error) GetPayloadInsideToken(token string) (string, string, error) }
func NewJWTService ¶
func NewJWTService() JWTService
type TransaksiService ¶
type TransaksiService interface { CreateTransaksi(userId string, req dto.CreateTransaksiRequest) (dto.CreateTransaksiResponse, error) GetAllTransaksi(ownerId string, role string) (dto.GetAllTransaksiResponse, error) GetDetailTransaksi(transaksiId string) (dto.GetDetailTransaksiResponse, error) UpdateTransaksi(transaksiId string, req dto.UpdateTransaksiRequest) (dto.UpdateTransaksiResponse, error) DeleteTransaksi(transaksiId string) error }
func NewTransaksiService ¶
func NewTransaksiService(transaksiRepo repository.TransaksiRepository, jwtService JWTService) TransaksiService
type UserService ¶
type UserService interface { RegisterUser(ctx context.Context, req dto.UserCreateRequest) (dto.UserResponse, error) GetUserById(ctx context.Context, userId string) (dto.UserResponse, error) Verify(ctx context.Context, req dto.UserLoginRequest) (dto.UserLoginResponse, error) }
func NewUserService ¶
func NewUserService(userRepo repository.UserRepository, jwtService JWTService) UserService
Click to show internal directories.
Click to hide internal directories.