Documentation
¶
Overview ¶
Example (Dump_barcelonatoken) ¶
dump([]byte("X-Barcelona-Token: abcdefg"), nil)
Output: X-Barcelona-Token: [filtered]
Example (Dump_githubtoken) ¶
dump([]byte("X-Github-Token: abcdefg"), nil)
Output: X-Github-Token: [filtered]
Example (Dump_nottoken) ¶
dump([]byte("String: abcdefg"), nil)
Output: String: abcdefg
Example (Dump_vaulttoken) ¶
dump([]byte("X-Vault-Token: abcdefg"), nil)
Output: X-Vault-Token: [filtered]
Index ¶
- type APIError
- type Client
- func (cli *Client) ApplyDistrict(name string) error
- func (cli *Client) CreateDistrict(req *DistrictRequest) (*District, error)
- func (cli *Client) CreateHeritage(districtName string, h *Heritage) (*Heritage, error)
- func (cli *Client) Delete(path string, body io.Reader) ([]byte, error)
- func (cli *Client) DeleteDistrict(name string) error
- func (cli *Client) DeletePlugin(districtName string, pluginName string) error
- func (cli *Client) Get(path string, body io.Reader) ([]byte, error)
- func (cli *Client) ListDistricts() ([]*District, error)
- func (cli *Client) LoginWithGithub(endpoint string, githubToken string) (*User, error)
- func (cli *Client) LoginWithVault(vault_url string, githubToken string) (*User, error)
- func (cli *Client) Patch(path string, body io.Reader) ([]byte, error)
- func (cli *Client) Post(path string, body io.Reader) ([]byte, error)
- func (cli *Client) Put(path string, body io.Reader) ([]byte, error)
- func (cli *Client) PutPlugin(districtName string, plugin *Plugin) (*Plugin, error)
- func (cli *Client) ReloadDefaultClient() (*Client, error)
- func (cli *Client) Request(method string, path string, body io.Reader) ([]byte, error)
- func (cli *Client) ShowDistrict(name string) (*District, error)
- func (cli *Client) UpdateDistrict(req *DistrictRequest) (*District, error)
- type Config
- type ContainerInstance
- type District
- type DistrictRequest
- type DistrictResponse
- type Endpoint
- type EndpointResponse
- type EnvironmentPair
- type Heritage
- type HeritageResponse
- type Host
- type Listener
- type Notification
- type NotificationResponse
- type Oneoff
- type OneoffResponse
- type Plugin
- type PluginResponse
- type PortMapping
- type ReviewApp
- type ReviewAppDefinition
- type ReviewAppRequest
- type ReviewAppResponse
- type ReviewAppService
- type ReviewGroup
- type ReviewGroupRequest
- type ReviewGroupResponse
- type RuleCondition
- type RunEnv
- type ScheduledTask
- type Service
- type User
- type UserResponse
- type VaultAuthResponse
- type VaultAuthResponseAuth
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
var DefaultClient *Client
func (*Client) ApplyDistrict ¶
func (*Client) CreateDistrict ¶
func (cli *Client) CreateDistrict(req *DistrictRequest) (*District, error)
func (*Client) CreateHeritage ¶
func (*Client) DeleteDistrict ¶
func (*Client) DeletePlugin ¶
func (*Client) ListDistricts ¶
func (*Client) LoginWithGithub ¶ added in v0.9.7
func (*Client) LoginWithVault ¶ added in v0.9.7
func (*Client) ReloadDefaultClient ¶ added in v0.9.7
func (*Client) UpdateDistrict ¶
func (cli *Client) UpdateDistrict(req *DistrictRequest) (*District, error)
type Config ¶
func DefaultConfig ¶
func DefaultConfig() *Config
type ContainerInstance ¶
type ContainerInstance struct { ContainerInstanceArn string `json:"container_instance_arn"` EC2InstanceID string `json:"ec2_instance_id"` PendingTasksCount int `json:"pending_tasks_count"` RunningTasksCount int `json:"running_tasks_count"` Status string `json:"status"` PrivateIPAddress string `json:"private_ip_address"` RemainingResources []struct { Name string `json:"name"` IntegerValue int `json:"integer_value"` } `json:"remaining_resources"` }
type District ¶
type District struct { Name string `json:"name"` Region string `json:"region"` BastionIP string `json:"bastion_ip"` ClusterSize int `json:"cluster_size"` ClusterInstanceType string `json:"cluster_instance_type"` S3BucketName string `json:"s3_bucket_name"` StackStatus string `json:"stack_status"` NatType string `json:"nat_type"` ClusterBackend string `json:"cluster_backend"` CidrBlock string `json:"cidr_block"` StackName string `json:"stack_name"` AwsAccessKeyId string `json:"aws_access_key_id"` AwsRole string `json:"aws_role"` ContainerInstances []*ContainerInstance `json:"container_instances"` Plugins []*Plugin `json:"plugins"` Heritages []*Heritage `json:"heritages"` Notifications []*Notification `json:"notifications"` }
type DistrictRequest ¶
type DistrictRequest struct { Name string `json:"name,omitempty"` Region string `json:"region,omitempty"` ClusterSize *int `json:"cluster_size,omitempty"` ClusterInstanceType string `json:"cluster_instance_type,omitempty"` NatType string `json:"nat_type,omitempty"` ClusterBackend string `json:"cluster_backend,omitempty"` AwsAccessKeyId string `json:"aws_access_key_id,omitempty"` AwsSecretAccessKey string `json:"aws_secret_access_key,omitempty"` }
type DistrictResponse ¶
type Endpoint ¶
type Endpoint struct { Name string `json:"name,omitempty"` Public *bool `json:"public,omitempty"` CertificateID string `json:"certificate_id,omitempty"` SslPolicy string `json:"ssl_policy,omitempty"` // Response only DNSName string `json:"dns_name,omitempty"` District *District `json:"district,omitempty"` }
type EndpointResponse ¶
type EnvironmentPair ¶ added in v0.9.1
type Heritage ¶
type Heritage struct { Name string `yaml:"name" json:"name"` ImageName string `yaml:"image_name" json:"image_name"` ImageTag string `yaml:"image_tag,omitempty" json:"image_tag,omitempty"` BeforeDeploy *string `yaml:"before_deploy" json:"before_deploy"` Version int `yaml:"version,omitempty" json:"version,omitempty"` ScheduledTasks []*ScheduledTask `yaml:"scheduled_tasks" json:"scheduled_tasks"` Services []*Service `yaml:"services" json:"services"` EnvVars map[string]string `json:"env_vars,omitempty"` Environment []*EnvironmentPair `yaml:"environment" json:"environment"` Token string `json:"token,omitempty"` RunEnv *RunEnv `yaml:"run_env,omitempty" json:"run_env,omitempty"` }
func (*Heritage) FillinDefaults ¶
func (h *Heritage) FillinDefaults()
type HeritageResponse ¶
type Listener ¶
type Listener struct { Endpoint string `yaml:"endpoint" json:"endpoint"` HealthCheckInterval int `yaml:"health_check_interval,omitempty" json:"health_check_interval,omitempty"` HealthCheckPath string `yaml:"health_check_path,omitempty" json:"health_check_path,omitempty"` HealthCheckTimeout int `yaml:"health_check_timeout,omitempty" json:"health_check_timeout,omitempty"` HealthyThresholdCount int `yaml:"healthy_threshold_count,omitempty" json:"healthy_threshold_count,omitempty"` UnhealthyThresholdCount int `yaml:"unhealthy_threshold_count,omitempty" json:"unhealthy_threshold_count,omitempty"` RulePriority int `yaml:"rule_priority,omitempty" json:"rule_priority,omitempty"` RuleConditions []RuleCondition `yaml:"rule_conditions,omitempty" json:"rule_conditions,omitempty"` }
type Notification ¶
type NotificationResponse ¶
type NotificationResponse struct { Notification *Notification `json:"notification,omitempty"` Notifications []*Notification `json:"notifications,omitempty"` }
type Oneoff ¶
type Oneoff struct { ID int `json:"id"` TaskARN string `json:"task_arn"` Command string `json:"command"` Status string `json:"status"` ExitCode string `json:"exit_code"` Reason string `json:"reason"` InteractiveRunCommand string `json:"interactive_run_command"` ContainerInstanceARN string `json:"container_instance_arn"` ContainerName string `json:"container_name"` Memory int `json:"memory"` District *District `json:"district"` }
type OneoffResponse ¶
type PluginResponse ¶
type PortMapping ¶
type PortMapping struct { LbPort int `yaml:"lb_port" json:"lb_port"` HostPort int `yaml:"host_port,omitempty" json:"host_port,omitempty"` ContainerPort int `yaml:"container_port" json:"container_port"` Protocol string `yaml:"protocol,omitempty" json:"protocol,omitempty"` EnableProxyProtocol bool `yaml:"enable_proxy_protocol,omitempty" json:"enable_proxy_protocol,omitempty"` }
type ReviewAppDefinition ¶ added in v0.9.1
type ReviewAppDefinition struct { GroupName string `yaml:"group" json:"group_name"` ImageName string `yaml:"image_name" json:"image_name"` Environment []*EnvironmentPair `yaml:"environment" json:"environment"` Services []*ReviewAppService `yaml:"services" json:"services"` }
type ReviewAppRequest ¶ added in v0.9.1
type ReviewAppRequest struct { *ReviewAppDefinition Subject string `json:"subject"` Retention int `json:"retention"` ImageTag string `json:"image_tag"` }
type ReviewAppResponse ¶ added in v0.9.1
type ReviewAppService ¶ added in v0.9.1
type ReviewAppService struct { Name string `yaml:"name" json:"name"` ServiceType string `yaml:"service_type" json:"service_type"` Cpu int `yaml:"cpu" json:"cpu,omitempty"` Memory int `yaml:"memory" json:"memory"` Command string `yaml:"command" json:"command"` ForceSsl bool `yaml:"force_ssl" json:"force_ssl"` Listeners []*Listener `yaml:"listeners" json:"listeners"` }
type ReviewGroup ¶ added in v0.9.1
type ReviewGroupRequest ¶ added in v0.9.1
type ReviewGroupResponse ¶ added in v0.9.1
type ReviewGroupResponse struct { ReviewGroup *ReviewGroup `json:"review_group,omitempty"` ReviewGroups []*ReviewGroup `json:"review_groups,omitempty"` }
type RuleCondition ¶
type ScheduledTask ¶
type Service ¶
type Service struct { Public *bool `yaml:"public,omitempty" json:"public,omitempty"` Name string `yaml:"name" json:"name"` Cpu int `yaml:"cpu" json:"cpu,omitempty"` Memory int `yaml:"memory" json:"memory"` Command string `yaml:"command" json:"command"` ServiceType string `yaml:"service_type" json:"service_type"` WebContainerPort int `yaml:"web_container_port,omitempty" json:"web_container_port,omitempty"` ForceSsl bool `yaml:"force_ssl" json:"force_ssl"` PortMappings []*PortMapping `yaml:"port_mappings,omitempty" json:"port_mappings,omitempty"` Hosts []*Host `yaml:"hosts" json:"hosts"` Listeners []*Listener `yaml:"listeners,omitempty" json:"listeners,omitempty"` // Response only parameters Status string `json:"string,omitempty"` RunningCount int `json:"running_count,omitempty"` PendingCount int `json:"pending_count,omitempty"` DesiredCount int `json:"desired_count,omitempty"` }
func (*Service) FillinDefaults ¶
func (s *Service) FillinDefaults()
type UserResponse ¶
type VaultAuthResponse ¶ added in v0.9.7
type VaultAuthResponse struct {
Auth VaultAuthResponseAuth `json:"auth"`
}
type VaultAuthResponseAuth ¶ added in v0.9.7
type VaultAuthResponseAuth struct {
ClientToken string `json:"client_token"`
}
Click to show internal directories.
Click to hide internal directories.