types

package
v0.0.0-...-471bb1c Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const BlockchainConnector = "blockchain_connector"
View Source
const BlockchainNodeProvider = "blockchain_node_provider"
View Source
const BlockchainProvider = "blockchain_provider"
View Source
const DatabaseSelection = "database_selection"
View Source
const IPFSMode = "ipfs_mode"
View Source
const ReleaseChannelSelection = "release_channel"
View Source
const TokenProvider = "token_provider"

Variables

View Source
var (
	IPFSModePrivate = fftypes.FFEnumValue(IPFSMode, "private")
	IPFSModePublic  = fftypes.FFEnumValue(IPFSMode, "public")
)
View Source
var (
	BlockchainProviderEthereum = fftypes.FFEnumValue(BlockchainProvider, "ethereum")
	BlockchainProviderFabric   = fftypes.FFEnumValue(BlockchainProvider, "fabric")
	BlockchainProviderCorda    = fftypes.FFEnumValue(BlockchainProvider, "corda")
)
View Source
var (
	BlockchainConnectorEthconnect = fftypes.FFEnumValue(BlockchainConnector, "ethconnect")
	BlockchainConnectorEvmconnect = fftypes.FFEnumValue(BlockchainConnector, "evmconnect")
	BlockchainConnectorFabconnect = fftypes.FFEnumValue(BlockchainConnector, "fabric")
)
View Source
var (
	BlockchainNodeProviderGeth      = fftypes.FFEnumValue(BlockchainNodeProvider, "geth")
	BlockchainNodeProviderBesu      = fftypes.FFEnumValue(BlockchainNodeProvider, "besu")
	BlockchainNodeProviderRemoteRPC = fftypes.FFEnumValue(BlockchainNodeProvider, "remote-rpc")
)
View Source
var (
	DatabaseSelectionSQLite   = fftypes.FFEnumValue(DatabaseSelection, "sqlite3")
	DatabaseSelectionPostgres = fftypes.FFEnumValue(DatabaseSelection, "postgres")
)
View Source
var (
	TokenProviderNone         = fftypes.FFEnumValue(TokenProvider, "none")
	TokenProviderERC1155      = fftypes.FFEnumValue(TokenProvider, "erc1155")
	TokenProviderERC20_ERC721 = fftypes.FFEnumValue(TokenProvider, "erc20_erc721")
)
View Source
var (
	ReleaseChannelStable = fftypes.FFEnumValue(ReleaseChannelSelection, "stable")
	ReleaseChannelAlpha  = fftypes.FFEnumValue(ReleaseChannelSelection, "alpha")
	ReleaseChannelBeta   = fftypes.FFEnumValue(ReleaseChannelSelection, "beta")
	ReleaseChannelRC     = fftypes.FFEnumValue(ReleaseChannelSelection, "rc")
)

Functions

func FFEnumArray

func FFEnumArray(ctx context.Context, a []string) ([]fftypes.FFEnum, error)

func FFEnumArrayToStrings

func FFEnumArrayToStrings(input []fftypes.FFEnum) []string

Types

type AdminServerConfig

type AdminServerConfig struct {
	HttpServerConfig `yaml:",inline"`
	Enabled          bool `yaml:"enabled,omitempty"`
	PreInit          bool `yaml:"preinit,omitempty"`
}

type BasicAuth

type BasicAuth struct {
	Username string `yaml:"username,omitempty"`
	Password string `yaml:"password,omitempty"`
}

type BlockchainConfig

type BlockchainConfig struct {
	Name     string          `yaml:"name,omitempty"`
	Type     string          `yaml:"type,omitempty"`
	Ethereum *EthereumConfig `yaml:"ethereum,omitempty"`
	Fabric   *FabricConfig   `yaml:"fabric,omitempty"`
}

type CommonDBConfig

type CommonDBConfig struct {
	URL        string            `yaml:"url,omitempty"`
	Migrations *MigrationsConfig `yaml:"migrations,omitempty"`
}

type ContractConfig

type ContractConfig struct {
	Location   interface{} `yaml:"location"`
	FirstEvent string      `yaml:"firstEvent"`
}

