config

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2018 License: BSD-2-Clause Imports: 8 Imported by: 22

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Provider      *Provider    `json:"provider"`
	SecurityTags_ SecurityTags `json:"security_tags"`
	Storage       *Storage     `json:"storage"`
}

func (*Account) SecurityTags

func (a *Account) SecurityTags() SecurityTags

type Amp

type Amp struct {
	Name_         string         `json:"name"`
	Notifications *Notifications `json:"notifications"`
	Account       *Account       `json:"account"`
}

func NewAmp

func NewAmp(dc string) (*Amp, error)

func (*Amp) Name

func (a *Amp) Name() string

type Arc

type Arc struct {
	Name_           string           `json:"name"`
	Title_          string           `json:"title"`
	Notifications   *Notifications   `json:"notifications"`
	DataCenter      *DataCenter      `json:"datacenter"`
	DatabaseService *DatabaseService `json:"database_service"`
	Dns             *Dns             `json:"dns"`
}

The configuration of the arc object. It has a name, a datacenter element and a dns element.

func NewArc

func NewArc(dc string) (*Arc, error)

func (*Arc) Name

func (a *Arc) Name() string

Name satisfies the resource.StaticArc interface.

func (*Arc) Print

func (a *Arc) Print()

Print provides a user friendly way to view the arc configuration. This is a deep print.

func (*Arc) PrintLocal

func (a *Arc) PrintLocal()

PrintLocal provides a user friendly way to view the configuration local to the arc object. This is a shallow print.

func (*Arc) Title

func (a *Arc) Title() string

Title satisfies the resource.StaticArc interface.

type Bucket

type Bucket struct {
	Name_         string       `json:"bucket"`
	Region_       string       `json:"region"`
	SecurityTags_ SecurityTags `json:"security_tags"`
	Role_         string       `json:"role"`
	Destination_  string       `json:"Destination"`
}

func (*Bucket) Destination

func (b *Bucket) Destination() string

func (*Bucket) Name

func (b *Bucket) Name() string

func (*Bucket) Print

func (b *Bucket) Print()

func (*Bucket) Region

func (b *Bucket) Region() string

func (*Bucket) Role

func (b *Bucket) Role() string

func (*Bucket) SecurityTags

func (b *Bucket) SecurityTags() SecurityTags

type BucketSet

type BucketSet struct {
	Name_    string   `json:"bucket_set"`
	Buckets_ *Buckets `json:"buckets"`
}

func (*BucketSet) Buckets

func (b *BucketSet) Buckets() *Buckets

func (*BucketSet) Name

func (b *BucketSet) Name() string

type BucketSets

type BucketSets []*BucketSet

type Buckets

type Buckets []*Bucket

type CidrBlock

type CidrBlock struct {
	Cidr_             string `json:"cidr"`
	AvailibilityZone_ string `json:"availibility_zone"`
}

func (*CidrBlock) AvailibilityZone

func (c *CidrBlock) AvailibilityZone() string

func (*CidrBlock) Cidr

func (c *CidrBlock) Cidr() string

type Cluster

type Cluster struct {
	Name_         string       `json:"cluster"`
	Pods          *Pods        `json:"pods"`
	SecurityTags_ SecurityTags `json:"security_tags"`
	AuditIgnore_  bool         `json:"audit_ignore"`
}

The configuration of the clutser object. It has a name and a pods element.

func (*Cluster) AuditIgnore

func (c *Cluster) AuditIgnore() bool

func (*Cluster) Name

func (c *Cluster) Name() string

Name satisfies the resource.StaticCluster interface.

func (*Cluster) Print

func (c *Cluster) Print()

Print provides a user friendly way to view the cluster configuration.

func (*Cluster) SecurityTags

func (c *Cluster) SecurityTags() SecurityTags

type Clusters

type Clusters []*Cluster

Clusters is a collection of Cluster objects.

func (*Clusters) Print

