package
Version:
v0.0.0-...-bd28b0e
Opens a new window with list of versions in this module.
Published: Nov 22, 2021
License: MIT
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type CreateAccountRequest struct {
Owner string `json:"owner" binding:"required"`
Currency string `json:"currency" binding:"required,currency"`
}
type GetAccountRequest struct {
ID int64 `uri:"id" binding:"required,min=1"`
}
type ListAccountRequest struct {
PageID int32 `form:"page_id" binding:"required,min=1"`
PageSize int32 `form:"page_size" binding:"required,min=5,max=10"`
}
Server serves HTTP request fpr pur banking service.
NewServer creates new HTTP server and setup routing
Start run HTTP server for specific address.
type TransferRequest struct {
FromAccountID int64 `json:"from_account_id" binding:"required,min=1"`
ToAccountID int64 `json:"to_account_id" binding:"required,min=1"`
Amount int64 `json:"amount" binding:"required,gt=0"`
Currency string `json:"currency" binding:"required,currency"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.