type ContractDeploymentResult

type ContractDeploymentResult struct {
	Message          string
	DeployedContract *DeployedContract
}

type DBEventsConfig

type DBEventsConfig struct {
	BufferSize int `yaml:"bufferSize,omitempty"`
}

type DataExchangeConfig

type DataExchangeConfig struct {
	Name string              `yaml:"name,omitempty"`
	Type string              `yaml:"type,omitempty"`
	FFDX *HttpEndpointConfig `yaml:"ffdx,omitempty"`
}

type DatabaseConfig

type DatabaseConfig struct {
	Name       string          `yaml:"name,omitempty"`
	Type       string          `yaml:"type,omitempty"`
	PostgreSQL *CommonDBConfig `yaml:"postgres,omitempty"`
	SQLite3    *CommonDBConfig `yaml:"sqlite3,omitempty"`
}

type DeployedContract

type DeployedContract struct {
	Name     string      `json:"name"`
	Location interface{} `json:"location"`
}

type EthconnectConfig

type EthconnectConfig struct {
	URL   string     `yaml:"url,omitempty"`
	Topic string     `yaml:"topic,omitempty"`
	Auth  *BasicAuth `yaml:"auth,omitempty"`
}

type EthereumConfig

type EthereumConfig struct {
	Ethconnect *EthconnectConfig `yaml:"ethconnect,omitempty"`
}

type EventConfig

type EventConfig struct {
	DBEvents *DBEventsConfig `yaml:"dbevents,omitempty"`
}

type FFTokensConfig

type FFTokensConfig struct {
	URL string `yaml:"url,omitempty"`
}

type FabconnectConfig

type FabconnectConfig struct {
	URL       string `yaml:"url,omitempty"`
	Channel   string `yaml:"channel,omitempty"`
	Chaincode string `yaml:"chaincode,omitempty"`
	Topic     string `yaml:"topic,omitempty"`
	Signer    string `yaml:"signer,omitempty"`
}

type FabricConfig

type FabricConfig struct {
	Fabconnect *FabconnectConfig `yaml:"fabconnect,omitempty"`
}

type FireflyConfig

type FireflyConfig struct {
	Log        *LogConfig           `yaml:"log,omitempty"`
	Debug      *HttpServerConfig    `yaml:"debug,omitempty"`
	HTTP       *HttpServerConfig    `yaml:"http,omitempty"`
	Admin      *AdminServerConfig   `yaml:"admin,omitempty"` // V1.0 admin API
	SPI        *SPIServerConfig     `yaml:"spi,omitempty"`   // V1.1 and later SPI
	Metrics    *MetricsServerConfig `yaml:"metrics,omitempty"`
	UI         *UIConfig            `yaml:"ui,omitempty"`
	Node       *NodeConfig          `yaml:"node,omitempty"`
	Event      *EventConfig         `yaml:"event,omitempty"`
	Plugins    *Plugins             `yaml:"plugins"`
	Namespaces *NamespacesConfig    `yaml:"namespaces"`
}

type FireflyIPFSConfig

type FireflyIPFSConfig struct {
	API     *HttpEndpointConfig `yaml:"api,omitempty"`
	Gateway *HttpEndpointConfig `yaml:"gateway,omitempty"`
}

type GitHubRelease

type GitHubRelease struct {
	TagName string `json:"tag_name,omitempty"`
}

type HexAddress

type HexAddress string

func (HexAddress) MarshalYAML

func (h HexAddress) MarshalYAML() (interface{}, error)

Explicitly quote hex addresses so that they are interpreted as string (not int)

type HttpEndpointConfig

type HttpEndpointConfig struct {
	URL  string    `yaml:"url,omitempty"`
	Auth BasicAuth `yaml:"auth,omitempty"`
}

type HttpServerConfig

type HttpServerConfig struct {
	Port      int    `yaml:"port,omitempty"`
	Address   string `yaml:"address,omitempty"`
	PublicURL string `yaml:"publicURL,omitempty"`
}

type InitOptions

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
}

type LogConfig

type LogConfig struct {
	Level string `yaml:"level,omitempty"`
}

