api

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(store *db.Store) *server

NewServer Create new Server with gin router

Types

type AccountByIDRequest

type AccountByIDRequest struct {
	ID int64 `uri:"id" binding:"required,numeric"`
}

type CreateAccountRequest

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

type ListAccountRequest

type ListAccountRequest struct {
	PageNumber int32 `form:"page_number" binding:"required,min=1"`
	ItemPages  int32 `form:"item_pages" binding:"required,min=5,max=10"`
}

Directories

Path Synopsis
Costum validator for json request
Costum validator for json request

Jump to

Keyboard shortcuts

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