forked from hyperledger/fabric-sdk-go
/
factory.go
40 lines (32 loc) · 812 Bytes
/
factory.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
/*
Notice: This file has been modified for Hyperledger Fabric SDK Go usage.
Please review third_party pinning scripts and patches for more details.
*/
package msp
type MSPVersion int
const (
MSPv1_0 = iota
MSPv1_1
MSPv1_3
)
// NewOpts represent
type NewOpts interface {
// GetVersion returns the MSP's version to be instantiated
GetVersion() MSPVersion
}
// NewBaseOpts is the default base type for all MSP instantiation Opts
type NewBaseOpts struct {
Version MSPVersion
}
// BCCSPNewOpts contains the options to instantiate a new BCCSP-based (X509) MSP
type BCCSPNewOpts struct {
NewBaseOpts
}
// IdemixNewOpts contains the options to instantiate a new Idemix-based MSP
type IdemixNewOpts struct {
NewBaseOpts
}