func (c *Clusters) Print()

Print provides a user friendly way to view the clusters configuration.

type Compute

type Compute struct {
	Name_             string
	BootstrapVersion_ int `json:"bootstrap_version"`
	DeployVersion_    int `json:"deploy_version"`
	SecretsVersion_   int `json:"secrets_version"`
	AideVersion_      int `json:"aide_version"`
	KeyPair           *KeyPair
	Clusters          *Clusters `json:"clusters"`
}

The configuration of the compute object. It has the version of the bootstrap repo used to create the hiera tarball, a keypair element and a clusters groups element.

Note that the keypair is a convenience field and isn't part of the configuration file. It is set by the application at run time.

func (*Compute) AideVersion

func (c *Compute) AideVersion() int

AideVersion satisfies the resource.StaticCompute interface.

func (*Compute) BootstrapVersion

func (c *Compute) BootstrapVersion() int

BootstrapVersion satisfies the resource.StaticCompute interface.

func (*Compute) DeployVersion

func (c *Compute) DeployVersion() int

DeployVersion satisfies the resource.StaticCompute interface.

func (*Compute) Name

func (c *Compute) Name() string

Name satisfies the resource.StaticCompute interface.

func (*Compute) Print

func (c *Compute) Print()

Print provides a user friendly way to view the compute configuration.

func (*Compute) PrintLocal

func (c *Compute) PrintLocal()

PrintLocal provides a user friendly way to view the configuration local to the network object.

func (*Compute) SecretsVersion

func (c *Compute) SecretsVersion() int

SecretsVersion satisfies the resource.StaticCompute interface.

func (*Compute) SetName

func (c *Compute) SetName(name string)

SetName is a convenience function to set the name at run time.

type DataCenter

type DataCenter struct {
	Provider      *Provider    `json:"provider"`
	Network       *Network     `json:"network"`
	Compute       *Compute     `json:"compute"`
	SecurityTags_ SecurityTags `json:"security_tags"`
}

The configuration of the datacenter object. It has a provider element, a network element and a compute element.

func (*DataCenter) Print

func (d *DataCenter) Print()

Print provides a user friendly way to view the entire datacenter configuration. This is a deep print.

func (*DataCenter) SecurityTags

func (d *DataCenter) SecurityTags() SecurityTags

type Database

type Database struct {
	Name_           string   `json:"database"`
	DBName_         string   `json:"dbname"`
	Engine_         string   `json:"engine"`
	Version_        string   `json:"version"`
	Type_           string   `json:"type"`
	Port_           int      `json:"port"`
	SubnetGroup_    string   `json:"subnet_group"`
	SecurityGroups_ []string `json:"security_groups"`
	Storage_        struct {
		Type_ string `json:"type"`
		Size_ int    `json:"size"`
		Iops_ int    `json:"iops"`
	} `json:"storage"`
	Master_ struct {
		UserName_ string `json:"username"`
		Password_ string `json:"password"`
	} `json:"master"`
}

Database represents the configuration of a database instance resource.

func (*Database) DBName

func (db *Database) DBName() string

func (*Database) Engine

func (db *Database) Engine() string

func (*Database) InstanceType

func (db *Database) InstanceType() string

func (*Database) MasterPassword

func (db *Database) MasterPassword() string

func (*Database) MasterUserName

func (db *Database) MasterUserName() string

func (*Database) Name

func (db *Database) Name() string

func (*Database) Port

func (db *Database) Port() int

func (*Database) Print

func (db *Database) Print()

Print provides a user friendly way to view a subnet group configuration.

func (*Database) PrintLocal

func (db *Database) PrintLocal()

PrintLocal provides a user friendly way to view the configuration local to the database object.

func (*Database) SecurityGroups

func (db *Database) SecurityGroups() []string

func (*Database) StorageIops

func (db *Database) StorageIops() int

func (*Database) StorageSize

func (db *Database) StorageSize() int

