service

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: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNilBTCRepository = errors.New("btc repository is nil")

Functions

This section is empty.

Types

type BitcoinService

type BitcoinService struct {
	SetBTCPrice SetBTCPriceHandler
	GetBTCPrice GetBTCPriceHandler
}

func NewBitcoinService

func NewBitcoinService(
	bitcoinRepository entity.BTCRepository,
) *BitcoinService

type GetBTCPriceHandler

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

func MustNewGetBTCCommand

func MustNewGetBTCCommand(btcRepository entity.BTCRepository) GetBTCPriceHandler

func NewGetBTCCommand

func NewGetBTCCommand(btcRepository entity.BTCRepository) (GetBTCPriceHandler, error)

func (*GetBTCPriceHandler) Handle

func (h *GetBTCPriceHandler) Handle() entity.BTCPrice

type SetBTCPrice

type SetBTCPrice struct {
	Price float64
}

type SetBTCPriceHandler

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

func MustNewSetBTCPriceCommand

func MustNewSetBTCPriceCommand(btcRepository entity.BTCRepository) SetBTCPriceHandler

func NewSetBTCPriceCommand

func NewSetBTCPriceCommand(btcRepository entity.BTCRepository) (SetBTCPriceHandler, error)

func (*SetBTCPriceHandler) Handle

func (h *SetBTCPriceHandler) Handle(command SetBTCPrice) error

Jump to

Keyboard shortcuts

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