Skip to content

Commit

Permalink
Update apis for fabric v2.5.1 (#113)
Browse files Browse the repository at this point in the history
#111

Signed-off-by: asararatnakar <[email protected]>
  • Loading branch information
asararatnakar authored Jun 2, 2023
1 parent 8546a39 commit b7a6be1
Show file tree
Hide file tree
Showing 3 changed files with 122 additions and 117 deletions.
85 changes: 85 additions & 0 deletions api/peer/v25/peer.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
/*
* Copyright contributors to the Hyperledger Fabric Operator project
*
* 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 language governing permissions and
* limitations under the License.
*/

package v25

import (
"github.com/IBM-Blockchain/fabric-operator/api/common"
v1 "github.com/IBM-Blockchain/fabric-operator/api/peer/v1"
v2 "github.com/IBM-Blockchain/fabric-operator/api/peer/v2"
)

type Core struct {
Peer Peer `json:"peer,omitempty"`
Chaincode v2.Chaincode `json:"chaincode,omitempty"`
Operations v1.Operations `json:"operations,omitempty"`
Metrics v1.Metrics `json:"metrics,omitempty"`
VM v1.VM `json:"vm,omitempty"`
Ledger Ledger `json:"ledger,omitempty"`
// Not Fabric - this is for deployment
MaxNameLength *int `json:"maxnamelength,omitempty"`
}

type Peer struct {
ID string `json:"id,omitempty"`
NetworkID string `json:"networkId,omitempty"`
ListenAddress string `json:"listenAddress,omitempty"`
ChaincodeListenAddress string `json:"chaincodeListenAddress,omitempty"`
ChaincodeAddress string `json:"chaincodeAddress,omitempty"`
Address string `json:"address,omitempty"`
AddressAutoDetect *bool `json:"addressAutoDetect,omitempty"`
Gateway Gateway `json:"gateway,omitempty"`
Keepalive v2.KeepAlive `json:"keepalive,omitempty"`
Gossip v2.Gossip `json:"gossip,omitempty"`
TLS v1.TLS `json:"tls,omitempty"`
Authentication v1.Authentication `json:"authentication,omitempty"`
FileSystemPath string `json:"fileSystemPath,omitempty"`
BCCSP *common.BCCSP `json:"BCCSP,omitempty"`
MspConfigPath string `json:"mspConfigPath,omitempty"`
LocalMspId string `json:"localMspId,omitempty"`
Client v1.Client `json:"client,omitempty"`
DeliveryClient v1.DeliveryClient `json:"deliveryclient,omitempty"`
LocalMspType string `json:"localMspType,omitempty"`
Profile v1.Profile `json:"profile,omitempty"`
AdminService v1.AdminService `json:"adminService,omitempty"`
Handlers v1.HandlersConfig `json:"handlers,omitempty"`
ValidatorPoolSize int `json:"validatorPoolSize,omitempty"`
Discovery v1.Discovery `json:"discovery,omitempty"`
Limits v2.Limits `json:"limits,omitempty"`
}

type Ledger struct {
State v2.LedgerState `json:"state,omitempty"`
History v1.LedgerHistory `json:"history,omitempty"`
PvtDataStore PvtDataStore `json:"pvtdataStore,omitempty"`
}

type Gateway struct {
Enabled *bool `json:"enabled,omitempty"`
EndorsementTimeout common.Duration `json:"endorsementTimeout,omitempty"`
DialTimeout common.Duration `json:"dialTimeout,omitempty"`
BroadcastTimeout common.Duration `json:"broadcastTimeout,omitempty"`
}

type PvtDataStore struct {
CollElgProcMaxDbBatchSize int `json:"collElgProcMaxDbBatchSize,omitempty"`
CollElgProcDbBatchesInterval int `json:"collElgProcDbBatchesInterval,omitempty"`
DeprioritizedDataReconcilerInterval common.Duration `json:"deprioritizedDataReconcilerInterval,omitempty"`
PurgeInterval int `json:"purgeInterval,omitempty"`
PurgedKeyAuditLogging *bool `json:"purgedKeyAuditLogging,omitempty"`
}
24 changes: 12 additions & 12 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
module github.com/IBM-Blockchain/fabric-operator

go 1.18
go 1.20

require (
github.com/docker/docker v20.10.12+incompatible
k8s.io/api v0.21.5
k8s.io/apimachinery v0.21.5
k8s.io/api v0.24.13
k8s.io/apimachinery v0.24.13
)

require (
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/go-logr/logr v0.4.0 // indirect
github.com/go-logr/logr v1.2.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/google/go-cmp v0.5.6 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/json-iterator/go v1.1.10 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/stretchr/testify v1.7.0 // indirect
golang.org/x/net v0.0.0-20210917221730-978cfadd31cf // indirect
golang.org/x/text v0.3.7 // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/text v0.7.0 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
k8s.io/klog/v2 v2.8.0 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect
k8s.io/klog/v2 v2.60.1 // indirect
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
)

replace (
Expand Down
Loading

0 comments on commit b7a6be1

Please sign in to comment.