func (*Database) StorageType

func (db *Database) StorageType() string

func (*Database) SubnetGroup

func (db *Database) SubnetGroup() string

func (*Database) Version

func (db *Database) Version() string

type DatabaseService

type DatabaseService struct {
	Provider  *Provider   `json:"provider"`
	Databases []*Database `json:"databases"`
}

The configuration of the database_service object.

func (*DatabaseService) Print

func (dbs *DatabaseService) Print()

Print provides a user friendly way to view the configuration of the database service. This is a deep print.

type Dns

type Dns struct {
	DomainName_  string      `json:"domain_name"`
	Subdomain_   string      `json:"subdomain"`
	Provider     *Provider   `json:"provider"`
	ARecords     *DnsRecords `json:"a_records"`
	CNameRecords *DnsRecords `json:"cname_records"`
	CacheIgnore  []string    `json:"cache_ignore"`
}

Dns configuration contains a domain name, a subdomain, a provider record a list of a records, and a list of cname records.

func (*Dns) Domain

func (d *Dns) Domain() string

Domain satisfies the resource.StaticNetwork interface. This is a convenience method that will provide the domain name being used.

func (*Dns) DomainName

func (d *Dns) DomainName() string

DomainName satisfies the resource.StaticNetwork interface. You most likely want to use the Domain() method instead of this.

func (*Dns) Print

func (d *Dns) Print()

Print provides a user friendly way to view the datacenter configuration.

func (*Dns) PrintLocal

func (d *Dns) PrintLocal()

PrintLocal provides a user friendly way to view the configuration local to the dns object.

func (*Dns) Subdomain

func (d *Dns) Subdomain() string

DnsNameServers satisfies the resource.StaticNetwork interface.

type DnsRecord

type DnsRecord struct {
	Name_   string   `json:"name"`
	Ttl_    int      `json:"ttl"`
	Pod_    string   `json:"pod"`
	Access_ string   `json:"access"`
	Values_ []string `json:"values"`
}

DnsRecord configuration consists of a name, a ttl, an optional pod, an access value and an optional set of values. For cname records that are associated with a pod the name, ttl and pod values are mandatory. If this cname needs to be associated with the public ip address of an instance in the pod, the access field need to be set to "public". For a records the name, ttl and values are required.

func (*DnsRecord) Access

func (d *DnsRecord) Access() string

Access satisfies the resource.StaticDnsRecord interface.

func (*DnsRecord) Name

func (d *DnsRecord) Name() string

Name satisfies the resource.StaticDnsRecord interface.

func (*DnsRecord) Pod

func (d *DnsRecord) Pod() string

Pod satisfies the resource.StaticDnsRecord interface.

func (*DnsRecord) Print

func (d *DnsRecord) Print(s string)

Print provides a user friendly way to view the dns record. This is a deep print.

func (*DnsRecord) PrintLocal

func (d *DnsRecord) PrintLocal(s string)

PrintLocal provides a user friendly way to view the configuration local of the dns record. This is a shallow print.

func (*DnsRecord) SetValues

func (d *DnsRecord) SetValues(v []string)

SetValues will set the values of the record. It is intended for those dns records that are created dynamically.

func (*DnsRecord) Ttl

func (d *DnsRecord) Ttl() int

Ttl satisfies the resource.StaticDnsRecord interface.

func (*DnsRecord) Values

func (d *DnsRecord) Values() []string

Values satisfies the resource.StaticDnsRecord interface.

type DnsRecords

type DnsRecords []*DnsRecord

DnsRecords is a collection of DnsRecord objects.

func (*DnsRecords) Print

func (d *DnsRecords) Print(s string)

Print provides a user friendly way to view the dns records configuration.

type Instance

type Instance struct {
	*Pod
	// contains filtered or unexported fields
}

The configuration of the instance object. An instance isn't part of the actual config file, but it is provided for consistency. The instance contains a name, and a pointer to the pod config.

func NewInstance

func NewInstance(name string, p *Pod) *Instance

NewInstance creates a new instance config object. It requires the name of the instance and a reference to the pod containing the instance.

func (*Instance) Image

func (i *Instance) Image() string

Image satisfies the resource.StaticInstance interface. This returns the image used for this instance. The image is the base OS image (centos6, centos7, ubuntu14, etc)

func (*Instance) InstanceType

func (i *Instance) InstanceType() string

InstanceType satisfies the resource.StaticInstance interface. The instance type specifies the cloud providers machine type which defines the virtual cpus, memory and disk available to this instance. For example, in AWS m4.large is an instance type.

func (*Instance) Name

func (i *Instance) Name() string

Name satisfies the resource.StaticInstance interface. Instance names must be unique.

func (*Instance) Print

func (i *Instance) Print()

Print provides a user friendly way to view a instance configuration.

func (*Instance) PrintLocal

func (i *Instance) PrintLocal()

PrintLocal provides a user friendly way to view the configuration local to the instance object.

func (*Instance) Role

func (i *Instance) Role() string

Role satisfies the resource.StaticInstance interface. The role is optional and allows instances in this pod to acquire an IAM role in order to interact with AWS programmatically.

func (*Instance) SecurityGroupNames

func (i *Instance) SecurityGroupNames() []string

SecurityGroupNames satisifies the resource.StaticInstance interface. This instance will be associated with this list of security groups.

func (*Instance) ServerType

func (i *Instance) ServerType() string

ServerType satisfies the resource.StaticInstance interface.

func (*Instance) SubnetGroupName

func (i *Instance) SubnetGroupName() string

SubnetGroupName satisfies the resource.StaticInterface interface. This instance will be placed on the associated subnet.

func (*Instance) Teams

func (i *Instance) Teams() []string

Teams satisfies the resource.StaticInstance interface. The instance will have the users in the given teams setup.

func (*Instance) Version

func (i *Instance) Version() string

Version satisfies the resource.StaticInterface interface. This is the version of the servertype package used to provision this instance.

func (*Instance) Volumes

func (i *Instance) Volumes() *Volumes

type Instances

type Instances []*Instance

Instances is a collection of Instance objects.

func (*Instances) Print

func (i *Instances) Print()

Print provides a user friendly way to view the instances configuration.

type KeyPair

type KeyPair struct {
	Name_        string
	LocalName_   string
	Format_      string
	Comment_     string
	KeyMaterial_ string
}

The configuration of the keypair object. It has a name, a local name, a format, a comment and keymaterial. The name is used to identify the keypair in cloud provider, whereas the local name is the name used to identify the keypair locally. This only matters for the id_rsa key, where the name will be the username and the local name will be "id_rsa".

func (*KeyPair) Comment

func (k *KeyPair) Comment() string

Comment satisfies the resource.StaticKeyPair interface. This will be populated with the filename of the key.

func (*KeyPair) Format

func (k *KeyPair) Format() string

Format satisfies the resource.StaticKeyPair interface.

func (*KeyPair) KeyMaterial

func (k *KeyPair) KeyMaterial() string

KeyMaterial satisfies the resource.StaticKeyPair interface. Contains the base64 encoded serialized key.

func (*KeyPair) LocalName

func (k *KeyPair) LocalName() string

LocalName satisfies the resource.StaticKeyPair interface. Name known local to the execution of arc.

func (*KeyPair) Name

func (k *KeyPair) Name() string

Name satisfies the resource.StaticKeyPair interface. Name known to the cloud provider.

func (*KeyPair) Print

func (k *KeyPair) Print()

Print provides a user friendly way to view a subnet group configuration.

func (*KeyPair) PrintLocal

func (k *KeyPair) PrintLocal()

PrintLocal provides a user friendly way to view the configuration local to the subnet group object.

type Network

