build

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2019 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GeneratePackageDefinitions

func GeneratePackageDefinitions(config *Config, templateDir, outputDir string) error

Types

type Config

type Config struct {
	Meta struct {
		BuildDatetime          string // generated field
		PackageMaintainer      string `json:"package_maintainer"`
		PackageMaintainerEmail string `json:"package_maintainer_email"`
	}
	Env struct {
		Version              string `json:"version"`
		BackendInstallPath   string `json:"backend_install_path"`
		BackendDataPath      string `json:"backend_data_path"`
		BlockbookInstallPath string `json:"blockbook_install_path"`
		BlockbookDataPath    string `json:"blockbook_data_path"`
	} `json:"env"`
	Coin struct {
		Name     string `json:"name"`
		Shortcut string `json:"shortcut"`
		Label    string `json:"label"`
		Alias    string `json:"alias"`
	} `json:"coin"`
	Ports struct {
		BackendRPC          int `json:"backend_rpc"`
		BackendMessageQueue int `json:"backend_message_queue"`
		BlockbookInternal   int `json:"blockbook_internal"`
		BlockbookPublic     int `json:"blockbook_public"`
	} `json:"ports"`
	IPC struct {
		RPCURLTemplate              string `json:"rpc_url_template"`
		RPCUser                     string `json:"rpc_user"`
		RPCPass                     string `json:"rpc_pass"`
		RPCTimeout                  int    `json:"rpc_timeout"`
		MessageQueueBindingTemplate string `json:"message_queue_binding_template"`
	} `json:"ipc"`
	Backend struct {
		PackageName                     string      `json:"package_name"`
		PackageRevision                 string      `json:"package_revision"`
		SystemUser                      string      `json:"system_user"`
		Version                         string      `json:"version"`
		BinaryURL                       string      `json:"binary_url"`
		VerificationType                string      `json:"verification_type"`
		VerificationSource              string      `json:"verification_source"`
		ExtractCommand                  string      `json:"extract_command"`
		ExcludeFiles                    []string    `json:"exclude_files"`
		ExecCommandTemplate             string      `json:"exec_command_template"`
		LogrotateFilesTemplate          string      `json:"logrotate_files_template"`
		PostinstScriptTemplate          string      `json:"postinst_script_template"`
		ServiceType                     string      `json:"service_type"`
		ServiceAdditionalParamsTemplate string      `json:"service_additional_params_template"`
		ProtectMemory                   bool        `json:"protect_memory"`
		Mainnet                         bool        `json:"mainnet"`
		ServerConfigFile                string      `json:"server_config_file"`
		ClientConfigFile                string      `json:"client_config_file"`
		AdditionalParams                interface{} `json:"additional_params"`
	} `json:"backend"`
	Blockbook struct {
		PackageName             string `json:"package_name"`
		SystemUser              string `json:"system_user"`
		InternalBindingTemplate string `json:"internal_binding_template"`
		PublicBindingTemplate   string `json:"public_binding_template"`
		ExplorerURL             string `json:"explorer_url"`
		AdditionalParams        string `json:"additional_params"`
		BlockChain              struct {
			Parse                bool                       `json:"parse"`
			Subversion           string                     `json:"subversion"`
			AddressFormat        string                     `json:"address_format"`
			MempoolWorkers       int                        `json:"mempool_workers"`
			MempoolSubWorkers    int                        `json:"mempool_sub_workers"`
			BlockAddressesToKeep int                        `json:"block_addresses_to_keep"`
			AdditionalParams     map[string]json.RawMessage `json:"additional_params"`
		} `json:"block_chain"`
	} `json:"blockbook"`
	IntegrationTests map[string][]string `json:"integration_tests"`
}

func LoadConfig

func LoadConfig(configsDir, coin string) (*Config, error)

func (*Config) ParseTemplate

func (c *Config) ParseTemplate() *template.Template

Jump to

Keyboard shortcuts

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