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
Click to show internal directories.
Click to hide internal directories.