type Network struct {
	Name_              string
	CidrBlock_         string              `json:"cidr"`
	AvailabilityZones_ []string            `json:"availability_zones"`
	DnsNameServers_    []string            `json:"dns_name_servers"`
	CidrAliases_       map[string]string   `json:"cidr_aliases"`
	CidrGroups_        map[string][]string `json:"cidr_groups"`
	SubnetGroups       *SubnetGroups       `json:"subnet_groups"`
	SecurityGroups     *SecurityGroups     `json:"security_groups"`
}

The configuration of the network object. It has a name, a cidr block, a list of availability zones (one or more), a list of dns name server ip addresses, a subnet groups element and a security groups element.

Note that the name is a convenience field and isn't part of the configuration file. It is set by the application at run time.

func (*Network) AvailabilityZones

func (n *Network) AvailabilityZones() []string

AvailabilityZones satisfies the resource.StaticNetwork interface.

func (*Network) CidrAliases

func (n *Network) CidrAliases() map[string]string

CidrAliases satisfies the resource.StaticNetwork interface.

func (*Network) CidrBlock

func (n *Network) CidrBlock() string

CidrBlock satisfies the resource.StaticNetwork interface.

func (*Network) CidrGroups

func (n *Network) CidrGroups() map[string][]string

CidrGroups satisfies the resource.StaticNetwork interface.

func (*Network) DnsNameServers

func (n *Network) DnsNameServers() []string

DnsNameServers satisfies the resource.StaticNetwork interface.

func (*Network) Name

func (n *Network) Name() string

Name satisfies the resource.StaticNetwork interface.

func (*Network) Print

func (n *Network) Print()

Print provides a user friendly way to view the entire network configuration.

func (*Network) PrintLocal

func (n *Network) PrintLocal()

PrintLocal provides a user friendly way to view the configuration local to the network object.

func (*Network) SetName

func (n *Network) SetName(name string)

SetName is a convenience function to set the name at run time.

type Notifications

type Notifications struct {
	Spark *Spark `json:"spark"`
}

type Pod

type Pod struct {
	Name_           string   `json:"pod"`
	ServerType_     string   `json:"servertype"`
	Version_        int      `json:"version"`
	Image_          string   `json:"image"`
	InstanceType_   string   `json:"type"`
	Role_           string   `json:"role"`
	SubnetGroup_    string   `json:"subnet_group"`
	SecurityGroups_ []string `json:"security_groups"`
	Count_          int      `json:"count"`
	Teams_          []string `json:"teams"`
	Volumes         *Volumes `json:"volumes"`
	Instances       *Instances
}

The configuration of the pod object. It contains a name, a servertype, the version of the servertype, the base image, the machine type, the associated subnet group, the associated security groups, the count being the number of instances created, and the list of volume templates to use for each instance.

func (*Pod) Count

func (p *Pod) Count() int

Count satisfies the resource.StaticPod interface. The pod will have count number of instances.

func (*Pod) Image

func (p *Pod) Image() string

Image satisfies the resource.StaticPod interface. This returns the image used for each instance. The image is the base OS image (centos6, centos7, ubuntu, etc)

func (*Pod) InstanceType

func (p *Pod) InstanceType() string

InstanceType satisfies the resource.StaticPod interface. The instance type specifies the cloud providers machine type which defines the virtual cpus, memory and disk available to the instance. For example, in AWS m4.large is an instance type.

func (*Pod) Name

func (p *Pod) Name() string

Name satisfies the resource.StaticPod interface. Pod names must be unique.

func (*Pod) PackageName

func (p *Pod) PackageName() string

PackageName satisfies the resource.StaticPod interface. This is a shortcut method provided to give the servertype package name.

func (*Pod) Print

func (p *Pod) Print()

Print provides a user friendly way to view a pod configuration.

func (*Pod) PrintLocal

func (p *Pod) PrintLocal()

PrintLocal provides a user friendly way to view the configuration local to the pod object.

