types

package
v1.1.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2022 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BlockchainNodeProviderStrings = []string{"geth", "besu", "remote-rpc"}
View Source
var BlockchainProviderStrings = []string{"ethereum", "fabric", "corda"}
View Source
var DBSelectionStrings = []string{"postgres", "sqlite3"}
View Source
var ReleaseChannelSelectionStrings = []string{"stable", "rc", "beta", "alpha", "head"}
View Source
var ValidTokenProviders = []TokenProvider{NilTokens, ERC1155, ERC20_ERC721}

Functions

func BlockchainFromStrings added in v1.0.2

func BlockchainFromStrings(blockchainString, nodeString string) (blockchain BlockchainProvider, node BlockchainNodeProvider, err error)

Types

type AdminServerConfig added in v1.1.0

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

type BasicAuth added in v1.1.0

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

type BlockchainConfig added in v1.1.0

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

type BlockchainNodeProvider added in v1.0.2

type BlockchainNodeProvider int
const (
	GoEthereum BlockchainNodeProvider = iota
	HyperledgerBesu
	RemoteRPC
)

func (BlockchainNodeProvider) String added in v1.0.2

func (blockchainNodeProvider BlockchainNodeProvider) String() string

type BlockchainProvider added in v0.0.47

type BlockchainProvider int
const (
	Ethereum BlockchainProvider = iota
	HyperledgerFabric
	Corda
)

func (BlockchainProvider) String added in v0.0.47

func (blockchainProvider BlockchainProvider) String() string

type CommonDBConfig added in v1.1.0

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

type ContractConfig added in v1.1.0

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

type ContractDeploymentResult added in v1.0.0

type ContractDeploymentResult struct {
	Message          string
	DeployedContract *DeployedContract
}

type DBEventsConfig added in v1.1.0

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

type DataExchangeConfig added in v1.1.0

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

type DatabaseConfig added in v1.1.0

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

type DatabaseSelection added in v0.0.47

type DatabaseSelection int
const (
	PostgreSQL DatabaseSelection = iota
	SQLite3
)

func DatabaseSelectionFromString added in v0.0.47

func DatabaseSelectionFromString(s string) (DatabaseSelection, error)

func (DatabaseSelection) String added in v0.0.47

func (db DatabaseSelection) String() string

type DeployedContract added in v0.0.47

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

type EthconnectConfig added in v1.1.0

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

type EthereumConfig added in v1.1.0

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

type EventConfig added in v1.1.0

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

type FFTMConfig

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

type FFTokensConfig added in v1.1.0

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

type FabconnectConfig added in v1.1.0

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 added in v1.1.0

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

type FireflyConfig added in v1.1.0

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 added in v1.1.0

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

type GitHubRelease added in v0.0.34

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

type HttpEndpointConfig added in v1.1.0

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

type HttpServerConfig added in v1.1.0

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

type InitOptions added in v0.0.47

type InitOptions struct {
	FireFlyBasePort           int
	ServicesBasePort          int
	DatabaseSelection         DatabaseSelection
	Verbose                   bool
	ExternalProcesses         int
	OrgNames                  []string
	NodeNames                 []string
	BlockchainProvider        BlockchainProvider
	BlockchainNodeProvider    BlockchainNodeProvider
	TokenProviders            TokenProviders
	FireFlyVersion            string
	ManifestPath              string
	PrometheusEnabled         bool
	PrometheusPort            int
	SandboxEnabled            bool
	FFTMEnabled               bool
	ExtraCoreConfigPath       string
	ExtraEthconnectConfigPath string
	ExtraFFTMConfigPath       string
	BlockPeriod               int
	ContractAddress           string
	RemoteNodeURL             string
	ChainID                   int64
	DisableTokenFactories     bool
	RequestTimeout            int
	ReleaseChannel            ReleaseChannelSelection
	MultipartyEnabled         bool
}

type LogConfig added in v1.1.0

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

type ManifestEntry added in v0.0.34

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 added in v0.0.34

func (m *ManifestEntry) GetDockerImageString() string

type MetricsServerConfig added in v1.1.0

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

type MigrationsConfig added in v1.1.0

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

type MultipartyConfig added in v1.1.0

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

type MultipartyOrgConfig added in v1.1.0

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

type Namespace added in v1.1.0

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

type NamespacesConfig added in v1.1.0

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

type NodeConfig added in v1.1.0

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

type OrgConfig added in v1.1.0

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

type Organization added in v1.1.0

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"`
	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"`
	ExposedFFTMPort            int          `json:"exposedFFTMPort,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 added in v1.1.0

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 added in v0.0.47

type PullOptions struct {
	Retries int
}

type ReleaseChannelSelection added in v1.0.2

type ReleaseChannelSelection int
const (
	Stable ReleaseChannelSelection = iota
	Alpha
	Beta
	RC
)

func ReleaseChannelSelectionFromString added in v1.0.2

func ReleaseChannelSelectionFromString(s string) (ReleaseChannelSelection, error)

func (ReleaseChannelSelection) String added in v1.0.2

func (rc ReleaseChannelSelection) String() string

type SPIServerConfig added in v1.1.0

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

type SharedStorageConfig added in v1.1.0

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               string           `json:"database"`
	BlockchainProvider     string           `json:"blockchainProvider"`
	BlockchainNodeProvider string           `json:"blockchainNodeProvider"`
	TokenProviders         TokenProviders   `json:"tokenProviders"`
	VersionManifest        *VersionManifest `json:"versionManifest,omitempty"`
	PrometheusEnabled      bool             `json:"prometheusEnabled,omitempty"`
	SandboxEnabled         bool             `json:"sandboxEnabled,omitempty"`
	FFTMEnabled            bool             `json:"fftmEnabled,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"`
	InitDir                string           `json:"-"`
	RuntimeDir             string           `json:"-"`
	StackDir               string           `json:"-"`
	State                  *StackState      `json:"-"`
}

func (*Stack) ChainID added in v1.0.2

func (s *Stack) ChainID() int64

func (*Stack) HasRunBefore added in v1.1.0

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

func (*Stack) IsOldFileStructure added in v1.1.0

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

type StackState added in v0.0.47

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

type StartOptions added in v0.0.47

type StartOptions struct {
	NoRollback bool
}

type TokenProvider added in v0.0.42

type TokenProvider string
const (
	NilTokens    TokenProvider = "none"
	ERC1155      TokenProvider = "erc1155"
	ERC20_ERC721 TokenProvider = "erc20_erc721"
)

type TokenProviders added in v0.0.42

type TokenProviders []TokenProvider

func TokenProvidersFromStrings added in v0.0.47

func TokenProvidersFromStrings(strTokens []string) (tps TokenProviders, err error)

func (TokenProviders) Strings added in v0.0.42

func (tps TokenProviders) Strings() []string

type TokensConfig added in v1.1.0

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

type UIConfig added in v1.1.0

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

type VersionManifest added in v0.0.34

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

func (*VersionManifest) Entries added in v0.0.35

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

Jump to

Keyboard shortcuts

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