common

package
v0.0.0-...-7107d2d Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InstanceSDK

type InstanceSDK struct {
	sync.Once
	// contains filtered or unexported fields
}

InstanceSDK is a wrapper for the fabric-sdk-go

func NewInstanceSDK

func NewInstanceSDK(connectionYaml string, user string, vaultConfig *VaultConfig) *InstanceSDK

NewInstanceSDK returns a new instance of the fabric-sdk-go

func (*InstanceSDK) ChannelClient

func (ins *InstanceSDK) ChannelClient(channel string) (*channel.Client, error)

ChannelClient returns a channel client for the specified channel

func (*InstanceSDK) Channels

func (ins *InstanceSDK) Channels() []string

Channels returns a list of channels

type VaultConfig

type VaultConfig struct {
	// Token is a token for vault access
	Token string `mapstructure:"token,omitempty"`
	// Address is an address of vault
	Path string `mapstructure:"path,omitempty"`
	// CAcert is a path to CA cert for vault
	CAcert string `mapstructure:"ca_cert,omitempty"`
	// Address is an address of vault (e.g. https://vault.example.com:8200)
	Address string `mapstructure:"address,omitempty"`
	// UserCertName is a name of user cert for vault (e.g. User1@org1.example.com-cert.pem)
	UserCertName string `mapstructure:"user_cert_name,omitempty"`
}

VaultConfig is a struct with vault config

Jump to

Keyboard shortcuts

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