Documentation ¶
Overview ¶
Package mqtt provides an MQTT interface for the MpesaOverlay API.
Index ¶
- type Hook
- func (h *Hook) ID() string
- func (h *Hook) Init(_ interface{}) error
- func (h *Hook) OnConnect(cl *mqtt.Client, _ packets.Packet) error
- func (h *Hook) OnDisconnect(cl *mqtt.Client, err error, expire bool)
- func (h *Hook) OnPublished(cl *mqtt.Client, pk packets.Packet)
- func (h *Hook) OnSubscribed(cl *mqtt.Client, pk packets.Packet, _ []byte)
- func (h *Hook) OnUnsubscribed(cl *mqtt.Client, pk packets.Packet)
- func (h *Hook) Provides(b byte) bool
- func (h *Hook) SetServer(s *mqtt.Server)
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hook ¶
func (*Hook) OnSubscribed ¶
type Service ¶
type Service interface { Token(pk packets.Packet) (mpesa.TokenResp, error) ExpressQuery(pk packets.Packet) (mpesa.ExpressQueryResp, error) ExpressSimulate(pk packets.Packet) (mpesa.ExpressSimulateResp, error) B2CPayment(pk packets.Packet) (mpesa.B2CPaymentResp, error) AccountBalance(pk packets.Packet) (mpesa.AccountBalanceResp, error) C2BRegisterURL(pk packets.Packet) (mpesa.C2BRegisterURLResp, error) C2BSimulate(pk packets.Packet) (mpesa.C2BSimulateResp, error) GenerateQR(pk packets.Packet) (mpesa.GenerateQRResp, error) Reverse(pk packets.Packet) (mpesa.ReverseResp, error) TransactionStatus(pk packets.Packet) (mpesa.TransactionStatusResp, error) RemitTax(pk packets.Packet) (mpesa.RemitTaxResp, error) }
Service is the interface that provides methods for the MpesaOverlay SDK.
Click to show internal directories.
Click to hide internal directories.