type ManifestEntry

type ManifestEntry struct {
	Image string `json:"image,omitempty"`
	Local bool   `json:"local,omitempty"`
	Tag   string `json:"tag,omitempty"`
	SHA   string `json:"sha,omitempty"`
}

func (*ManifestEntry) GetDockerImageString

func (m *ManifestEntry) GetDockerImageString() string

type MetricsServerConfig

type MetricsServerConfig struct {
	HttpServerConfig `yaml:",inline"`
	Enabled          bool   `yaml:"enabled,omitempty"`
	Path             string `yaml:"path,omitempty"`
}

type MigrationsConfig

type MigrationsConfig struct {
	Auto      bool   `yaml:"auto,omitempty"`
	Directory string `yaml:"directory,omitempty"`
}

type MultipartyConfig

type MultipartyConfig struct {
	Enabled  bool              `yaml:"enabled"`
	Org      *OrgConfig        `yaml:"org"`
	Contract []*ContractConfig `yaml:"contract"`
}

type MultipartyOrgConfig

type MultipartyOrgConfig struct {
	Name        string `yaml:"name"`
	Description string `yaml:"description,omitempty"`
	Key         string `yaml:"key"`
}

type Namespace

type Namespace struct {
	Name        string            `yaml:"name"`
	Description string            `yaml:"description,omitempty"`
	Plugins     []string          `yaml:"plugins"`
	Multiparty  *MultipartyConfig `yaml:"multiparty,omitempty"`
	DefaultKey  interface{}       `yaml:"defaultKey"`
}

type NamespacesConfig

type NamespacesConfig struct {
	Default    string       `json:"default"`
	Predefined []*Namespace `json:"predefined"`
}

type NodeConfig

type NodeConfig struct {
	Name string `yaml:"name,omitempty"`
}

type OrgConfig

type OrgConfig struct {
	Name string `yaml:"name,omitempty"`
	Key  string `yaml:"key,omitempty"`
}

type Organization

type Organization struct {
	ID                          string       `json:"id,omitempty"`
	Index                       *int         `json:"index,omitempty"`
	Account                     interface{}  `json:"account,omitempty"`
	ExposedFireflyPort          int          `json:"exposedFireflyPort,omitempty"`
	ExposedFireflyAdminSPIPort  int          `json:"exposedFireflyAdminPort,omitempty"` // stack.json still contains the word "Admin" (rather than SPI) for migration
	ExposedFireflyMetricsPort   int          `json:"exposedFireflyMetricsPort,omitempty"`
	ExposedConnectorPort        int          `json:"exposedConnectorPort,omitempty"`
	ExposedConnectorMetricsPort int          `json:"exposedConnectorMetricsPort,omitempty"`
	ExposedDatabasePort         int          `json:"exposedPostgresPort,omitempty"`
	ExposedDataexchangePort     int          `json:"exposedDataexchangePort,omitempty"`
	ExposedIPFSApiPort          int          `json:"exposedIPFSApiPort,omitempty"`
	ExposedIPFSGWPort           int          `json:"exposedIPFSGWPort,omitempty"`
	ExposedUIPort               int          `json:"exposedUiPort,omitempty"`
	ExposedSandboxPort          int          `json:"exposedSandboxPort,omitempty"`
	ExposedTokensPorts          []int        `json:"exposedTokensPorts,omitempty"`
	External                    bool         `json:"external,omitempty"`
	OrgName                     string       `json:"orgName,omitempty"`
	NodeName                    string       `json:"nodeName,omitempty"`
	Namespaces                  []*Namespace `json:"namespaces"`
}

type Plugins

type Plugins struct {
	Database      []*DatabaseConfig      `yaml:"database,omitempty"`
	Blockchain    []*BlockchainConfig    `yaml:"blockchain,omitempty"`
	SharedStorage []*SharedStorageConfig `yaml:"sharedstorage,omitempty"`
	DataExchange  []*DataExchangeConfig  `yaml:"dataexchange,omitempty"`
	Tokens        []*TokensConfig        `yaml:"tokens,omitempty"`
}

type PullOptions

