view

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(config *Config, sID SigningIdentity, hasher hash2.Hasher) (*client, error)

func ValidateClientConfig

func ValidateClientConfig(config Config) error

Types

type Config

type Config struct {
	ID               string
	ConnectionConfig *grpc.ConnectionConfig
}

Config will be updated after the CR for token client config is merged, where the config data will be populated based on a config file.

func (*Config) ToJSon

func (config *Config) ToJSon() ([]byte, error)

type Configs

type Configs []Config

func FromJSON

func FromJSON(raw []byte) (Configs, error)

func (*Configs) ToJSon

func (configs *Configs) ToJSon() ([]byte, error)

type MSPInfo

type MSPInfo struct {
	MSPConfigPath string
	MSPID         string
	MSPType       string
}

type Signer

type Signer interface {
	Sign(msg []byte) (signature []byte, err error)
}

type SigningIdentity

type SigningIdentity interface {
	Serialize() ([]byte, error)

	Sign(msg []byte) ([]byte, error)
}

func NewX509SigningIdentity

func NewX509SigningIdentity(certPath, skPath string) (SigningIdentity, error)

type Stream added in v0.3.0

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

func (*Stream) Recv added in v0.3.0

func (c *Stream) Recv(m interface{}) error

func (*Stream) RecvProtoMsg added in v0.3.0

func (c *Stream) RecvProtoMsg(m interface{}) error

func (*Stream) Result added in v0.3.0

func (c *Stream) Result() ([]byte, error)

func (*Stream) Send added in v0.3.0

func (c *Stream) Send(m interface{}) error

func (*Stream) SendProtoMsg added in v0.3.0

func (c *Stream) SendProtoMsg(m interface{}) error

type TimeFunc

type TimeFunc func() time.Time

type ViewServiceClient

type ViewServiceClient interface {
	// CreateViewClient creates a grpc connection and client to view peer
	CreateViewClient() (*grpc.ClientConn, protos2.ViewServiceClient, error)

	// Certificate returns tls client certificate
	Certificate() *tls.Certificate
}

ViewServiceClient defines an interface that creates a client to communicate with the view service in a peer

type ViewServiceClientImpl

type ViewServiceClientImpl struct {
	Address            string
	ServerNameOverride string
	GRPCClient         *grpc2.Client
}

ViewServiceClientImpl implements ViewServiceClient interface

func (*ViewServiceClientImpl) Certificate

func (pc *ViewServiceClientImpl) Certificate() *tls.Certificate

func (*ViewServiceClientImpl) CreateViewClient

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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