types

package
v0.0.0-...-8ce0de3 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2019 License: MIT Imports: 1 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InternalServerErrorResponse = events.APIGatewayProxyResponse{
	Body:       "{\"message\": \"Internal server error\"}",
	StatusCode: 500,
}

InternalServerErrorResponse contains a APIGatewayProxyResponse struct preset with "Internal server error" it's used as return value in controllers.

View Source
var InvalidEnvironmentStatusResponse = events.APIGatewayProxyResponse{
	Body:       "{\"message\": \"Can't execute operation in current environment status\"}",
	StatusCode: 400,
}

InvalidEnvironmentStatusResponse contains a APIGatewayProxyResponse struct preset with "Can't execute operation in current environment status" it's used as return value in controllers.

View Source
var InvalidRequestBodyResponse = events.APIGatewayProxyResponse{
	Body:       "{\"message\": \"Invalid request body\"}",
	StatusCode: 400,
}

InvalidRequestBodyResponse contains a APIGatewayProxyResponse struct preset with "Invalid request body" it's used as return value in controllers.

View Source
var InvalidWebhookIsDeactivatedResponse = events.APIGatewayProxyResponse{
	Body:       "{\"message\": \"Webhooks are deactivated for this repository\"}",
	StatusCode: 400,
}

InvalidWebhookIsDeactivatedResponse contains a APIGatewayProxyResponse struct preset with "Webhooks are deactivated for this repository" it's used as return value in controllers.

View Source
var NotFoundErrorResponse = events.APIGatewayProxyResponse{
	Body:       "{\"message\": \"Not found\"}",
	StatusCode: 404,
}

NotFoundErrorResponse contains a APIGatewayProxyResponse struct preset with "Not found" it's used as return value in controllers.

Functions

This section is empty.

Types

type BuilderEvent

type BuilderEvent struct {
	Repository            string                `json:"repository"`
	Branch                string                `json:"branch"`
	Operation             string                `json:"operation"`
	InfrastructureRepoURL string                `json:"infrastructureRepoUrl"`
	CodeBuildRoleARN      string                `json:"codeBuildRoleARN"`
	EnvironmentVariables  []EnvironmentVariable `json:"environmentVariables"`
	Success               int                   `json:"success"`
	ShutdownSchedules     []TimeSchedule        `json:"shutdownSchedules"`
	StartupSchedules      []TimeSchedule        `json:"startupSchedules"`
}

BuilderEvent struct contains all values for the different Builder invoke bodys combined into one struct.

type ComponentVersions

type ComponentVersions struct {
	Components []SingleComponentVersion `json:"components"`
}

ComponentVersions is the implementation of the TowerAPI ComponentVersions schema

type Environment

type Environment struct {
	Repository            string                `json:"repository,omitempty"`
	Branch                string                `json:"branch,omitempty"`
	CreationDate          string                `json:"creationDate,omitempty"`
	Status                string                `json:"status,omitempty"`
	InfrastructureRepoURL string                `json:"infrastructureRepoURL,omitempty"`
	ShutdownSchedules     []TimeSchedule        `json:"shutdownSchedules,omitempty"`
	StartupSchedules      []TimeSchedule        `json:"startupSchedules,omitempty"`
	CodeBuildRoleARN      string                `json:"codeBuildRoleARN,omitempty"`
	EnvironmentVariables  []EnvironmentVariable `json:"environmentVariables,omitempty"`
}

Environment is the implementation of the TowerAPI Environment schema

type EnvironmentPost

type EnvironmentPost struct {
	Branch                string                `json:"branch,omitempty"`
	InfrastructureRepoURL string                `json:"infrastructureRepoURL,omitempty"`
	ShutdownSchedules     []TimeSchedule        `json:"shutdownSchedules,omitempty"`
	StartupSchedules      []TimeSchedule        `json:"startupSchedules,omitempty"`
	CodeBuildRoleARN      string                `json:"codeBuildRoleARN,omitempty"`
	EnvironmentVariables  []EnvironmentVariable `json:"environmentVariables,omitempty"`
}

EnvironmentPost is the implementation of the TowerAPI EnvironmentPostBody schema

type EnvironmentPut

type EnvironmentPut struct {
	InfrastructureRepoURL string                `json:"infrastructureRepoURL,omitempty"`
	ShutdownSchedules     []TimeSchedule        `json:"shutdownSchedules,omitempty"`
	StartupSchedules      []TimeSchedule        `json:"startupSchedules,omitempty"`
	CodeBuildRoleARN      string                `json:"codeBuildRoleARN,omitempty"`
	EnvironmentVariables  []EnvironmentVariable `json:"environmentVariables,omitempty"`
}

EnvironmentPut is the implementation of the TowerAPI EnvironmentPutBody schema

type EnvironmentStatus