func (*Pod) Role

func (p *Pod) Role() string

Role satisfies the resource.StaticPod interface. The role is optional and allows instances in this pod to acquire an IAM role in order to interact with AWS programmatically.

func (*Pod) SecurityGroups

func (p *Pod) SecurityGroups() []string

SecurityGroups satisifies the resource.StaticPod interface. All instances in the pod will be associated with this list of security groups.

func (*Pod) ServerType

func (p *Pod) ServerType() string

ServerType satisfies the resource.StaticPod interface.

func (*Pod) SubnetGroup

func (p *Pod) SubnetGroup() string

SubnetGroupName satisfies the resource.StaticPod interface. All instances in the pod will be placed on the associated subnet.

func (*Pod) Teams

func (p *Pod) Teams() []string

Teams satisfies the resource.StaticPod interface. The pod will have the users in the given teams setup.

func (*Pod) Version

func (p *Pod) Version() string

Version satisfies the resource.StaticPod interface. This is the version of the servertype package used to provision each instance in this pod.

type Pods

type Pods []*Pod

Pods is a collection of Pod objects.

func (*Pods) Print

func (p *Pods) Print()

Print provides a user friendly way to view the pods configuration.

type Printer

type Printer interface {

	// Print dumps the config to the console.
	Print()
}

The printer interface provides a way to write an object to the console.

type Provider

type Provider struct {
	Vendor string            `json:"vendor"`
	Data   map[string]string `json:"data"`
	Images map[string]string `json:"images"`
}

The configuration of the provider object. It has a vendor, a key value map of provider data, and an optional map of os images made available by the provider.

func (*Provider) Print

func (p *Provider) Print()

Print provides a user friendly way to view the configuration of the provider object.

type SecurityGroup

type SecurityGroup struct {
	Name_         string         `json:"security_group"`
	SecurityRules *SecurityRules `json:"rules"`
}

The configuration of the security group object. It has a name, and a collection of security rules.

func (*SecurityGroup) Name

func (s *SecurityGroup) Name() string

Name satisfies the resource.StaticSecurityGroup interface.

func (*SecurityGroup) Print

func (s *SecurityGroup) Print()

Print provides a user friendly way to view a security group configuration.

func (*SecurityGroup) PrintLocal

func (s *SecurityGroup) PrintLocal()

PrintLocal provides a user friendly way to view the configuration local to the security group object.

type SecurityGroups

type SecurityGroups []*SecurityGroup

SecurityGroups is a collection of SecurityGroup objects.

func (*SecurityGroups) Print

func (s *SecurityGroups) Print()

Print provides a user friendly way to view the security groups configuration.

type SecurityRule

type SecurityRule struct {
	Description_ string   `json:"description"`
	Directions_  []string `json:"directions"`
	Remotes_     []string `json:"remotes"`
	Protocols_   []string `json:"protocols"`
	Ports_       []string `json:"ports"`
}

The configuration of the security rule object. It has a description, a list of destinations being either a cidr block or a subnet group, a collection of directions being ingress or egress, a list of applicable protocols and a list of ports.

func (*SecurityRule) Description

func (s *SecurityRule) Description() string

The description can be free form text.

func (*SecurityRule) Directions

func (s *SecurityRule) Directions() []string

Direction values can either be ingress indicating that the rule applies to incoming traffic, or egress indication that the rule applies to outgoing traffic.

func (*SecurityRule) Ports

func (s *SecurityRule) Ports() []string

For tcp and udp protocols values can either be a scalar port number, e.g. 22, or a range of ports, e.g. 1:65535. For icmp values represent the ICMP type and code, e.g. 8:0.

func (*SecurityRule) Print

func (s *SecurityRule) Print()

Print provides a user friendly way to view a security rule configuration.

func (*SecurityRule) PrintLocal

func (s *SecurityRule) PrintLocal()

