msp

package
v0.0.0-...-85e540a Latest Latest
Warning

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

Go to latest
Published: May 6, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MSP

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

MSP represents a loaded MSP definition.

func FromBase64

func FromBase64(data string) (*MSP, error)

FromBase64 loads an MSP from a base64 encoded string.

func FromBytes

func FromBytes(data []byte) (*MSP, error)

FromBytes loads an MSP from JSON data.

func FromFile

func FromFile(file string) (*MSP, error)

FromFile loads an MSP from a JSON file.

func New

func New(mspID string, rootCertificates, adminCertificates []*certificate.Certificate) (*MSP, error)

New creates a new MSP.

func (*MSP) AdminCertificates

func (m *MSP) AdminCertificates() []*certificate.Certificate

AdminCertificates returns the admin certificates of the MSP.

func (*MSP) ID

func (m *MSP) ID() string

ID returns the ID of the MSP.

func (*MSP) RootCertificates

func (m *MSP) RootCertificates() []*certificate.Certificate

RootCertificates returns the root certificates of the MSP.

func (*MSP) ToBase64

func (m *MSP) ToBase64() (string, error)

ToBase64 saves the MSP to a base64 encoded string.

func (*MSP) ToBytes

func (m *MSP) ToBytes() ([]byte, error)

ToBytes saves the MSP to JSON data.

func (*MSP) ToFile

func (m *MSP) ToFile(file string) error

ToFile saves the MSP to a JSON file.

Jump to

Keyboard shortcuts

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