handlers

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBadRequest = errors.New("validation error")

Functions

This section is empty.

Types

type BTCResponse

type BTCResponse struct {
	Price     *big.Float `json:"price"`
	UpdatedAt time.Time  `json:"updated_at"`
}

func BTCToResponse

func BTCToResponse(btc entity.BTCPrice) BTCResponse

type BitcoinHTTPHandlers

type BitcoinHTTPHandlers struct {
	// contains filtered or unexported fields
}

func NewBitcoinHTTPHandlers

func NewBitcoinHTTPHandlers(bitcoinService *service.BitcoinService) *BitcoinHTTPHandlers

func (*BitcoinHTTPHandlers) SetRoutes

func (h *BitcoinHTTPHandlers) SetRoutes(r chi.Router)

type SetBTCPriceRequest

type SetBTCPriceRequest struct {
	Price float64 `json:"price"`
}

func (SetBTCPriceRequest) Bind

func (r SetBTCPriceRequest) Bind(_ *http.Request) error

Jump to

Keyboard shortcuts

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