Documentation ¶
Index ¶
- Constants
- type ErrorResponse
- type JwtCustomClaims
- type JwtCustomRefreshClaims
- type LoginRequest
- type LoginResponse
- type LoginUsecase
- type Profile
- type ProfileUsecase
- type RefreshTokenRequest
- type RefreshTokenResponse
- type RefreshTokenUsecase
- type SignupRequest
- type SignupResponse
- type SignupUsecase
- type SuccessResponse
- type Task
- type TaskRepository
- type TaskUsecase
- type User
- type UserRepository
Constants ¶
View Source
const (
CollectionTask = "tasks"
)
View Source
const (
CollectionUser = "users"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorResponse ¶
type ErrorResponse struct {
Message string `json:"message"`
}
type JwtCustomClaims ¶
type JwtCustomRefreshClaims ¶
type JwtCustomRefreshClaims struct { ID string `json:"id"` jwt.StandardClaims }
type LoginRequest ¶
type LoginResponse ¶
type LoginUsecase ¶
type ProfileUsecase ¶
type RefreshTokenRequest ¶
type RefreshTokenRequest struct {
RefreshToken string `form:"refreshToken" binding:"required"`
}
type RefreshTokenResponse ¶
type RefreshTokenUsecase ¶
type RefreshTokenUsecase interface { GetUserByID(c context.Context, id string) (User, error) CreateAccessToken(user *User, secret string, expiry int) (accessToken string, err error) CreateRefreshToken(user *User, secret string, expiry int) (refreshToken string, err error) ExtractIDFromToken(requestToken string, secret string) (string, error) }
type SignupRequest ¶
type SignupResponse ¶
type SignupUsecase ¶
type SignupUsecase interface { Create(c context.Context, user *User) error GetUserByEmail(c context.Context, email string) (User, error) CreateAccessToken(user *User, secret string, expiry int) (accessToken string, err error) CreateRefreshToken(user *User, secret string, expiry int) (refreshToken string, err error) }
type SuccessResponse ¶
type SuccessResponse struct {
Message string `json:"message"`
}
type TaskRepository ¶
type TaskUsecase ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.