Documentation ¶
Index ¶
- Constants
- Variables
- type GetAllPaymentResponse
- type GetAllRegistrantRepositoryResponse
- type GetAllShortenLinkRepositoryResponse
- type GetAllUserRepositoryResponse
- type IdentitasPersonRequest
- type IdentitasPersonResponse
- type IdentitasTimRequest
- type IdentitasTimResponse
- type PaginationRequest
- type PaginationResponse
- type PaymentPaginationResponse
- type PaymentRequest
- type PaymentResponse
- type RegistrantCreateRequest
- type RegistrantCreateResponse
- type RegistrantDetailRequest
- type RegistrantDetailResponse
- type RegistrantPaginationResponse
- type RegistrantUpdateRequest
- type RegistrantUpdateResponse
- type SendVerificationEmailRequest
- type ShortenLinkCreateRequest
- type ShortenLinkCreateResponse
- type ShortenLinkPaginationResponse
- type ShortenLinkUpdateRequest
- type ShortenLinkUpdateResponse
- type UpdateStatusIsVerifiedRequest
- type UserCreateRequest
- type UserLoginRequest
- type UserLoginResponse
- type UserPaginationResponse
- type UserResponse
- type UserUpdateRequest
- type UserUpdateResponse
- type VerifyEmailRequest
- type VerifyEmailResponse
Constants ¶
View Source
const ( MESSAGE_FAILED_CREATE_REGISTRATION = "failed registered for IoI Competition" MESSAGE_SUCCESS_CREATE_REGISTRATION = "successfully registered for IoI Competition" MESSAGE_FAILED_UPDATE_REGISTRATION = "failed updated for IoI Competition" MESSAGE_SUCCESS_UPDATE_REGISTRATION = "successfully updated for IoI Competition" )
Error messages
View Source
const ( // Failed MESSAGE_FAILED_GET_DATA_FROM_BODY = "failed get data from body" MESSAGE_FAILED_REGISTER_USER = "failed create user" MESSAGE_FAILED_GET_LIST_USER = "failed get list user" MESSAGE_FAILED_GET_USER_TOKEN = "failed get user token" MESSAGE_FAILED_TOKEN_NOT_VALID = "token not valid" MESSAGE_FAILED_TOKEN_NOT_FOUND = "token not found" MESSAGE_FAILED_GET_USER = "failed get user" MESSAGE_FAILED_LOGIN = "failed login" MESSAGE_FAILED_WRONG_EMAIL_OR_PASSWORD = "wrong email or password" MESSAGE_FAILED_UPDATE_USER = "failed update user" MESSAGE_FAILED_DELETE_USER = "failed delete user" MESSAGE_FAILED_PROSES_REQUEST = "failed proses request" MESSAGE_FAILED_DENIED_ACCESS = "denied access" MESSAGE_FAILED_VERIFY_EMAIL = "failed verify email" // Success MESSAGE_SUCCESS_REGISTER_USER = "success create user" MESSAGE_SUCCESS_GET_LIST_USER = "success get list user" MESSAGE_SUCCESS_GET_USER = "success get user" MESSAGE_SUCCESS_LOGIN = "success login" MESSAGE_SUCCESS_UPDATE_USER = "success update user" MESSAGE_SUCCESS_DELETE_USER = "success delete user" MESSAGE_SEND_VERIFICATION_EMAIL_SUCCESS = "success send verification email" MESSAGE_SUCCESS_VERIFY_EMAIL = "success verify email" MESSAGE_SUCCESS_REGISTER_USER_DETAIL = "success register user detail" )
Variables ¶
View Source
var ( ErrCreateregistrant = errors.New("failed to create registrant") ErrGetAllregistrant = errors.New("failed to get all registrant") ErrGetregistrantById = errors.New("failed to get registrant by id") ErrGetregistrantByEmail = errors.New("failed to get registrant by email") ErrUpdateregistrant = errors.New("failed to update registrant") ErrregistrantNotFound = errors.New("registrant not found") ErrRegistrantEmailAlreadyExists = errors.New("email already exist") )
Error variables
View Source
var ( ErrCreateUser = errors.New("failed to create user") ErrGetAllUser = errors.New("failed to get all user") ErrGetUserById = errors.New("failed to get user by id") ErrGetUserByEmail = errors.New("failed to get user by email") ErrEmailAlreadyExists = errors.New("email already exist") ErrUpdateUser = errors.New("failed to update user") ErrUserNotAdmin = errors.New("user not admin") ErrUserNotFound = errors.New("user not found") ErrEmailNotFound = errors.New("email not found") ErrDeleteUser = errors.New("failed to delete user") ErrPasswordNotMatch = errors.New("password not match") ErrEmailOrPassword = errors.New("wrong email or password") ErrAccountNotVerified = errors.New("account not verified") ErrTokenInvalid = errors.New("token invalid") ErrTokenExpired = errors.New("token expired") ErrAccountAlreadyVerified = errors.New("account already verified") ErrAccountDetailsNotFound = errors.New("account details not found") )
Functions ¶
This section is empty.
Types ¶
type GetAllPaymentResponse ¶
type GetAllPaymentResponse struct { Payments []entity.Payments PaginationResponse }
type GetAllRegistrantRepositoryResponse ¶
type GetAllRegistrantRepositoryResponse struct { Registrants []entity.EventRegistrants PaginationResponse }
type GetAllShortenLinkRepositoryResponse ¶
type GetAllShortenLinkRepositoryResponse struct { ShortenLink []entity.ShortenLink PaginationResponse }
type GetAllUserRepositoryResponse ¶
type GetAllUserRepositoryResponse struct { Users []entity.Account PaginationResponse }
type IdentitasPersonRequest ¶
type IdentitasPersonRequest struct { Name string `json:"name" form:"name" binding:"required"` Email string `json:"email" form:"email" binding:"required"` PhoneNumber string `json:"phone_number" form:"phone_number" binding:"required"` ImgIdentity string `json:"img_identity" form:"img_identity" binding:"required"` ImgFollowInstagram string `json:"img_follow_instagram" form:"img_follow_instagram" binding:"required"` LinkTwibbon string `json:"link_twibbon" form:"link_twibbon" binding:"required"` Role string `json:"role" form:"role" binding:"required"` Registrant_ID string `json:"registrant_id" form:"registrant_id" binding:"required"` }
type IdentitasPersonResponse ¶
type IdentitasTimRequest ¶
type IdentitasTimResponse ¶
type PaginationRequest ¶
type PaginationRequest struct { Search string `form:"search"` Page int `form:"page"` PerPage int `form:"per_page"` }
func (*PaginationRequest) GetOffset ¶
func (p *PaginationRequest) GetOffset() int
type PaginationResponse ¶
type PaginationResponse struct { Page int `json:"page"` PerPage int `json:"per_page"` MaxPage int64 `json:"max_page"` Count int64 `json:"count"` }
func (*PaginationResponse) GetLimit ¶
func (p *PaginationResponse) GetLimit() int
func (*PaginationResponse) GetPage ¶
func (p *PaginationResponse) GetPage() int
type PaymentPaginationResponse ¶
type PaymentPaginationResponse struct { Data []PaymentResponse `json:"data"` PaginationResponse }
type PaymentRequest ¶
type PaymentRequest struct { Bank_ID string `json:"bank_list"` Bank_Transfer_From string `json:"bank_transfer_from"` Name_Transfer_From string `json:"name_transfer_from"` Amount int64 `json:"amount"` Payment_Method constants.PaymentMethod `json:"payment_method"` Payment_Proof string `json:"payment_proof"` }
Payment Structures
type PaymentResponse ¶
type PaymentResponse struct { Payment_ID string `json:"payment_id"` Registrant_ID string `json:"registrant_id"` Bank_Transfer_From string `json:"bank_transfer_from"` Name_Transfer_From string `json:"name_transfer_from"` Amount float64 `json:"amount"` Payment_Method string `json:"payment_method"` Payment_Proof string `json:"payment_proof"` Status string `json:"status"` }
type RegistrantCreateRequest ¶
type RegistrantCreateRequest struct { RegistrantDetails []RegistrantDetailRequest `json:"registrant_details" form:"registrant_details"` PaymentDetails PaymentRequest `json:"payment_details" form:"payment_details"` }
type RegistrantCreateResponse ¶
type RegistrantCreateResponse struct { RegistrantDetails []RegistrantDetailResponse `json:"registrant_details"` PaymentDetails PaymentResponse `json:"payment_details"` }
Response DTOs
type RegistrantDetailRequest ¶
type RegistrantDetailRequest struct { IdentitasTim IdentitasTimRequest `json:"identitas_tim" form:"identitas_tim"` IdentitasKetua IdentitasPersonRequest `json:"identitas_ketua" form:"identitas_ketua"` IdentitasAnggota IdentitasPersonRequest `json:"identitas_anggota" form:"identitas_anggota"` }
Detail Structure for Registrant
type RegistrantDetailResponse ¶
type RegistrantDetailResponse struct { IdentitasTim IdentitasTimResponse `json:"identitas_tim"` IdentitasKetua IdentitasPersonResponse `json:"identitas_ketua"` IdentitasAnggota IdentitasPersonResponse `json:"identitas_anggota"` }
type RegistrantPaginationResponse ¶
type RegistrantPaginationResponse struct { Data []RegistrantCreateResponse `json:"data"` PaginationResponse }
type RegistrantUpdateRequest ¶
type RegistrantUpdateRequest struct { RegistrantDetails []RegistrantDetailRequest `json:"registrant_details" form:"registrant_details"` PaymentDetails PaymentRequest `json:"payment_details" form:"payment_details"` }
type RegistrantUpdateResponse ¶
type RegistrantUpdateResponse struct { Status constants.CompStatus `json:"status"` RegistrantDetails []RegistrantDetailResponse `json:"registrant_details"` PaymentDetails PaymentResponse `json:"payment_details"` }
type SendVerificationEmailRequest ¶
type SendVerificationEmailRequest struct {
Email string `json:"email" form:"email" binding:"required"`
}
type ShortenLinkCreateResponse ¶
type ShortenLinkCreateResponse struct {
Link string `json:"link" `
}
type ShortenLinkPaginationResponse ¶
type ShortenLinkPaginationResponse struct { Data []ShortenLinkCreateResponse `json:"data"` PaginationResponse }
type ShortenLinkUpdateResponse ¶
type ShortenLinkUpdateResponse struct {
Link string `json:"link" `
}
type UserCreateRequest ¶
type UserLoginRequest ¶
type UserLoginResponse ¶
type UserPaginationResponse ¶
type UserPaginationResponse struct { Data []UserResponse `json:"data"` PaginationResponse }
type UserResponse ¶
type UserResponse struct { ID string `json:"id"` Email string `json:"email"` IsEmailVerified bool `json:"is_verified"` Role string `json:"role"` Name string `json:"name" form:"name"` Phone_Number string `json:"phone_number" form:"phone_number"` Jenjang constants.Jenjang `json:"jenjang" form:"jenjang"` }
type UserUpdateRequest ¶
type UserUpdateResponse ¶
type VerifyEmailRequest ¶
type VerifyEmailRequest struct {
Token string `json:"token" form:"token" binding:"required"`
}
type VerifyEmailResponse ¶
Click to show internal directories.
Click to hide internal directories.