util

package
v0.2.10 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTestEnvFilesAndConfigs

func CreateTestEnvFilesAndConfigs(t *testing.T, tempDir string, nodePort uint32, raftPort uint32, blockTime time.Duration, txPerBlock uint32) (*config.Configurations, error)

func GenerateCrypto

func GenerateCrypto(cryptoDir string, users []string) error

func GenerateSampleServerConfig

func GenerateSampleServerConfig(tempDir, cryptoDir string, nodePort uint32, raftPort uint32, blockTime time.Duration, txPerBlock uint32) *config.Configurations

func GenerateTestDirectoryStruct

func GenerateTestDirectoryStruct(tempDir, cryptoDir string, serverPort uint32, users []string) error

func SetupTestEnv

func SetupTestEnv(t *testing.T, tempDir string, nodePort uint32) (*server.BCDBHTTPServer, uint32, uint32, error)

func SetupTestEnvWithParams

func SetupTestEnvWithParams(t *testing.T, tempDir string, nodePort uint32, raftPort uint32, blockTime time.Duration, txPerBlock uint32) (*server.BCDBHTTPServer, error)

func StartTestServer

func StartTestServer(t *testing.T, s *server.BCDBHTTPServer)

func WriteConfigToYaml

func WriteConfigToYaml(configObject interface{}, configFile string) error

Types

type Config

type Config struct {
	ConnectionConfig config.ConnectionConfig
	SessionConfig    config.SessionConfig
}

func ReadConfig

func ReadConfig(configFilePath string) (*Config, error)

Jump to

Keyboard shortcuts

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