api

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package api defines implementations of endpoints and calls

Package api is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Call

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

Call object

func (*Call) Auth

func (c *Call) Auth(secretKey, publicKey, iv, encryptionKey string) error

Auth to set authorization token

func (*Call) GetBillGroups

func (c *Call) GetBillGroups(ctx context.Context) ([]*model.BillGroup, error)

GetBillGroups gets all bill groups

func (*Call) GetBillInformation

func (c *Call) GetBillInformation(ctx context.Context, billChannel string) (model.Bill, error)

GetBillInformation gets bills info

func (*Call) GetBillTypes

func (c *Call) GetBillTypes(ctx context.Context, billChannel string) ([]*model.BillType, error)

GetBillTypes gets bill types

func (*Call) GetBillsByGroup

func (c *Call) GetBillsByGroup(ctx context.Context, group string) ([]*model.Bill, error)

GetBillsByGroup gets bills by group

func (*Call) RunInSandboxMode

func (c *Call) RunInSandboxMode()

RunInSandboxMode this forces Call functionalities to run in sandbox mode for relevant logic/API consumption

func (*Call) ValidateBill

func (c *Call) ValidateBill(ctx context.Context, body interface{}) (interface{}, error)

ValidateBill validates bills

func (*Call) VendBill

func (c *Call) VendBill(ctx context.Context, body interface{}) (model.VendBillResponse, error)

VendBill actually vends the bill

type MockRemoteCalls

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

MockRemoteCalls is a mock of RemoteCalls interface.

func NewMockRemoteCalls

func NewMockRemoteCalls(ctrl *gomock.Controller) *MockRemoteCalls

NewMockRemoteCalls creates a new mock instance.

func (*MockRemoteCalls) Auth

func (m *MockRemoteCalls) Auth(key string) error

Auth mocks base method.

func (*MockRemoteCalls) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockRemoteCalls) RunInSandboxMode

func (m *MockRemoteCalls) RunInSandboxMode()

RunInSandboxMode mocks base method.

type MockRemoteCallsMockRecorder

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

MockRemoteCallsMockRecorder is the mock recorder for MockRemoteCalls.

func (*MockRemoteCallsMockRecorder) Auth

func (mr *MockRemoteCallsMockRecorder) Auth(key interface{}) *gomock.Call

Auth indicates an expected call of Auth.

func (*MockRemoteCallsMockRecorder) RunInSandboxMode

func (mr *MockRemoteCallsMockRecorder) RunInSandboxMode() *gomock.Call

RunInSandboxMode indicates an expected call of RunInSandboxMode.

type RemoteCalls

type RemoteCalls interface {
	Auth(secretKey, publicKey, iv, encryptionKey string) error
	RunInSandboxMode()

	// Bills
	GetBillGroups(ctx context.Context) ([]*model.BillGroup, error)
	GetBillsByGroup(ctx context.Context, group string) ([]*model.Bill, error)
	GetBillInformation(ctx context.Context, billChannel string) (model.Bill, error)
	GetBillTypes(ctx context.Context, billChannel string) ([]*model.BillType, error)
	ValidateBill(ctx context.Context, body interface{}) (interface{}, error)
	VendBill(ctx context.Context, body interface{}) (model.VendBillResponse, error)
}

RemoteCalls abstracted definition of supported functions

func New

func New(z *zerolog.Logger, c *resty.Client, baseURL string) RemoteCalls

New initialises the object Call

Jump to

Keyboard shortcuts

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