PrintLocal provides a user friendly way to view the configuration local to the security rule object.

func (*SecurityRule) Protocols

func (s *SecurityRule) Protocols() []string

Values can be "icmp", "udp", and "tcp".

func (*SecurityRule) Remotes

func (s *SecurityRule) Remotes() []string

Remotes can be either a cidr block, a subnet group or a security group. A cidr block takes the form of "cidr:a.b.c.d/e", e.g. cidr:10.0.0.0/24. A subnet group takes the form of "subnet_group:name", e.g. subnet_group:bastion. A security group takes the form of "security_group:name", e.g. security_group:bastion. Avoid using security group remotes if at all possible.

type SecurityRules

type SecurityRules []*SecurityRule

SecurityRules is a collection of SecurityRule objects.

func (*SecurityRules) Print

func (s *SecurityRules) Print()

Print provides a user friendly way to view the security rules configuration.

type SecurityTags

type SecurityTags map[string]string

SecurityTags help keep track of resources should there be any issues that occur.

func (SecurityTags) Print

func (s SecurityTags) Print()

Print provides a user friendly way to view the configuration of the security tags.

type Spark

type Spark struct {
	Rooms map[string]string `json:"rooms"`
}

type Storage

type Storage struct {
	Buckets    *Buckets    `json:"buckets"`
	BucketSets *BucketSets `json:"bucket_sets"`
}

type Subnet

type Subnet struct {
	Name_             string
	GroupName_        string
	CidrBlock_        string
	Access_           string
	AvailabilityZone_ string
	ManageRoutes_     bool
}

The configuration of the subnet object. It has a name, the starting cidr block of the subnet group, the type of access (public, private, local) for the subnet group, the availability zone where the subet is located and the flag indicating whether this subnet needs to have a separate routetable..

A subnet is not part of the configuration file, so the existence of this structure is a convenience meant to hold per subnet data derived from the subnet group.

func (*Subnet) Access

func (s *Subnet) Access() string

Access satisfies the resource.StaticSubnet interface.

func (*Subnet) AvailabilityZone

func (s *Subnet) AvailabilityZone() string

AvailabilityZone satisfies the resource.StaticSubnet interface.

func (*Subnet) CidrBlock

func (s *Subnet) CidrBlock() string

CidrBlock satisfies the resource.StaticSubnet interface. The cidr block is derived from the starting cidr block of the subnet group that owns this subnet.

func (*Subnet) GroupName

func (s *Subnet) GroupName() string

Name satisfies the resource.StaticSubnet interface. The group name is the name of the subnet group.

func (*Subnet) ManageRoutes

func (s *Subnet) ManageRoutes() bool

ManageRoutes satisfies the resource.StaticSubnet interface.

func (*Subnet) Name

func (s *Subnet) Name() string

Name satisfies the resource.StaticSubnet interface. The name is derived from the name of the subnet group and the availability zone. I.e. bation-us-west-2a.

func (*Subnet) Print

func (s *Subnet) Print()

Print provides a user friendly way to view the subnet configuration.

func (*Subnet) PrintLocal

func (s *Subnet) PrintLocal()

PrintLocal provides a user friendly way to view the configuration local to the arc object.

func (*Subnet) SetAccess

func (s *Subnet) SetAccess(access string)

SetAccess provides a way to set the access value at runtime.

func (*Subnet) SetAvailabilityZone

func (s *Subnet) SetAvailabilityZone(availabilityZone string)

SetAvailabilityZone provides a way to set the availabilit zone at runtime.

func (*Subnet) SetCidrBlock

func (s *Subnet) SetCidrBlock(cidrBlock string)

SetCidrBlock provides a way to set the cidr block at runtime.

func (*Subnet) SetGroupName

func (s *Subnet) SetGroupName(groupName string)

SetGroupName provides a way to set the subnet's group name at runtime.

func (*Subnet) SetManageRoutes

