Documentation ¶
Overview ¶
Package mpesaoverlay is the root package for the mpesaoverlay services. The mpesaoverlay services are divided into subpackages:
cli: responsible for the command line interface.
pkg: responsible for the mpesaoverlay package.
mqtt: responsible for the mqtt package.
grpc: responsible for the grpc package.
Index ¶
Constants ¶
View Source
const SVCName = "mpesaoverlay"
SVCName is the name of the service.
Variables ¶
View Source
var ( // Version represents the last service git tag in git history. // It's meant to be set using go build ldflags: // -ldflags "-X 'github.com/0x6flab/mpesaoverlay.Version=0.0.0'". Version = "0.0.0" // Commit represents the service git commit hash. // It's meant to be set using go build ldflags: // -ldflags "-X 'github.com/0x6flab/mpesaoverlay.Commit=ffffffff'". Commit = "ffffffff" // BuildTime represetns the service build time. // It's meant to be set using go build ldflags: // -ldflags "-X 'github.com/0x6flab/mpesaoverlay.BuildTime=1970-01-01_00:00:00'". BuildTime = "1970-01-01_00:00:00" )
Functions ¶
func Health ¶
func Health(service string) http.HandlerFunc
Health exposes an HTTP handler for retrieving service health.
Types ¶
type HealthInfo ¶
type HealthInfo struct { // Status contains service status. Status string `json:"status"` // Service contains service name. Service string `json:"service"` // Version contains current service version. Version string `json:"version"` // Commit represents the git hash commit. Commit string `json:"commit"` // BuildTime contains service build time. BuildTime string `json:"build_time"` }
HealthInfo contains version endpoint response.
Directories ¶
Path | Synopsis |
---|---|
Package cli provides the command line interface for the mpesaoverlay.
|
Package cli provides the command line interface for the mpesaoverlay. |
Package cmd provides the entrypoint for all the mpesaoverlay services.
|
Package cmd provides the entrypoint for all the mpesaoverlay services. |
cli
Package main provides the entrypoint for the mpesaoverlay cli.
|
Package main provides the entrypoint for the mpesaoverlay cli. |
grpc
Package main provides the entrypoint for the grpc service.
|
Package main provides the entrypoint for the grpc service. |
mqtt
Package main provides the entrypoint for the mqtt service.
|
Package main provides the entrypoint for the mqtt service. |
Package example is the root package for the example services.
|
Package example is the root package for the example services. |
mqtt
Package sdk provides an example of how to use SDK method.
|
Package sdk provides an example of how to use SDK method. |
mqtt/auth
Package main provides an example of how to use Token method.
|
Package main provides an example of how to use Token method. |
mqtt/b2c
Package main provides an example of how to use B2C payment method.
|
Package main provides an example of how to use B2C payment method. |
mqtt/balance
Package main provides an example of how to use AccountBalance method.
|
Package main provides an example of how to use AccountBalance method. |
mqtt/c2bregisterurl
Package main provides an example of how to use C2BRegisterURL method.
|
Package main provides an example of how to use C2BRegisterURL method. |
mqtt/c2bsimulate
Package main provides an example of how to use C2BSimulate method.
|
Package main provides an example of how to use C2BSimulate method. |
mqtt/qrcode
Package main provides an example of how to use GenerateQR method.
|
Package main provides an example of how to use GenerateQR method. |
mqtt/query
Package main provides an example of how to use ExpressQuery method.
|
Package main provides an example of how to use ExpressQuery method. |
mqtt/reversal
Package main provides an example of how to use Reverse method.
|
Package main provides an example of how to use Reverse method. |
mqtt/stkpush
Package main provides an example of how to use ExpressSimulate method.
|
Package main provides an example of how to use ExpressSimulate method. |
mqtt/tax
Package main provides an example of how to use RemitTax method.
|
Package main provides an example of how to use RemitTax method. |
mqtt/transaction
Package main provides an example of how to use TransactionStatus method.
|
Package main provides an example of how to use TransactionStatus method. |
sdk
Package sdk provides an example of how to use SDK method.
|
Package sdk provides an example of how to use SDK method. |
sdk/auth
Package main provides an example of how to use Token method.
|
Package main provides an example of how to use Token method. |
sdk/b2c
Package main provides an example of how to use B2C payment method.
|
Package main provides an example of how to use B2C payment method. |
sdk/balance
Package main provides an example of how to use AccountBalance method.
|
Package main provides an example of how to use AccountBalance method. |
sdk/c2bregisterurl
Package main provides an example of how to use C2BRegisterURL method.
|
Package main provides an example of how to use C2BRegisterURL method. |
sdk/c2bsimulate
Package main provides an example of how to use C2BSimulate method.
|
Package main provides an example of how to use C2BSimulate method. |
sdk/qrcode
Package main provides an example of how to use GenerateQR method.
|
Package main provides an example of how to use GenerateQR method. |
sdk/query
Package main provides an example of how to use ExpressQuery method.
|
Package main provides an example of how to use ExpressQuery method. |
sdk/reversal
Package main provides an example of how to use Reverse method.
|
Package main provides an example of how to use Reverse method. |
sdk/stkpush
Package main provides an example of how to use ExpressSimulate method.
|
Package main provides an example of how to use ExpressSimulate method. |
sdk/tax
Package main provides an example of how to use RemitTax method.
|
Package main provides an example of how to use RemitTax method. |
sdk/transaction
Package main provides an example of how to use TransactionStatus method.
|
Package main provides an example of how to use TransactionStatus method. |
Package grpc provides an gRPC interface for the MpesaOverlay API.
|
Package grpc provides an gRPC interface for the MpesaOverlay API. |
api
Package api provides the grpc api for the mpesaoverlay.
|
Package api provides the grpc api for the mpesaoverlay. |
Package mqtt provides an MQTT interface for the MpesaOverlay API.
|
Package mqtt provides an MQTT interface for the MpesaOverlay API. |
Package pkg provides a wrapper around the Mpesa API.
|
Package pkg provides a wrapper around the Mpesa API. |
mpesa
Package mpesa provides a wrapper around the Mpesa API.
|
Package mpesa provides a wrapper around the Mpesa API. |
mpesa/middleware
Package middleware provides a set of middleware for use with MpesaOverlay.
|
Package middleware provides a set of middleware for use with MpesaOverlay. |
mpesa/middleware/database
Package database provides a middleware for database.
|
Package database provides a middleware for database. |
mpesa/middleware/database/postgres
Package postgres implements the postgres database for the logging middleware to be used with MpesaOverlay SDK.
|
Package postgres implements the postgres database for the logging middleware to be used with MpesaOverlay SDK. |
mpesa/middleware/logging
Package logging provides a middleware for logging.
|
Package logging provides a middleware for logging. |
mpesa/middleware/logging/logrus
Package logrus implements the logrus logger for the logging middleware to be used with MpesaOverlay SDK.
|
Package logrus implements the logrus logger for the logging middleware to be used with MpesaOverlay SDK. |
mpesa/middleware/logging/slog
Package slog implements the slog logger for the logging middleware to be used with MpesaOverlay SDK.
|
Package slog implements the slog logger for the logging middleware to be used with MpesaOverlay SDK. |
mpesa/middleware/logging/zap
Package zap implements the zap logger for the logging middleware to be used with MpesaOverlay SDK.
|
Package zap implements the zap logger for the logging middleware to be used with MpesaOverlay SDK. |
mpesa/middleware/metrics
Package metrics provides a middleware for metrics.
|
Package metrics provides a middleware for metrics. |
mpesa/middleware/metrics/prometheus
Package prometheus provides a Prometheus metrics middleware for the MpesaOverlay API.
|
Package prometheus provides a Prometheus metrics middleware for the MpesaOverlay API. |
Click to show internal directories.
Click to hide internal directories.