user

package
v0.0.0-...-399e6d5 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IntermediaryClient

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

func NewIntermediaryClient

func NewIntermediaryClient(userProvider Provider, logger logging.ILogger, config model.IntermediaryConfig) *IntermediaryClient

func (*IntermediaryClient) ExecutePayment

func (ic *IntermediaryClient) ExecutePayment(payerName, payeeName model.UserAlias, amount api.Amount) (api.Amount, api.Error)

func (*IntermediaryClient) GetBalance

func (ic *IntermediaryClient) GetBalance(customer model.UserAlias) (api.Amount, api.Error)

func (*IntermediaryClient) Withdraw

func (ic *IntermediaryClient) Withdraw(customer model.UserAlias, amount api.Amount) (api.Amount, api.Error)

type Provider

type Provider interface {
	Get(alias model.UserAlias) User
}

type User

type User interface {
	Username() model.Username
	InitiateTransfer(value api.Amount, nonce uuid.UUID) api.Error
	Transfer(value api.Amount, recipient model.Username, nonce uuid.UUID) api.Error
	Withdraw(value api.Amount) api.Error
	GetBalance() (api.Amount, api.Error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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