routers

package
v0.0.0-...-3c70edb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateAccountRequest

type CreateAccountRequest struct {
	Owner    string `json:"owner" binding:"required"`
	Currency string `json:"currency" binding:"required,currency"`
}

type CreateAccountResponse

type CreateAccountResponse struct {
	IDAccount int64  `json:"id_account"`
	Owner     string `json:"owner"`
	Currency  string `json:"currency"`
}

type GetAccountRequest

type GetAccountRequest struct {
	IDAccount int64 `uri:"id_account" binding:"required,min=1"`
}

type GetAccountResponse

type GetAccountResponse struct {
	IDAccount int64  `json:"id_account"`
	Owner     string `json:"owner"`
	Currency  string `json:"currency"`
	Balance   int64  `json:"balance"`
}

type ListAccountRequest

type ListAccountRequest struct {
	PageID   int32 `form:"page_id" binding:"required,min=1"`
	PageSize int32 `form:"page_size" binding:"required,min=5,max=10"`
}

type Server

type Server struct {
	Router *gin.Engine
	// contains filtered or unexported fields
}

func NewServer

func NewServer(store repo.Store) *Server

func (*Server) Start

func (server *Server) Start(address string) error

type TransferRequest

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,min=1"`
	Currency      string `json:"currency" binding:"required,currency"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL