Documentation ¶
Index ¶
- type CreateTagRequest
- type DeleteTagRequest
- type ErrorResponse
- type FetchAllResponse
- type FetchTagRequest
- type FetchTagResponse
- type GetByIDResponse
- type GetTagByIDRequest
- type JwtCustomClaims
- type JwtCustomRefreshClaims
- type LoginRequest
- type LoginResponse
- type LoginUsecase
- type Pagination
- type Profile
- type ProfileUsecase
- type RefreshTokenRequest
- type RefreshTokenResponse
- type RefreshTokenUsecase
- type Response
- type SignupRequest
- type SignupResponse
- type SignupUsecase
- type Tag
- type TagInfo
- type TagRepository
- type TagUsecase
- type UpdateTagRequest
- type User
- type UserRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateTagRequest ¶
type DeleteTagRequest ¶
type DeleteTagRequest struct {
ID uint64 `path:"id"`
}
type ErrorResponse ¶
type ErrorResponse struct {
Message string `json:"message"`
}
type FetchAllResponse ¶
type FetchTagRequest ¶
type FetchTagResponse ¶
type FetchTagResponse struct { Response Data []TagInfo `json:"data"` Pagination `json:"pagination"` }
type GetByIDResponse ¶
type GetTagByIDRequest ¶
type GetTagByIDRequest struct {
ID uint64 `path:"id"`
}
type JwtCustomClaims ¶
type JwtCustomRefreshClaims ¶
type JwtCustomRefreshClaims struct { ID string `json:"id"` jwt.RegisteredClaims }
type LoginRequest ¶
type LoginResponse ¶
type LoginUsecase ¶
type Pagination ¶
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 TagRepository ¶
type TagRepository interface { Create(c context.Context, tag Tag) error Update(c context.Context, tag Tag) error Delete(c context.Context, tagID uint64) error GetByID(c context.Context, tagID uint64) (*Tag, error) Fetch(c context.Context, r FetchTagRequest) ([]Tag, *Pagination, error) FetchAll(c context.Context) ([]Tag, error) }
type TagUsecase ¶
type TagUsecase interface { Create(c context.Context, tag Tag) error Update(c context.Context, tag Tag) error Delete(c context.Context, tagID uint64) error GetByID(c context.Context, tagID uint64) (*Tag, error) Fetch(c context.Context, r FetchTagRequest) ([]Tag, *Pagination, error) FetchAll(c context.Context) ([]Tag, error) }
type UpdateTagRequest ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.