Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateAccountParams ¶
type CreateAccountParams struct {
Currency string `json:"currency" binding:"required,currency"`
}
type CreateUserParams ¶
type CreateUserParams struct { Username string `json:"username" binding:"required,min=6,alphanum"` // alphanum: only allow alphanumeric characters Password string `json:"password" binding:"required,min=6"` FullName string `json:"full_name" binding:"required,min=1,max=100"` Email string `json:"email" binding:"required,email"` }
type GetAccountParams ¶
type GetAccountParams struct {
ID int64 `uri:"id" binding:"required,min=1"` // uri: path parameter
}
type ListAccountParams ¶
type LoginParams ¶
type LoginResponse ¶
type LoginResponse struct { AccessToken string `json:"access_token"` User UserResponse `json:"user"` }
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server serves HTTP requests for our banking service.
type TransferInputParams ¶
type TransferInputParams 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"` }
TransferTxParams contains the input parameters of the transfer transaction
type UpdateAccountBalanceJSON ¶
type UpdateAccountBalanceJSON struct {
Amount int64 `json:"amount" binding:"required,ne=0"`
}
type UpdateAccountBalanceUri ¶
type UpdateAccountBalanceUri struct {
ID int64 `uri:"id" binding:"required,min=1"` // uri: path parameter
}
Click to show internal directories.
Click to hide internal directories.