config

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2017 License: MIT Imports: 10 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Name         *string            `json:"name,omitempty" yaml:"name,omitempty"`
	ClusterName  *string            `json:"cluster,omitempty" yaml:"cluster,omitempty"`
	Port         *uint16            `json:"port,omitempty" yaml:"port,omitempty"`
	CPU          *float64           `json:"cpu,omitempty" yaml:"cpu,omitempty"`
	Memory       *string            `json:"memory,omitempty" yaml:"memory,omitempty"`
	Units        *uint16            `json:"units,omitempty" yaml:"units,omitempty"`
	Env          map[string]string  `json:"env,omitempty" yaml:"env,omitempty"`
	LoadBalancer ConfigLoadBalancer `json:"load_balancer" yaml:"load_balancer"`
	Logging      ConfigLogging      `json:"logging" yaml:"logging"`
	AWS          ConfigAWS          `json:"aws" yaml:"aws"`
	Docker       ConfigDocker       `json:"docker" yaml:"docker"`
}

func DefaultConfig

func DefaultConfig(appName string) *Config

func Load

func Load(data []byte, configFormat string, defaultAppName string) (*Config, error)

func (*Config) Defaults

func (c *Config) Defaults(source *Config)

func (*Config) FromJSON

func (c *Config) FromJSON(data []byte) error

func (*Config) FromYAML

func (c *Config) FromYAML(data []byte) error

func (*Config) ToJSON

func (c *Config) ToJSON() ([]byte, error)

func (*Config) ToJSONWithIndent

func (c *Config) ToJSONWithIndent() ([]byte, error)

func (*Config) ToYAML

func (c *Config) ToYAML() ([]byte, error)

func (*Config) Validate

func (c *Config) Validate() error

type ConfigAWS

type ConfigAWS struct {
	ELBLoadBalancerName  *string `json:"elb_name,omitempty" yaml:"elb_name,omitempty"`
	ELBTargetGroupName   *string `json:"elb_target_group_name,omitempty" yaml:"elb_target_group_name,omitempty"`
	ELBSecurityGroupName *string `json:"elb_security_group_name,omitempty" yaml:"elb_security_group_name,omitempty"`
	ELBCertificateARN    *string `json:"elb_certificate_arn,omitempty" yaml:"elb_certificate_arn,omitempty"`
	ECRRepositoryName    *string `json:"ecr_repo_name,omitempty" yaml:"ecr_repo_name,omitempty"`
}

type ConfigDocker

type ConfigDocker struct {
	Bin *string `json:"bin,omitempty" yaml:"bin,omitempty"`
}

type ConfigLoadBalancer

type ConfigLoadBalancer struct {
	Enabled     *bool                         `json:"enabled" yaml:"enabled"`
	Port        *uint16                       `json:"port,omitempty" yaml:"port,omitempty"`
	HTTPSPort   *uint16                       `json:"https_port,omitempty" yaml:"https_port,omitempty"`
	HealthCheck ConfigLoadBalancerHealthCheck `json:"health_check,omitempty" yaml:"health_check,omitempty"`
}

type ConfigLoadBalancerHealthCheck

type ConfigLoadBalancerHealthCheck struct {
	Interval       *string `json:"interval,omitempty" yaml:"interval,omitempty"`
	Path           *string `json:"path,omitempty" yaml:"path,omitempty"`
	Status         *string `json:"status,omitempty" yaml:"status,omitempty"`
	Timeout        *string `json:"timeout,omitempty" yaml:"timeout,omitempty"`
	HealthyLimit   *uint16 `json:"healthy_limit,omitempty" yaml:"healthy_limit,omitempty"`
	UnhealthyLimit *uint16 `json:"unhealthy_limit,omitempty" yaml:"unhealthy_limit,omitempty"`
}

type ConfigLogging added in v1.3.0

type ConfigLogging struct {
	Driver  *string           `json:"driver,omitempty" yaml:"driver,omitempty"`
	Options map[string]string `json:"options" yaml:"options"`
}

Jump to

Keyboard shortcuts

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