util

package
v0.0.0-...-80378be Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2022 License: Apache-2.0 Imports: 8 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadProtoFromFileOrPanic

func LoadProtoFromFileOrPanic(msg interface{}, fileName string)

func OpenConnection

func OpenConnection(c *Config) (bcdb.BCDB, error)

func OpenDBSession

func OpenDBSession(configLocation string) (bcdb.DBSession, error)

func OpenSession

func OpenSession(c *Config, db bcdb.BCDB) (bcdb.DBSession, error)

func PrintMachineConfig

func PrintMachineConfig(session bcdb.DBSession, machine string) error

func StoreProtoAsJsonOrPanic

func StoreProtoAsJsonOrPanic(msg interface{}, fileName string)

Types

type Config

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

func ReadConfig

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

type MachineConfig

type MachineConfig struct {
	Id     string `json:"id"`
	Param1 string `json:"param1"`
	Param2 string `json:"param2"`
	Param3 string `json:"param3"`
	Param4 string `json:"param4"`
	Param5 string `json:"param5"`
}

Jump to

Keyboard shortcuts

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