Documentation
¶
Index ¶
- func MakeLocalConsent() func(ctx context.Context, url string) error
- func MakeLocalHostHeaderRoundTripper(portsToHost map[string]string) http.RoundTripper
- func MakeLocalPostSignHook(hostsToPort map[string]string) func(req *http.Request)
- func MakeLocalPreSignHook(portsToHost map[string]string) func(req *http.Request)
- func MakeLocalURLRewriter(hostsToPort map[string]string) func(string) (string, error)
- func MakeTestnetConsent() func(ctx context.Context, url string) error
- type Environment
- type LocalHostHeaderRoundTripper
- type Snapshotter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeLocalHostHeaderRoundTripper ¶
func MakeLocalHostHeaderRoundTripper(portsToHost map[string]string) http.RoundTripper
func MakeLocalPostSignHook ¶
func MakeLocalPreSignHook ¶
func MakeLocalURLRewriter ¶
ResolveLocalURL takes a URL and replaces known backend hostnames with localhost and their corresponding ports. for example:
"http://happy-life-bank-backend/incoming-payments/f6eabfa0-3a94-4ae6-a635-bf43f9af3aee"
goes to
"http://localhost:4000/incoming-payments/f6eabfa0-3a94-4ae6-a635-bf43f9af3aee"
Types ¶
type Environment ¶
type Environment struct {
Name string
ClientWalletAddressURL string
PrivateKey string
KeyId string
HttpClient *http.Client
ReceiverWalletAddressUrl string
ResolvedReceiverWalletAddressUrl string
ReceiverOpenPaymentsAuthUrl string
ReceiverOpenPaymentsResourceUrl string
ReceiverAssetScale int
ReceiverAssetCode string
SenderOpenPaymentsAuthUrl string
SenderWalletAddressUrl string
ResolvedSenderWalletAddressUrl string
SenderOpenPaymentsResourceUrl string
PreSignHook func(req *http.Request)
PostSignHook func(req *http.Request)
RewriteURL func(string) (string, error) // optional, used only in local
Consent func(ctx context.Context, url string) error
}
func NewLocalEnvironment ¶
func NewLocalEnvironment() *Environment
func NewTestnetEnvironment ¶
func NewTestnetEnvironment() *Environment
func (*Environment) RewriteURLIfNeeded ¶
func (env *Environment) RewriteURLIfNeeded(raw string) (string, error)
type LocalHostHeaderRoundTripper ¶
type LocalHostHeaderRoundTripper struct {
// contains filtered or unexported fields
}
HostHeaderRoundTripper modifies Host header to match remote services while using localhost. RoundTripper will modify all requests after DoSigned/DoUnsigned
type Snapshotter ¶
func NewSnapshotter ¶
func NewSnapshotter(page *rod.Page) *Snapshotter
func (*Snapshotter) FlushOnError ¶
func (s *Snapshotter) FlushOnError()
func (*Snapshotter) Snapshot ¶
func (s *Snapshotter) Snapshot()
Click to show internal directories.
Click to hide internal directories.