-
Notifications
You must be signed in to change notification settings - Fork 65
Expand file tree
/
Copy pathoptions.go
More file actions
143 lines (121 loc) · 4.38 KB
/
Copy pathoptions.go
File metadata and controls
143 lines (121 loc) · 4.38 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
// Copyright © 2022 Kaleido, Inc.
//
// SPDX-License-Identifier: Apache-2.0
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific lan
package types
import (
"context"
"github.com/hyperledger/firefly-common/pkg/fftypes"
)
type PullOptions struct {
Retries int
}
type StartOptions struct {
NoRollback bool
}
type InitOptions struct {
StackName string
MemberCount int
FireFlyBasePort int
ServicesBasePort int
DatabaseProvider string
ExternalProcesses int
OrgNames []string
NodeNames []string
BlockchainConnector string
BlockchainProvider string
BlockchainNodeProvider string
TokenProviders []string
FireFlyVersion string
ManifestPath string
PrometheusEnabled bool
PrometheusPort int
SandboxEnabled bool
ExtraCoreConfigPath string
ExtraConnectorConfigPath string
BlockPeriod int
ContractAddress string
RemoteNodeURL string
ChainID int64
DisableTokenFactories bool
RequestTimeout int
ReleaseChannel string
MultipartyEnabled bool
IPFSMode string
CCPYAMLPaths []string
MSPPaths []string
ChannelName string
ChaincodeName string
CustomPinSupport bool
CustomPath string
}
const IPFSMode = "ipfs_mode"
var (
IPFSModePrivate = fftypes.FFEnumValue(IPFSMode, "private")
IPFSModePublic = fftypes.FFEnumValue(IPFSMode, "public")
)
const BlockchainProvider = "blockchain_provider"
var (
BlockchainProviderEthereum = fftypes.FFEnumValue(BlockchainProvider, "ethereum")
BlockchainProviderTezos = fftypes.FFEnumValue(BlockchainProvider, "tezos")
BlockchainProviderFabric = fftypes.FFEnumValue(BlockchainProvider, "fabric")
BlockchainProviderCorda = fftypes.FFEnumValue(BlockchainProvider, "corda")
)
const BlockchainConnector = "blockchain_connector"
var (
BlockchainConnectorEthconnect = fftypes.FFEnumValue(BlockchainConnector, "ethconnect")
BlockchainConnectorEvmconnect = fftypes.FFEnumValue(BlockchainConnector, "evmconnect")
BlockchainConnectorTezosconnect = fftypes.FFEnumValue(BlockchainConnector, "tezosconnect")
BlockchainConnectorFabconnect = fftypes.FFEnumValue(BlockchainConnector, "fabric")
)
const BlockchainNodeProvider = "blockchain_node_provider"
var (
BlockchainNodeProviderGeth = fftypes.FFEnumValue(BlockchainNodeProvider, "geth")
BlockchainNodeProviderBesu = fftypes.FFEnumValue(BlockchainNodeProvider, "besu")
BlockchainNodeProviderRemoteRPC = fftypes.FFEnumValue(BlockchainNodeProvider, "remote-rpc")
)
const DatabaseSelection = "database_selection"
var (
DatabaseSelectionSQLite = fftypes.FFEnumValue(DatabaseSelection, "sqlite3")
DatabaseSelectionPostgres = fftypes.FFEnumValue(DatabaseSelection, "postgres")
)
const TokenProvider = "token_provider"
var (
TokenProviderNone = fftypes.FFEnumValue(TokenProvider, "none")
TokenProviderERC1155 = fftypes.FFEnumValue(TokenProvider, "erc1155")
TokenProviderERC20_ERC721 = fftypes.FFEnumValue(TokenProvider, "erc20_erc721")
)
const ReleaseChannelSelection = "release_channel"
var (
ReleaseChannelStable = fftypes.FFEnumValue(ReleaseChannelSelection, "stable")
ReleaseChannelHead = fftypes.FFEnumValue(ReleaseChannelSelection, "head")
ReleaseChannelAlpha = fftypes.FFEnumValue(ReleaseChannelSelection, "alpha")
ReleaseChannelBeta = fftypes.FFEnumValue(ReleaseChannelSelection, "beta")
ReleaseChannelRC = fftypes.FFEnumValue(ReleaseChannelSelection, "rc")
)
func FFEnumArray(ctx context.Context, a []string) ([]fftypes.FFEnum, error) {
enums := make([]fftypes.FFEnum, len(a))
for i, v := range a {
enums[i] = fftypes.FFEnum(v)
}
return enums, nil
}
func FFEnumArrayToStrings(input []fftypes.FFEnum) []string {
s := make([]string, 0)
for _, e := range input {
if e != "none" {
s = append(s, e.String())
}
}
return s
}