dialog

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BankID      domain.BankID
	HBCIURL     string
	UserID      string
	HBCIVersion segment.HBCIVersion
	Transport   transport.Transport
}

Config contains the configuration of a PinTanDialog

type Dialog

type Dialog interface {
	SyncClientSystemID() (string, error)
	SendMessage(message.HBCIMessage) (message.BankMessage, error)
}

Dialog represents the common interface to use when talking to bank institutes

func NewRDHDialog

func NewRDHDialog(bankID domain.BankID, hbciURL string, clientID string, hbciVersion segment.HBCIVersion) Dialog

NewRDHDialog creates a dialog to use with cardreader flow

type PinTanDialog

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

PinTanDialog represents a dialog to use in pin/tan flow with HTTPS transport

Example
package main

import (
	"github.com/mitch000001/go-hbci/domain"

	"github.com/mitch000001/go-hbci/dialog"
)

func main() {
	cfg := dialog.Config{
		HBCIURL: "https://bank.de/hbci",
		UserID:  "100000000",
		BankID: domain.BankID{
			CountryCode: 280,
			ID:          "1000000",
		},
	}
	d := dialog.NewPinTanDialog(cfg)
	d.SetPin("12345")
}
Output:

func NewPinTanDialog

func NewPinTanDialog(config Config) *PinTanDialog

NewPinTanDialog creates a new dialog to use for pin/tan transport

func (PinTanDialog) BankParameterDataVersion

func (d PinTanDialog) BankParameterDataVersion() int

func (PinTanDialog) SendAnonymousMessage

func (d PinTanDialog) SendAnonymousMessage(clientMessage message.HBCIMessage) (message.BankMessage, error)

func (PinTanDialog) SendMessage

func (d PinTanDialog) SendMessage(clientMessage message.HBCIMessage) (message.BankMessage, error)

func (PinTanDialog) SetClientSystemID

func (d PinTanDialog) SetClientSystemID(clientSystemID string)

func (*PinTanDialog) SetPin

func (d *PinTanDialog) SetPin(pin string)

SetPin lets the user reset the pin after creation

func (PinTanDialog) SetSecurityFunction

func (d PinTanDialog) SetSecurityFunction(securityFn string)

func (PinTanDialog) SupportedSegments added in v0.1.4

func (d PinTanDialog) SupportedSegments() []segment.VersionedSegment

func (PinTanDialog) SyncClientSystemID

func (d PinTanDialog) SyncClientSystemID() (string, error)

func (PinTanDialog) UserParameterDataVersion

func (d PinTanDialog) UserParameterDataVersion() int

Jump to

Keyboard shortcuts

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