granitic: Index | Files

package binder

import ""


Package Files

binder.go env.go

func LocateFacilityConfig Uses

func LocateFacilityConfig(log logging.Logger) (string, error)

LocateFacilityConfig determines where on your filesystem you have checked out Granitic. This is used when code needs access to the configuration for Granitic's built-in facility components which is stored under resource/facility-config

func SerialiseBuiltinConfig Uses

func SerialiseBuiltinConfig(log logging.Logger) string

SerialiseBuiltinConfig takes the configuration files for Granitic's internal components (facilities) found in resource/facility-config and serialises them into a single string that will be embedded into your application's executable.

type Binder Uses

type Binder struct {
    Loader   DefinitionLoader
    ToolName string
    Log      logging.Logger
    // contains filtered or unexported fields

Binder translates the components defined in component definition files into Go source code.

func (*Binder) Bind Uses

func (b *Binder) Bind(s Settings)

Bind loads component definitions files from disk/network, merges those files into a single view of components and then converts the merged view into Go source code.

func (*Binder) Failed Uses

func (b *Binder) Failed() bool

Failed returns true if errors were encountered during the bind process

type DefinitionLoader Uses

type DefinitionLoader interface {
    LoadAndMerge(files []string, log logging.Logger) (map[string]interface{}, error)
    WriteMerged(data map[string]interface{}, path string, log logging.Logger) error

A DefinitionLoader handles the loading of component definition files from a sequence of file paths and can write a merged version of those files to a location on a filesystem.

type Settings Uses

type Settings struct {
    CompDefLocation *string
    BindingsFile    *string
    MergedDebugFile *string
    LogLevelLabel   *string
    LogLevel        logging.LogLevel

Settings contains output/input file locations and other variables for controlling the behaviour of this tool

func SettingsFromArgs Uses

func SettingsFromArgs() (Settings, error)

SettingsFromArgs uses CLI parameters to populate a Settings object

Package binder imports 17 packages (graph). Updated 2019-04-19. Refresh now. Tools for package owners.