Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API contains each part of the API settings.
func (*API) NewGrpcConnection ¶
NewGrpcConnection makes a new connection on the gRPC server.
type AccountIn ¶
type AccountIn struct {
ID string `path:"id" description:"Account ID"`
}
AccountIn represents an account. It is used as argument in controllers.
type Health ¶
type Health struct {
// Status is the API health status.
Status string `json:"status" description:"API health status."`
}
Health represents the API health status.
type ResponseBalanceOut ¶
type ResponseBalanceOut struct {
// AccountID is the targeted account id.
AccountID uuid.UUID `json:"account_id" description:"Targeted Account ID"`
// Balance is the targeted account balance.
Balance int64 `json:"balance" description:"Targeted Account balance (updated after the transaction)"`
}
ResponseBalanceOut is used to give a response on a balance route.
type ResponseTransactionOut ¶
type ResponseTransactionOut struct {
// AccountID is the id of the account targeted by the transaction.
AccountID uuid.UUID `json:"account_id" description:"Targeted Account ID"`
// Balance is the targeted account balance.
Balance int64 `json:"balance" description:"Targeted Account balance (updated after the transaction)"`
// TransactionID is the transaction id.
TransactionID uuid.UUID `json:"transaction_id" description:"Transaction ID"`
// CreatedAt is the transaction creation date.
CreatedAt time.Time `json:"created_at" description:"Transaction creation date"`
}
ResponseTransactionOut represents a response after a transaction is added or updated.
type TransactionIn ¶
type TransactionIn struct {
// AccountID is the id of the account targeted by the transaction.
AccountID uuid.UUID `json:"account_id" description:"Targeted Account ID" validate:"required"`
// Amount is the transaction amount.
Amount int64 `json:"amount" description:"Transaction amount" validate:"required"`
// Description is the transaction description.
Description string `json:"description" description:"Transaction description"`
// Currency is the transaction currency.
Currency string `json:"currency" description:"Transaction currency"`
}
TransactionIn represents a transaction. It is used as argument in controllers.
type UpdateTransactionIn ¶
type UpdateTransactionIn struct {
// ID is the transaction ID.
ID uuid.UUID `json:"id" description:"Transaction ID" validate="required"`
// AccountID is the id of the account targeted by the transaction.
AccountID uuid.UUID `json:"account_id" description:"Targeted Account ID" validate:"required"`
// Amount is the transaction amount.
Amount int64 `json:"amount" description:"Transaction amount" validate:"required"`
}
UpdateTransactionIn represents a transaction. It is used as argument in the update controller.
Click to show internal directories.
Click to hide internal directories.