remote

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2018 License: BSD-3-Clause, BSD-3-Clause Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccountSeqno

func AccountSeqno(ctx context.Context, g *libkb.GlobalContext, accountID stellar1.AccountID) (uint64, error)

func Balances

func Balances(ctx context.Context, g *libkb.GlobalContext, accountID stellar1.AccountID) ([]stellar1.Balance, error)

func ExchangeRate

func ExchangeRate(ctx context.Context, g *libkb.GlobalContext, currency string) (stellar1.OutsideExchangeRate, error)

func Fetch

Fetch and unbox the latest bundle from the server.

func GetAccountDisplayCurrency

func GetAccountDisplayCurrency(ctx context.Context, g *libkb.GlobalContext, accountID stellar1.AccountID) (string, error)

func GetUserSettings

func GetUserSettings(ctx context.Context, g *libkb.GlobalContext) (res stellar1.UserSettings, err error)

func PaymentDetail

func PaymentDetail(ctx context.Context, g *libkb.GlobalContext,
	txID string) (res stellar1.PaymentSummary, err error)

func Post

func Post(ctx context.Context, g *libkb.GlobalContext, clearBundle stellar1.Bundle) (err error)

Post a bundle to the server.

func PostWithChainlink(ctx context.Context, g *libkb.GlobalContext, clearBundle stellar1.Bundle) (err error)

Post a bundle to the server with a chainlink.

func RecentPayments

func RecentPayments(ctx context.Context, g *libkb.GlobalContext,
	accountID stellar1.AccountID, limit int) (res []stellar1.PaymentSummary, err error)

func SetAcceptedDisclaimer

func SetAcceptedDisclaimer(ctx context.Context, g *libkb.GlobalContext) error

func SetAccountDefaultCurrency

func SetAccountDefaultCurrency(ctx context.Context, g *libkb.GlobalContext, accountID stellar1.AccountID,
	currency string) error

func ShouldCreate

func ShouldCreate(ctx context.Context, g *libkb.GlobalContext) (should bool, err error)

ShouldCreate asks the server whether to create this user's initial wallet.

Types

type RemoteNet

type RemoteNet struct {
	libkb.Contextified
}

RemoteNet is the real implementation of Remoter that talks to servers.

func NewRemoteNet

func NewRemoteNet(g *libkb.GlobalContext) *RemoteNet

func (*RemoteNet) AccountSeqno

func (r *RemoteNet) AccountSeqno(ctx context.Context, accountID stellar1.AccountID) (uint64, error)

func (*RemoteNet) Balances

func (r *RemoteNet) Balances(ctx context.Context, accountID stellar1.AccountID) ([]stellar1.Balance, error)

func (*RemoteNet) Details

func (r *RemoteNet) Details(ctx context.Context, accountID stellar1.AccountID) (stellar1.AccountDetails, error)

func (*RemoteNet) ExchangeRate

func (r *RemoteNet) ExchangeRate(ctx context.Context, currency string) (stellar1.OutsideExchangeRate, error)

func (*RemoteNet) GetAccountDisplayCurrency

func (r *RemoteNet) GetAccountDisplayCurrency(ctx context.Context, accountID stellar1.AccountID) (string, error)

func (*RemoteNet) PaymentDetail

func (r *RemoteNet) PaymentDetail(ctx context.Context, txID string) (res stellar1.PaymentSummary, err error)

func (*RemoteNet) RecentPayments

func (r *RemoteNet) RecentPayments(ctx context.Context, accountID stellar1.AccountID, limit int) (res []stellar1.PaymentSummary, err error)

func (*RemoteNet) SubmitPayment

func (*RemoteNet) SubmitRelayClaim

func (r *RemoteNet) SubmitRelayClaim(ctx context.Context, post stellar1.RelayClaimPost) (stellar1.RelayClaimResult, error)

func (*RemoteNet) SubmitRelayPayment

func (r *RemoteNet) SubmitRelayPayment(ctx context.Context, post stellar1.PaymentRelayPost) (stellar1.PaymentResult, error)

type Remoter

type Remoter interface {
	AccountSeqno(ctx context.Context, accountID stellar1.AccountID) (uint64, error)
	Balances(ctx context.Context, accountID stellar1.AccountID) ([]stellar1.Balance, error)
	Details(ctx context.Context, accountID stellar1.AccountID) (stellar1.AccountDetails, error)
	SubmitPayment(ctx context.Context, post stellar1.PaymentDirectPost) (stellar1.PaymentResult, error)
	SubmitRelayPayment(ctx context.Context, post stellar1.PaymentRelayPost) (stellar1.PaymentResult, error)
	SubmitRelayClaim(context.Context, stellar1.RelayClaimPost) (stellar1.RelayClaimResult, error)
	RecentPayments(ctx context.Context, accountID stellar1.AccountID, limit int) (res []stellar1.PaymentSummary, err error)
	PaymentDetail(ctx context.Context, txID string) (res stellar1.PaymentSummary, err error)
	// GetAccountDisplayCurrency is not used as a mock now - since this
	// setting only lives in database table on the server, we can do full
	// integration testing here. Otherwise, all what ChangeDisplayCurrency
	// test would do is testing a mock.
	GetAccountDisplayCurrency(ctx context.Context, accountID stellar1.AccountID) (string, error)
	ExchangeRate(ctx context.Context, currency string) (stellar1.OutsideExchangeRate, error)
}

Jump to

Keyboard shortcuts

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