Documentation ¶
Index ¶
- func SetHeader(header http.Header, reqHeader *ReqHeaderTest1)
- type Dber
- type Handle
- func (h *Handle) ExecuteAddBalance(c echo.Context) error
- func (h *Handle) ExecuteCreateNewWallet(c echo.Context) error
- func (h *Handle) ExecuteDeductBalance(c echo.Context) error
- func (h *Handle) ExecuteGetAllWallet(c echo.Context) error
- func (h *Handle) ExecuteGetWalletDetail(c echo.Context) error
- func (h *Handle) ExecuteTest1(c echo.Context) error
- func (h *Handle) ExecuteWalletStatus(c echo.Context) error
- type ReqHeaderTest1
- type ReqTest1
- type RequestAddBalance
- type RequestDeductBalance
- type RequestNewWallet
- type RequestWalletDetail
- type RequestWalletStatus
- type ResTest1
- type ResponseAddBalance
- type ResponseAllWallet
- type ResponseDeductBalance
- type ResponseNewWallet
- type ResponseWalletDetail
- type ResponseWalletStatus
- type Service
- func (s *Service) ApiGetAllWallet(c echo.Context) *ResponseAllWallet
- func (s *Service) ApiGetWalletDetail(c echo.Context, req RequestWalletDetail) *ResponseWalletDetail
- func (s *Service) ApiPostAddBalance(c echo.Context, req RequestAddBalance) *ResponseAddBalance
- func (s *Service) ApiPostCreatNewWallet(c echo.Context, req RequestNewWallet) *ResponseNewWallet
- func (s *Service) ApiPostDeductBalance(c echo.Context, req RequestDeductBalance) *ResponseDeductBalance
- func (s *Service) ApiPostWalletStatus(c echo.Context, req RequestWalletStatus) *ResponseWalletStatus
- func (s *Service) ApiTest1(c echo.Context, req ReqTest1) *ResTest1
- type Servicer
- type ValueAllWallet
- type ValueWalletDetail
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetHeader ¶
func SetHeader(header http.Header, reqHeader *ReqHeaderTest1)
Types ¶
type Dber ¶
type Dber interface { GetAllWallet() ([]repository.TbWallet, error) PostCreateNewWallet(req repository.TbWallet, reqWAcc repository.TbWalletAccount, reqTrans repository.TbTransaction) (int64, error) GetWalletDetail(cid, accNo string) ([]repository.TmpWalletDetail, error) PostAddBalance(req repository.TbTransaction, status string) (int64, error) PostDeductBalance(req repository.TbTransaction) (int64, error) PostWalletStatus(req repository.TbWalletAccount) (int64, error) }
type Handle ¶
type Handle struct {
// contains filtered or unexported fields
}
func (*Handle) ExecuteAddBalance ¶
func (*Handle) ExecuteCreateNewWallet ¶
func (*Handle) ExecuteDeductBalance ¶
func (*Handle) ExecuteGetAllWallet ¶
func (*Handle) ExecuteGetWalletDetail ¶
func (*Handle) ExecuteTest1 ¶
func (*Handle) ExecuteWalletStatus ¶
type ReqHeaderTest1 ¶
type ReqHeaderTest1 struct {
AppID string `validate:"nonzero" json:"app-id"`
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ test api
type RequestAddBalance ¶
type RequestDeductBalance ¶
type RequestNewWallet ¶
type RequestNewWallet struct { CitizenId string `validate:"nonzero,max=13,regexp=^[0-9]*$" json:"citizen_id"` Title string `validate:"nonzero,max=20,regexp=^[\u0E00-\u0E7Fa-zA-Z0-9-_:\\,.#$+/\\(\\)\\/\\s]*$" json:"title"` Firstname string `validate:"nonzero,max=50,regexp=^[\u0E00-\u0E7Fa-zA-Z0-9-_:\\,.#$+/\\(\\)\\/\\s]*$" json:"firstname"` Lastname string `validate:"nonzero,max=50,regexp=^[\u0E00-\u0E7Fa-zA-Z0-9-_:\\,.#$+/\\(\\)\\/\\s]*$" json:"lastname"` Address string `validate:"nonzero,max=200,regexp=^[\u0E00-\u0E7Fa-zA-Z0-9-_:\\,.#$+/\\(\\)\\/\\s]*$" json:"address"` Subdistrict string `validate:"nonzero,max=100,regexp=^[\u0E00-\u0E7Fa-zA-Z0-9-_:\\,.#$+/\\(\\)\\/\\s]*$" json:"subdistrict"` District string `validate:"nonzero,max=100,regexp=^[\u0E00-\u0E7Fa-zA-Z0-9-_:\\,.#$+/\\(\\)\\/\\s]*$" json:"district"` Province string `validate:"nonzero,max=100,regexp=^[\u0E00-\u0E7Fa-zA-Z0-9-_:\\,.#$+/\\(\\)\\/\\s]*$" json:"province"` ZipCode string `validate:"nonzero,max=5,regexp=^[0-9]*$" json:"zipcode"` Tel string `validate:"nonzero,max=20,regexp=^[0-9]*$" json:"tel"` AccountNo string `validate:"nonzero,max=10,regexp=^[0-9]*$" json:"account_no"` Remark string `validate:"max=250,regexp=^[\u0E00-\u0E7Fa-zA-Z0-9-_:\\,.#$+/\\(\\)\\/\\s]*$" json:"remark"` Amount float64 `validate:"nonzero,max=99999999.9999" json:"amount"` }
type RequestWalletDetail ¶
type RequestWalletStatus ¶
type ResponseAddBalance ¶
type ResponseAllWallet ¶
type ResponseAllWallet struct { RespCode string `json:"respCode"` RespDesc string `json:"respDesc"` RespDisplay string `json:"respDisplay"` Values []ValueAllWallet `json:"values"` }
type ResponseDeductBalance ¶
type ResponseNewWallet ¶
type ResponseWalletDetail ¶
type ResponseWalletDetail struct { RespCode string `json:"respCode"` RespDesc string `json:"respDesc"` RespDisplay string `json:"respDisplay"` Values []ValueWalletDetail `json:"values"` }
type ResponseWalletStatus ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) ApiGetAllWallet ¶
func (s *Service) ApiGetAllWallet(c echo.Context) *ResponseAllWallet
func (*Service) ApiGetWalletDetail ¶
func (s *Service) ApiGetWalletDetail(c echo.Context, req RequestWalletDetail) *ResponseWalletDetail
func (*Service) ApiPostAddBalance ¶
func (s *Service) ApiPostAddBalance(c echo.Context, req RequestAddBalance) *ResponseAddBalance
func (*Service) ApiPostCreatNewWallet ¶
func (s *Service) ApiPostCreatNewWallet(c echo.Context, req RequestNewWallet) *ResponseNewWallet
func (*Service) ApiPostDeductBalance ¶
func (s *Service) ApiPostDeductBalance(c echo.Context, req RequestDeductBalance) *ResponseDeductBalance
func (*Service) ApiPostWalletStatus ¶
func (s *Service) ApiPostWalletStatus(c echo.Context, req RequestWalletStatus) *ResponseWalletStatus
type Servicer ¶
type Servicer interface { ApiGetAllWallet(c echo.Context) *ResponseAllWallet ApiPostCreatNewWallet(c echo.Context, req RequestNewWallet) *ResponseNewWallet ApiGetWalletDetail(c echo.Context, req RequestWalletDetail) *ResponseWalletDetail ApiPostAddBalance(c echo.Context, req RequestAddBalance) *ResponseAddBalance ApiPostDeductBalance(c echo.Context, req RequestDeductBalance) *ResponseDeductBalance ApiPostWalletStatus(c echo.Context, req RequestWalletStatus) *ResponseWalletStatus ApiTest1(c echo.Context, req ReqTest1) *ResTest1 }
type ValueAllWallet ¶
type ValueAllWallet struct { CitizenId string `json:"citizen_id"` Title string `json:"title"` Firstname string `json:"firstname"` Lastname string `json:"lastname"` Address string `json:"address"` Subdistrict string `json:"subdistrict"` District string `json:"district"` Province string `json:"province"` ZipCode string `json:"zipcode"` Tel string `json:"tel"` }
type ValueWalletDetail ¶
Click to show internal directories.
Click to hide internal directories.