rest

package
v0.0.0-...-624a595 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateTransactionRequest

type CreateTransactionRequest struct {
	TransactionType        string `json:"transaction_type"`
	Amount                 string `json:"amount"`
	Secretkey              string `json:"secretkey"`
	TransactionDescription string `json:"transaction_description"`
	WalletID               int32  `json:"wallet_id"`
}

type CreateTransactionResponse

type CreateTransactionResponse struct {
	Transaction Transaction `json:"transaction"`
}

type CreateWalletRequest

type CreateWalletRequest struct {
	FirstName string `json:"first_name"`
	LastName  string `json:"last_name"`
	Email     string `json:"email"`
	Secretkey string `json:"secretkey"`
	Bvn       string `json:"bvn"`
	Currency  string `json:"currency"`
}

type CreateWalletResponse

type CreateWalletResponse struct {
	Wallet Wallet `json:"wallet"`
}

type ErrorResponse

type ErrorResponse struct {
	Error string `json:"error"`
}

type Transaction

type Transaction struct {
	ID                     int64  `json:"id"`
	TransactionRef         string `json:"transaction_ref"`
	TransactionType        string `json:"transaction_type"`
	Amount                 string `json:"amount"`
	Secretkey              string `json:"secretkey"`
	TransactionStatus      string `json:"transaction_status"`
	TransactionDescription string `json:"transaction_description"`
	WalletID               int32  `json:"wallet_id"`
}

type TransactionHandler

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

func NewTransactionHandler

func NewTransactionHandler(svc TransactionService) *TransactionHandler

func (*TransactionHandler) Register

func (t *TransactionHandler) Register(r *mux.Router)

type TransactionService

type TransactionService interface {
	Create(ctx context.Context, transactionRef string, transactionType string, amount string, secretkey string, transactionStatus string, transactionDescription string, walletID int32) (internal.Transaction, error)
}

TransactionService ...

type UpdateWalletRequest

type UpdateWalletRequest struct {
	IsActive string `json:"is_active"`
}

type Wallet

type Wallet struct {
	ID           int64  `json:"id"`
	WalletNumber string `json:"wallet_number"`
	IsActive     string `json:"is_active"`
	FirstName    string `json:"first_name"`
	LastName     string `json:"last_name"`
	Email        string `json:"email"`
	Secretkey    string `json:"secretkey"`
	Bvn          string `json:"bvn"`
	Currency     string `json:"currency"`
}

type WalletHandler

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

func NewWalletHandler

func NewWalletHandler(svc WalletService) *WalletHandler

func (*WalletHandler) Register

func (w *WalletHandler) Register(r *mux.Router)

type WalletService

type WalletService interface {
	Create(ctx context.Context, walletNumber string, isActive string, firstName string, lastName string, email string, secretkey string, bvn string, currency string) (internal.Wallet, error)
	Update(ctx context.Context, id int64, isActive string) error
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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