v1alpha1

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the hyperledger.org v1alpha1 API group +kubebuilder:object:generate=true +groupName=hyperledger.org

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "hyperledger.org", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type Argo added in v0.4.0

type Argo struct {
	// Service account to run all Argo worklow pods with.
	ServiceAccountName string `json:"serviceAccountName,omitempty"`
}

func (*Argo) DeepCopy added in v0.4.0

func (in *Argo) DeepCopy() *Argo

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Argo.

func (*Argo) DeepCopyInto added in v0.4.0

func (in *Argo) DeepCopyInto(out *Argo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CcChannel

type CcChannel struct {
	// Name of channel
	Name string `json:"name"`
	// Chaincode will be instantiated/upgraded using the first peer in the first organization.
	// Chaincode will be invoked on all peers in these organizations.
	Orgs []string `json:"orgs"`
	// Chaincode policy
	Policy string `json:"policy"`
}

Chaincode channel

func (*CcChannel) DeepCopy

func (in *CcChannel) DeepCopy() *CcChannel

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CcChannel.

func (*CcChannel) DeepCopyInto

func (in *CcChannel) DeepCopyInto(out *CcChannel)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Chaincode

type Chaincode struct {
	// Name of chaincode
	Name string `json:"name"`
	// Version of chaincode. If defined, this will override the global chaincode.version value
	Version string `json:"version,omitempty"`
	// Programming language of chaincode. If defined, this will override the global chaincode.language value
	Language string `json:"language,omitempty"`
	// Chaincode will be installed to all peers in these peer organizations
	Orgs []string `json:"orgs"`
	// Channels are we instantiating/upgrading this chaincode
	CcChannel []CcChannel `json:"channels"`
}

func (*Chaincode) DeepCopy

func (in *Chaincode) DeepCopy() *Chaincode

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Chaincode.

func (*Chaincode) DeepCopyInto

func (in *Chaincode) DeepCopyInto(out *Chaincode)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ChaincodeConfig

type ChaincodeConfig struct {
	// Version of chaincode. If defined, this will override the global chaincode.version value
	Version string `json:"version,omitempty"`
	// Programming language of chaincode. If defined, this will override the global chaincode.language value
	Language string `json:"language,omitempty"`
	// Folder containing chaincode folders
	Folder string `json:"folder,omitempty"`
}

ChaincodeConfig is the global chaincode settings and source of chaincode sources. Source is either a folder or an implied list of ConfigMaps. Each chaincode is TAR acrhived and expected to be in a ConfigMap hlf-chaincode--<chaincode name>

func (*ChaincodeConfig) DeepCopy

func (in *ChaincodeConfig) DeepCopy() *ChaincodeConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChaincodeConfig.

func (*ChaincodeConfig) DeepCopyInto

func (in *ChaincodeConfig) DeepCopyInto(out *ChaincodeConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Channel

type Channel struct {
	// Name of channel
	Name string `json:"name"`
	// Peer organizations in the channel
	Orgs []string `json:"orgs"`
}

func (*Channel) DeepCopy

func (in *Channel) DeepCopy() *Channel

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Channel.

func (*Channel) DeepCopyInto

func (in *Channel) DeepCopyInto(out *Channel)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Configtx

type Configtx struct {
	File string `json:"file,omitempty"`
	// +kubebuilder:validation:Enum=hlf-configtx.yaml
	Secret string `json:"secret,omitempty"`
}

Configtx is the source of configtx.yaml file. either a Kubernetes Secret or a file. file can only be used via CLI

func (*Configtx) DeepCopy

func (in *Configtx) DeepCopy() *Configtx

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Configtx.

func (*Configtx) DeepCopyInto

func (in *Configtx) DeepCopyInto(out *Configtx)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CryptoConfig

type CryptoConfig struct {
	// Folder containing crypto-material
	Folder string `json:"folder,omitempty"`
	// +kubebuilder:validation:Enum=hlf-crypto-config
	Secret string `json:"secret,omitempty"`
}

CryptoConfig is the source of crypto materials. either a Kubernetes Secret or a folder. If none provided Fabric Operator will create the crypto materials via cryptogen tool. The secret contains TAR archived crypto material in the field "crypto-config"

func (*CryptoConfig) DeepCopy

func (in *CryptoConfig) DeepCopy() *CryptoConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CryptoConfig.

func (*CryptoConfig) DeepCopyInto

func (in *CryptoConfig) DeepCopyInto(out *CryptoConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (CryptoConfig) IsProvided

func (c CryptoConfig) IsProvided() bool

IsProvided returns true either Folder or Secret is not empty string

type FabricNetwork

type FabricNetwork struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   FabricNetworkSpec   `json:"spec,omitempty"`
	Status FabricNetworkStatus `json:"status,omitempty"`
}

FabricNetwork is the Schema for the fabricnetworks API

func (*FabricNetwork) DeepCopy

func (in *FabricNetwork) DeepCopy() *FabricNetwork

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FabricNetwork.

func (*FabricNetwork) DeepCopyInto

func (in *FabricNetwork) DeepCopyInto(out *FabricNetwork)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*FabricNetwork) DeepCopyObject

func (in *FabricNetwork) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type FabricNetworkList

type FabricNetworkList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []FabricNetwork `json:"items"`
}

