httpsnapservice

package
v0.1.15 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PeerConfigPath = ""

PeerConfigPath use for testing

Functions

This section is empty.

Types

type Dialer

type Dialer func(network, addr string) (net.Conn, error)

Dialer is custom dialer to verify cert against pinset

type HTTPServiceImpl

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

HTTPServiceImpl used to create transaction service

func Get

func Get(channelID string) (*HTTPServiceImpl, error)

Get will return httpService to caller

func (*HTTPServiceImpl) GeneratePin

func (httpServiceImpl *HTTPServiceImpl) GeneratePin(c *x509.Certificate) string

GeneratePin returns pin of an x509 certificate

func (*HTTPServiceImpl) Invoke

func (httpServiceImpl *HTTPServiceImpl) Invoke(httpServiceInvokeRequest HTTPServiceInvokeRequest) ([]byte, error)

Invoke http service

type HTTPServiceInvokeRequest

type HTTPServiceInvokeRequest struct {
	RequestURL     string
	RequestHeaders map[string]string
	RequestBody    string
	NamedClient    string
	PinSet         []string
}

HTTPServiceInvokeRequest used to create http invoke service

type PrivateKey

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

PrivateKey is signer implementation for golang client TLS

func (*PrivateKey) Public

func (priv *PrivateKey) Public() crypto.PublicKey

Public returns the public key corresponding to priv.

func (*PrivateKey) Sign

func (priv *PrivateKey) Sign(rand io.Reader, msg []byte, opts crypto.SignerOpts) ([]byte, error)

Sign signs msg with priv, reading randomness from rand. If opts is a *PSSOptions then the PSS algorithm will be used, otherwise PKCS#1 v1.5 will be used. This method is intended to support keys where the private part is kept in, for example, a hardware module. Common uses should use the Sign* functions in this package.

Jump to

Keyboard shortcuts

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