Documentation ¶
Index ¶
- Variables
- type Dialer
- type HTTPServiceImpl
- func (httpServiceImpl *HTTPServiceImpl) GeneratePin(c *x509.Certificate) string
- func (httpServiceImpl *HTTPServiceImpl) Invoke(httpServiceInvokeRequest HTTPServiceInvokeRequest) ([]byte, errors.Error)
- func (httpServiceImpl *HTTPServiceImpl) NewInvoker(httpServiceInvokeRequest HTTPServiceInvokeRequest) (Invoker, errors.Error)
- type HTTPServiceInvokeRequest
- type Invoker
- type PrivateKey
Constants ¶
This section is empty.
Variables ¶
var PeerConfigPath = ""
PeerConfigPath use for testing
Functions ¶
This section is empty.
Types ¶
type HTTPServiceImpl ¶
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, errors.Error)
Invoke http service
func (*HTTPServiceImpl) NewInvoker ¶ added in v0.2.5
func (httpServiceImpl *HTTPServiceImpl) NewInvoker(httpServiceInvokeRequest HTTPServiceInvokeRequest) (Invoker, errors.Error)
NewInvoker returns a new Invoker
type HTTPServiceInvokeRequest ¶
type HTTPServiceInvokeRequest struct { RequestURL string RequestHeaders map[string]string RequestBody string NamedClient string PinSet []string // TxID is used only for logging TxID string }
HTTPServiceInvokeRequest used to create http invoke service
type Invoker ¶ added in v0.2.5
type Invoker interface { // Invoke invokes the HTTP service synchronously and returns the response or error Invoke() ([]byte, errors.Error) // InvokeAsync invokes the HTTP service asynchronously and returns a response channel and error channel, // one of which will return the result of the invocation InvokeAsync() (chan []byte, chan errors.Error) }
Invoker invokes the HTTP service either synchronously or asynchronously.
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.