Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Func ¶
The Func type is an adapter to allow the use of ordinary functions as Transport handlers. If f is a function with the appropriate signature, Func(f) is a Transport that calls f.
type Middleware ¶
Middleware defines the interface for writing middleware for transports
type Request ¶
type Request struct { // URL specifies the URI being requested // // For the sake of simplicity this is a string instead a *url.URL right now URL string // Body is the request's body. // // Body has always to be non-nil Body io.ReadCloser }
A Request represents a client request to a HBCI server
type Response ¶
type Response struct { // The SegmentExtractor can be used to conveniently query segments from the // Response. // // Right now the Response embeds the SegmentExtractor, which violates the SRP. // Future Response types may get rid of it. *segment.SegmentExtractor // Request is the request that was sent to obtain this Response. // Request's Body is nil (having already been consumed). Request *Request // MarshaledResponse represents the body payload as byte slice. It's strongly // discouraged to use that as it may or may not be populated by the Transport. // // It's only there for legacy reasons. MarshaledResponse []byte // Body represents the response body. Body io.ReadCloser }
A Response represents a server response from a HBCI server
func ReadResponse ¶
ReadResponse reads and returns a Response from r. It populates the embedded SegmentExtractor to have it ready to use.
func (*Response) IsEncrypted ¶
IsEncrypted returns whether the response contains an encrypted message. This method will panic when the SegmentExtractor is not populated.
Click to show internal directories.
Click to hide internal directories.