type PullOptions struct {
	Retries int
}

type SPIServerConfig

type SPIServerConfig struct {
	HttpServerConfig `yaml:",inline"`
	Enabled          bool `yaml:"enabled,omitempty"`
}

type SharedStorageConfig

type SharedStorageConfig struct {
	Name string             `yaml:"name,omitempty"`
	Type string             `yaml:"type,omitempty"`
	IPFS *FireflyIPFSConfig `yaml:"ipfs,omitempty"`
}

type Stack

type Stack struct {
	Name                   string           `json:"name,omitempty"`
	Members                []*Organization  `json:"members,omitempty"`
	SwarmKey               string           `json:"swarmKey,omitempty"`
	ExposedBlockchainPort  int              `json:"exposedBlockchainPort,omitempty"`
	Database               fftypes.FFEnum   `json:"database"`
	BlockchainProvider     fftypes.FFEnum   `json:"blockchainProvider"`
	BlockchainConnector    fftypes.FFEnum   `json:"blockchainConnector"`
	BlockchainNodeProvider fftypes.FFEnum   `json:"blockchainNodeProvider"`
	TokenProviders         []fftypes.FFEnum `json:"tokenProviders"`
	VersionManifest        *VersionManifest `json:"versionManifest,omitempty"`
	PrometheusEnabled      bool             `json:"prometheusEnabled,omitempty"`
	SandboxEnabled         bool             `json:"sandboxEnabled,omitempty"`
	MultipartyEnabled      bool             `json:"multiparty"`
	ExposedPrometheusPort  int              `json:"exposedPrometheusPort,omitempty"`
	ContractAddress        string           `json:"contractAddress,omitempty"`
	ChainIDPtr             *int64           `json:"chainID,omitempty"`
	RemoteNodeURL          string           `json:"remoteNodeURL,omitempty"`
	DisableTokenFactories  bool             `json:"disableTokenFactories,omitempty"`
	RequestTimeout         int              `json:"requestTimeout,omitempty"`
	IPFSMode               fftypes.FFEnum   `json:"ipfsMode"`
	RemoteFabricNetwork    bool             `json:"remoteFabricNetwork,omitempty"`
	ChannelName            string           `json:"channelName,omitempty"`
	ChaincodeName          string           `json:"chaincodeName,omitempty"`
	InitDir                string           `json:"-"`
	RuntimeDir             string           `json:"-"`
	StackDir               string           `json:"-"`
	State                  *StackState      `json:"-"`
}

func (*Stack) ChainID

func (s *Stack) ChainID() int64

func (*Stack) HasRunBefore

func (s *Stack) HasRunBefore() (bool, error)

func (*Stack) IsOldFileStructure

func (s *Stack) IsOldFileStructure() (bool, error)

type StackState

type StackState struct {
	DeployedContracts []*DeployedContract `json:"deployedContracts"`
	Accounts          []interface{}       `json:"accounts"`
}

type StartOptions

type StartOptions struct {
	NoRollback bool
}

type TokensConfig

type TokensConfig struct {
	Type     string          `yaml:"type,omitempty"`
	Name     string          `yaml:"name,omitempty"`
	FFTokens *FFTokensConfig `yaml:"fftokens,omitempty"`
}

type UIConfig

type UIConfig struct {
	Path string `yaml:"path,omitempty"`
}

type VersionManifest

type VersionManifest struct {
	FireFly           *ManifestEntry `json:"firefly,omitempty"`
	Ethconnect        *ManifestEntry `json:"ethconnect"`
	Evmconnect        *ManifestEntry `json:"evmconnect"`
	Fabconnect        *ManifestEntry `json:"fabconnect"`
	DataExchange      *ManifestEntry `json:"dataexchange-https"`
	TokensERC1155     *ManifestEntry `json:"tokens-erc1155"`
	TokensERC20ERC721 *ManifestEntry `json:"tokens-erc20-erc721"`
	Signer            *ManifestEntry `json:"signer"`
}

func (*VersionManifest) Entries

func (m *VersionManifest) Entries() []*ManifestEntry

Jump to

Keyboard shortcuts

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