pesakit

package module
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2021 License: MIT Imports: 22 Imported by: 2

README

pesakit

mobile money dev kit written in golang supporting among other things collection and disbursement for tigo,airtel and mpesa

configuration

To configure pesakit to pick up your configurations you need to create a .env file. The file should contain variables as listed in the ENV.md file. If you are running as docker make sure to pass the env file and if you are using pesakit as an executable put the env file in the current working directory.

docker

build


docker build -t pesakit .

run


docker run -it --env-file=.env pesakit

use a pre-built container


docker run -it --env-file=.env ghcr.io/pesakit/pesakit:latest --format=json config print 

acknowledgement

Under the hood pesakit uses the mentioned libraries

articles

twitter

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrClientNil = errors.New("the client is nil")
)

Functions

func AirtelCallbackHandler added in v0.1.6

func AirtelCallbackHandler() airtel.PushCallbackFunc

func MpesaCallbackHandler added in v0.1.6

func MpesaCallbackHandler() mpesa.PushCallbackFunc

func TigoCallbackHandler added in v0.1.6

func TigoCallbackHandler() push.CallbackHandlerFunc

Types

type Client

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

func NewClient

func NewClient(airtelMoney *airtel.Client, tc *tigo.Client, vodaMpesa *mpesa.Client, opts ...ClientOption) *Client

func (*Client) Run added in v0.1.6

func (c *Client) Run(args []string) error

type ClientOption added in v0.1.6

type ClientOption func(*Client)

func Debug added in v0.1.6

func Debug(debug bool) ClientOption

func Logger added in v0.1.6

func Logger(writer stdio.Writer) ClientOption

func Verbose added in v0.1.6

func Verbose(verbose bool) ClientOption

Directories

Path Synopsis
pkg
env
mno

Jump to

Keyboard shortcuts

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