network

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2023 License: Apache-2.0 Imports: 10 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FabProfile

type FabProfile struct {
	Channel      string       `yaml:"channel" json:"channel" validate:"required"`
	Organization string       `yaml:"organization" json:"organization" validate:"required"`
	User         User         `yaml:"user" json:"user" validate:"required"`
	Enpoint      NodeEndpoint `yaml:"endpoint" json:"endpoint" validate:"required"`
}

type FabricClient

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

func NewFabricClient

func NewFabricClient(n *Network) (*FabricClient, error)

func (*FabricClient) Channel

func (fabclient *FabricClient) Channel(channel string) *client.Network

func (*FabricClient) Close

func (fabclient *FabricClient) Close()

type Network

type Network struct {
	ID          string `json:"id"` // network metadat.name
	Platform    `json:"platform"`
	*FabProfile `json:"fabProfile,omitempty"`
}

func (*Network) Type

func (n *Network) Type() Type

type NodeEndpoint

type NodeEndpoint struct {
	URL        string `yaml:"url,omitempty" json:"url,omitempty"`
	TLSCACerts `yaml:"tlsCACerts,omitempty" json:"tlsCACerts,omitempty"`
}

type Pem

type Pem struct {
	Pem string `yaml:"pem,omitempty" json:"pem,omitempty"`
}

type Platform

type Platform string
const (
	Bestchains Platform = "bestchains"
)

type TLSCACerts

type TLSCACerts struct {
	Pem string `yaml:"pem,omitempty" json:"pem,omitempty"`
}

type Type

type Type string
const (
	Unknown Type = "Unknown"
	FABRIC  Type = "Fabric"
)

type User

type User struct {
	Name string `yaml:"name,omitempty" json:"name,omitempty"`
	Key  Pem    `yaml:"key,omitempty" json:"key,omitempty"`
	Cert Pem    `yaml:"cert,omitempty" json:"cert,omitempty"`
}

func (User) ToIdentity

func (u User) ToIdentity(org string) (identity.Identity, identity.Sign, error)

Jump to

Keyboard shortcuts

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