Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CLI ¶
type CLI struct { Parser Parser Service ServiceCaller Writer io.Writer ErrWriter io.Writer Config Config }
CLI : The command line interface struct
type Config ¶
type Config struct {
Profiles []profile `yaml:"profiles"`
}
Config contains the parsed YAML data from the systemlink.yaml configuration file
type Parser ¶
type Parser interface {
Parse(models []model.Data) ([]model.Definition, error)
}
Parser interface which turns the given byte stream into a structured service definition model with all declared operations.
type ServiceCaller ¶
type ServiceCaller interface {
Call(operation model.Operation, parameterValues []model.ParameterValue, settings model.Settings) (int, string, error)
}
ServiceCaller interface abstracts calling the external services. The Call function takes in a model describing the API of the service as well as the provided parameters.
type ValueConverter ¶
type ValueConverter struct{}
ValueConverter provides functions to convert between input data of the command line and the data types in the model
func (ValueConverter) ConvertValues ¶
func (c ValueConverter) ConvertValues(values map[string]string, parameters []model.Parameter) ([]model.ParameterValue, error)
ConvertValues converts the given input parameter strings into to defined types of the model parameters