func (s *Subnet) SetManageRoutes(manageRoutes bool)

SetManageRoutes provides a way to set the manage routes value at runtime.

func (*Subnet) SetName

func (s *Subnet) SetName(name string)

type SubnetGroup

type SubnetGroup struct {
	Name_         string       `json:"subnet"`
	CidrBlock_    string       `json:"cidr"`
	CidrBlocks_   []*CidrBlock `json:"cidrs"`
	Access_       string       `json:"access"`
	ManageRoutes_ bool         `json:"manage_routes"`
}

The configuration of the subnet group object. It has a name, the starting cidr block of the subnet group, and the type of access (public, private, local) for the subnet group.

func (*SubnetGroup) Access

func (s *SubnetGroup) Access() string

Access satisfies the resource.StaticSubnetGroup interface.

Access return values and meanings.

public
  Instances on the subnet can see the internet and can be seen
  by the internet. Both public and private ip addresses are
  allocated for an instance when it is created.

public_elastic
  Instances on the subnet can see the internet and can be seen
  by the internet. Only a private ip address is allocated for
  an instance when it is created. A public elastic ip address
  will be associated with the instance after creation.

private
  Instances on the subnet can see the internet and cannot be
  seen by the internet. Only a private ip address is allocated
  for an instance when it is created.

local
  Instances one the subnet cannot see or be seen by the
  internet. Only a private ip address is allocated for an instance
  when it is created.

func (*SubnetGroup) CidrBlock

func (s *SubnetGroup) CidrBlock() string

CidrBlock satisfies the resource.StaticSubnetGroup interface. This is the original functionality and should not be used with CidrBlocks

func (*SubnetGroup) CidrBlocks

func (s *SubnetGroup) CidrBlocks() []*CidrBlock

CidrBlocks is for additional functionality and should not be used with CidrBlock

func (*SubnetGroup) ManageRoutes

func (s *SubnetGroup) ManageRoutes() bool

ManageRoutes satisfies the resource.StaticSubnetGroup interface.

func (*SubnetGroup) Name

func (s *SubnetGroup) Name() string

Name satisfies the resource.StaticSubnetGroup interface.

func (*SubnetGroup) Print

func (s *SubnetGroup) Print()

Print provides a user friendly way to view a subnet group configuration.

func (*SubnetGroup) PrintLocal

func (s *SubnetGroup) PrintLocal()

PrintLocal provides a user friendly way to view the configuration local to the subnet group object.

type SubnetGroups

type SubnetGroups []*SubnetGroup

SubnetGroups is a collection of SubnetGroup objects.

func (*SubnetGroups) Print

func (s *SubnetGroups) Print()

Print provides a user friendly way to view the subnet groups configuration.

type Volume

type Volume struct {
	Device_     string `json:"device"`
	Type_       string `json:"type"`
	Size_       int64  `json:"size"`
	Keep_       bool   `json:"keep"`
	Boot_       bool   `json:"boot"`
	FsType_     string `json:"fstype"`
	Inodes_     int    `json:"inodes"`
	MountPoint_ string `json:"mount_point"`
	Preserve_   bool   `json:"preserve"`
}

func (*Volume) Boot

func (v *Volume) Boot() bool

func (*Volume) Device

func (v *Volume) Device() string

func (*Volume) FsType

func (v *Volume) FsType() string

func (*Volume) Inodes

func (v *Volume) Inodes() int

func (*Volume) Keep

func (v *Volume) Keep() bool

func (*Volume) MountPoint

func (v *Volume) MountPoint() string

func (*Volume) Preserve

func (v *Volume) Preserve() bool

func (*Volume) Print

func (v *Volume) Print()

func (*Volume) Size

func (v *Volume) Size() int64

func (*Volume) Type

func (v *Volume) Type() string

type Volumes

type Volumes []*Volume

func (*Volumes) Print

func (v *Volumes) Print()

Jump to

Keyboard shortcuts

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