type EnvironmentStatus struct {
	Repository string `json:"repository,omitempty"`
	Branch     string `json:"branch,omitempty"`
	Status     string `json:"status,omitempty"`
}

EnvironmentStatus is the implementation of the TowerAPI EnvironmentStatus schema

type EnvironmentUpdate

type EnvironmentUpdate struct {
	InfrastructureRepoURL string                `json:":infrastructureRepoURL"`
	ShutdownSchedules     []TimeSchedule        `json:":shutdownSchedules"`
	StartupSchedules      []TimeSchedule        `json:":startupSchedules"`
	CodeBuildRoleARN      string                `json:":codeBuildRoleARN"`
	EnvironmentVariables  []EnvironmentVariable `json:":environmentVariables"`
}

EnvironmentUpdate struct is used for DynamoDB updates, because the update command requires all json keys to start with ":"

type EnvironmentVariable

type EnvironmentVariable struct {
	Name  string `json:"name"`
	Type  string `json:"type"`
	Value string `json:"value"`
}

EnvironmentVariable is the implementation of the TowerAPI EnvironmentVariable schema

type GeneralConfig

type GeneralConfig struct {
	ShutdownSchedules    []TimeSchedule        `json:"shutdownSchedules,omitempty"`
	StartupSchedules     []TimeSchedule        `json:"startupSchedules,omitempty"`
	EnvironmentVariables []EnvironmentVariable `json:"environmentVariables,omitempty"`
}

GeneralConfig is the implementation of the TowerAPI GeneralConfiguration schema

type GeneralConfigUpdate

type GeneralConfigUpdate struct {
	ShutdownSchedules    []TimeSchedule        `json:":shutdownSchedules"`
	StartupSchedules     []TimeSchedule        `json:":startupSchedules"`
	EnvironmentVariables []EnvironmentVariable `json:":environmentVariables"`
}

GeneralConfigUpdate struct is used for DynamoDB updates, because the update command requires all json keys to start with ":"

type GitHubWebhook

type GitHubWebhook struct {
	Ref        string `json:"ref"`
	RefType    string `json:"ref_type"`
	Repository struct {
		Name string `json:"name"`
	}
}

GitHubWebhook struct contains the three important values for auto-staging from the GitHub Webhook.

ref_type must be branch for auto-staging

ref is the name of the Git Branch

repository/name is the name of the repository

type Repository

type Repository struct {
	Repository            string                `json:"repository,omitempty"`
	InfrastructureRepoURL string                `json:"infrastructureRepoURL,omitempty"`
	Webhook               bool                  `json:"webhook,omitempty"`
	Filters               []string              `json:"filters,omitempty"`
	ShutdownSchedules     []TimeSchedule        `json:"shutdownSchedules,omitempty"`
	StartupSchedules      []TimeSchedule        `json:"startupSchedules,omitempty"`
	CodeBuildRoleARN      string                `json:"codeBuildRoleARN,omitempty"`
	EnvironmentVariables  []EnvironmentVariable `json:"environmentVariables,omitempty"`
}

Repository is the implementation of the TowerAPI Repository schema

type RepositoryUpdate

type RepositoryUpdate struct {
	InfrastructureRepoURL string                `json:":infrastructureRepoURL"`
	Webhook               bool                  `json:":webhook"`
	Filters               []string              `json:":filters"`
	ShutdownSchedules     []TimeSchedule        `json:":shutdownSchedules"`
	StartupSchedules      []TimeSchedule        `json:":startupSchedules"`
	CodeBuildRoleARN      string                `json:":codeBuildRoleARN"`
	EnvironmentVariables  []EnvironmentVariable `json:":environmentVariables"`
}

RepositoryUpdate struct is used for DynamoDB updates, because the update command requires all json keys to start with ":"

type SingleComponentVersion

type SingleComponentVersion struct {
	Name       string `json:"name"`
	Version    string `json:"version"`
	CommitHash string `json:"commitHash"`
	Branch     string `json:"branch"`
	BuildTime  string `json:"buildTime"`
}

SingleComponentVersion is the implementation of the TowerAPI SingleComponentVersion schema

type TimeSchedule

type TimeSchedule struct {
	Cron string `json:"cron"`
}

TimeSchedule is the implementation of the TowerAPI TimeSchedule schema

type TowerConfiguration

type TowerConfiguration struct {
	LogLevel           int    `json:"logLevel"`
	WebhookSecretToken string `json:"webhookSecretToken"`
}

TowerConfiguration is the implementation of the TowerAPI TowerConfiguration schema

type TriggerSchedulePost

type TriggerSchedulePost struct {
	Branch     string `json:"branch"`
	Repository string `json:"repository"`
	Action     string `json:"action"`
}

TriggerSchedulePost is the implementation of the TowerAPI EnvironmentStatus schema

Jump to

Keyboard shortcuts

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