FabricNetworkList contains a list of FabricNetwork

func (*FabricNetworkList) DeepCopy

func (in *FabricNetworkList) DeepCopy() *FabricNetworkList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FabricNetworkList.

func (*FabricNetworkList) DeepCopyInto

func (in *FabricNetworkList) DeepCopyInto(out *FabricNetworkList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*FabricNetworkList) DeepCopyObject

func (in *FabricNetworkList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type FabricNetworkSpec

type FabricNetworkSpec struct {
	Configtx     Configtx        `json:"configtx"`
	Genesis      Genesis         `json:"genesis,omitempty"`
	CryptoConfig CryptoConfig    `json:"crypto-config,omitempty"`
	Chaincode    ChaincodeConfig `json:"chaincode,omitempty"`

	// Adds additional DNS entries to /etc/hosts files of pods
	// This is provided for communication with external peers/orderers
	// if useActualDomains is true, Fabric Operator will still create internal hostAliases and append to this one
	HostAliases []corev1.HostAlias `json:"hostAliases,omitempty"`

	Topology Topology `json:"topology,omitempty"`
	Network  Network  `json:"network,omitempty"`

	// ForceState forces fabric operator to set the the state of FabricNetwork to given state and continue. Use with caution.
	// +kubebuilder:validation:Enum=New;Ready;HelmChartInstalled;HelmChartNeedsUpdate;HelmChartNeedsDoubleUpdate;HelmChartReady;ChannelFlowCompleted;ChaincodeFlowCompleted;PeerOrgFlowCompleted
	ForceState State `json:"forceState,omitempty"`

	// Additional values passed to all Argo workflows
	Argo Argo `json:"argo,omitempty"`

	// Additional values passed to hlf-kube Helm chart
	// +kubebuilder:pruning:PreserveUnknownFields
	HlfKube runtime.RawExtension `json:"hlf-kube,omitempty"`
	// Additional values passed to channel-flow
	// +kubebuilder:pruning:PreserveUnknownFields
	ChannelFlow runtime.RawExtension `json:"channel-flow,omitempty"`
	// Additional values passed to chaincode-flow
	// +kubebuilder:pruning:PreserveUnknownFields
	ChaincodeFlow runtime.RawExtension `json:"chaincode-flow,omitempty"`
	// Additional values passed to peer-org-flow
	// +kubebuilder:pruning:PreserveUnknownFields
	PeerOrgFlow runtime.RawExtension `json:"peer-org-flow,omitempty"`
}

FabricNetworkSpec defines the desired state of FabricNetwork

func (*FabricNetworkSpec) DeepCopy

func (in *FabricNetworkSpec) DeepCopy() *FabricNetworkSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FabricNetworkSpec.

func (*FabricNetworkSpec) DeepCopyInto

func (in *FabricNetworkSpec) DeepCopyInto(out *FabricNetworkSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FabricNetworkStatus

type FabricNetworkStatus struct {
	State    State  `json:"state,omitempty"`
	Message  string `json:"message,omitempty"`
	Workflow string `json:"workflow,omitempty"`
	// +kubebuilder:validation:Enum=None;PeerOrgFlow
	NextFlow NextFlow `json:"nextflow,omitempty"`

	Chaincode  ChaincodeConfig `json:"chaincode,omitempty"`
	Topology   Topology        `json:"topology,omitempty"`
	Channels   []Channel       `json:"channels,omitempty"`
	Chaincodes []Chaincode     `json:"chaincodes,omitempty"`
}

FabricNetworkStatus defines the observed state of FabricNetwork

func (*FabricNetworkStatus) DeepCopy

func (in *FabricNetworkStatus) DeepCopy() *FabricNetworkStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FabricNetworkStatus.

func (*FabricNetworkStatus) DeepCopyInto

func (in *FabricNetworkStatus) DeepCopyInto(out *FabricNetworkStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Genesis

type Genesis struct {
	File string `json:"file,omitempty"`
	// +kubebuilder:validation:Enum=hlf-genesis.block
	Secret string `json:"secret,omitempty"`
}

Genesis is the source of genesis block. either a Kubernetes Secret or a file. If none provided Fabric Operator will create the genesis block. file can only be used via CLI

func (*Genesis) DeepCopy

func (in *Genesis) DeepCopy() *Genesis

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Genesis.

func (*Genesis) DeepCopyInto

func (in *Genesis) DeepCopyInto(out *Genesis)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (Genesis) IsProvided

func (g Genesis) IsProvided() bool

IsProvided returns true either File or Secret is not empty string

type Network

type Network struct {
	GenesisProfile  string `json:"genesisProfile,omitempty"`
	SystemChannelID string `json:"systemChannelID,omitempty"`

	Channels   []Channel   `json:"channels,omitempty"`
	Chaincodes []Chaincode `json:"chaincodes,omitempty"`
}

func (*Network) DeepCopy

func (in *Network) DeepCopy() *Network

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Network.

func (*Network) DeepCopyInto

func (in *Network) DeepCopyInto(out *Network)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NextFlow

type NextFlow string
const (
	NextFlowNone        NextFlow = "None"
	NextFlowPeerOrgFlow NextFlow = "PeerOrgFlow"
)

type OrdererOrg

type OrdererOrg struct {
	// Name of organization
	Name string `json:"name"`
	// Domain of organization
	Domain string `json:"domain"`
	// orderer hosts list, at least one is required
	Hosts []string `json:"hosts"`
}

Orderer organization

func (*OrdererOrg) DeepCopy

func (in *OrdererOrg) DeepCopy() *OrdererOrg

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrdererOrg.

func (*OrdererOrg) DeepCopyInto

func (in *OrdererOrg) DeepCopyInto(out *OrdererOrg)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PeerOrg

type PeerOrg struct {
	// Name of organization
	Name string `json:"name"`
	// Domain of organization
	Domain string `json:"domain"`
	// number of peers
	PeerCount int32 `json:"peerCount"`
}

Peer organization

func (*PeerOrg) DeepCopy

func (in *PeerOrg) DeepCopy() *PeerOrg

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PeerOrg.

func (*PeerOrg) DeepCopyInto

func (in *PeerOrg) DeepCopyInto(out *PeerOrg)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type State

type State string
const (
	StateNew                        State = "New"
	StateReady                      State = "Ready"
	StateRejected                   State = "Rejected"
	StateInvalid                    State = "Invalid"
	StateFailed                     State = "Failed"
	StateHelmChartInstalled         State = "HelmChartInstalled"
	StateHelmChartNeedsUpdate       State = "HelmChartNeedsUpdate"
	StateHelmChartNeedsDoubleUpdate State = "HelmChartNeedsDoubleUpdate"
	StateHelmChartReady             State = "HelmChartReady"
	StateChannelFlowSubmitted       State = "ChannelFlowSubmitted"
	StateChannelFlowCompleted       State = "ChannelFlowCompleted"
	StateChaincodeFlowSubmitted     State = "ChaincodeFlowSubmitted"
	StateChaincodeFlowCompleted     State = "ChaincodeFlowCompleted"
	StatePeerOrgFlowSubmitted       State = "PeerOrgFlowSubmitted"
	StatePeerOrgFlowCompleted       State = "PeerOrgFlowCompleted"
)

type Topology

type Topology struct {

	// Hyperledger Fabric Version
	Version string `json:"version"`
	// TLS enabled?
	TLSEnabled bool `json:"tlsEnabled,omitempty"`
	// use actual domain names like peer0.atlantis.com instead of internal service names
	UseActualDomains bool `json:"useActualDomains,omitempty"`

	// Orderer organizations
	OrdererOrgs []OrdererOrg `json:"ordererOrgs,omitempty"`
	// Peer organizations
	PeerOrgs []PeerOrg `json:"peerOrgs,omitempty"`
}

Topology of the Fabric network managed by Fabric Operator. Also contains some top level properties which is applied to whole network.

func (*Topology) DeepCopy

func (in *Topology) DeepCopy() *Topology

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Topology.

func (*Topology) DeepCopyInto

func (in *Topology) DeepCopyInto(out *Topology)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (Topology) OrdererOrgByName

func (t Topology) OrdererOrgByName(name string) *OrdererOrg

func (Topology) OrdererOrgNames

func (t Topology) OrdererOrgNames() map[string]bool

func (Topology) PeerOrgByName

func (t Topology) PeerOrgByName(name string) *PeerOrg

func (Topology) PeerOrgNames

func (t Topology) PeerOrgNames() map[string]bool

Jump to

Keyboard shortcuts

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