Documentation ¶
Index ¶
- func Bool(b bool) *bool
- func Int(i int) *int
- func String(s string) *string
- func ToBool(b *bool) bool
- func ToInt(i *int) int
- func ToString(s *string) string
- type DynamoUUID
- type ErrorResponse
- type EventType
- type Network
- type NetworkListResponse
- type NetworkRequest
- type NetworkResponse
- type NetworkUpdateRequest
- type Pool
- type PoolListResponse
- type PoolRequest
- type Provider
- type ProviderListResponse
- type ProviderRequest
- type ProviderUpdateRequest
- type ProviderWebhook
- type ProviderWebhookResponse
- type Subnet
- type SubnetResponse
- type SubnetType
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DynamoUUID ¶
func NewUUID ¶
func NewUUID() *DynamoUUID
func (*DynamoUUID) MarshalDynamoDBAttributeValue ¶
func (u *DynamoUUID) MarshalDynamoDBAttributeValue() (dynatypes.AttributeValue, error)
func (*DynamoUUID) UnmarshalDynamoDBAttributeValue ¶
func (u *DynamoUUID) UnmarshalDynamoDBAttributeValue(av types.AttributeValue) error
type ErrorResponse ¶
func NewSingleErrorResponse ¶
func NewSingleErrorResponse(message string) *ErrorResponse
type Network ¶
type Network struct { ID *DynamoUUID `json:"id" dynamodbav:"id"` Provider string `json:"provider" dynamodbav:"provider"` Region string `json:"region" dynamodbav:"region"` Account string `json:"account" dynamodbav:"account"` Environment string `json:"environment" dynamodbav:"environment"` CIDR string `json:"cidr" dynamodbav:"cidr"` VpcID string `json:"vpcID" dynamodbav:"vpcID"` Info string `json:"info" dynamodbav:"info"` AttachTGW bool `json:"attachTGW,omitempty" dynamodbav:"attachTGW"` PrivateSubnet bool `json:"privateSubnet,omitempty" dynamodbav:"privateSubnet"` PublicSubnet bool `json:"publicSubnet,omitempty" dynamodbav:"publicSubnet"` Legacy bool `json:"legacy,omitempty" dynamodbav:"legacy"` Reserved bool `json:"reserved,omitempty" dynamodbav:"reserved"` }
SortKey: Provider#[Region]#[Account]#[Environment]#[CIDR]
type NetworkListResponse ¶
type NetworkListResponse struct {
Items []*Network `json:"items"`
}
type NetworkRequest ¶
type NetworkRequest struct { Account string `json:"account" validate:"required"` PoolID string `json:"poolID" validate:"required"` Provider string `json:"provider" validate:"required"` Environment string `json:"environment" validate:"required"` Info string `json:"info,omitempty" validate:"omitempty"` SubnetSize int `json:"subnetSize" validate:"required_without_all=Reserved Legacy,omitempty,max=24,min=16"` AttachTGW *bool `json:"attachTGW,omitempty" validate:"required"` PrivateSubnet *bool `json:"privateSubnet,omitempty" validate:"required"` PublicSubnet *bool `json:"publicSubnet,omitempty" validate:"required"` Legacy *bool `json:"legacy,omitempty" validate:"omitempty"` Reserved *bool `json:"reserved,omitempty" validate:"omitempty"` CIDR string `json:"cidr,omitempty" validate:"excluded_without_all=Reserved Legacy,omitempty,cidr"` }
type NetworkResponse ¶
type NetworkResponse struct { Network *Network `json:"network"` Webhook *ProviderWebhookResponse `json:"webhook,omitempty"` }
type NetworkUpdateRequest ¶
type Pool ¶
type Pool struct { ID *DynamoUUID `json:"id" dynamodbav:"id"` Name string `json:"name" dynamodbav:"name"` Region string `json:"region" dynamodbav:"region"` SubnetIP string `json:"subnetIP" dynamodbav:"cidr"` SubnetMask *int `json:"subnetMask,omitempty" dynamodbav:"subnetMask"` SubnetMaxIP *string `json:"subnetMaxIP,omitempty" dynamodbav:"subnetMaxIP"` }
type PoolListResponse ¶
type PoolListResponse struct {
Items []*Pool `json:"items"`
}
type PoolRequest ¶
type PoolRequest struct { Name string `json:"name" validate:"required"` Region string `json:"region" validate:"required"` SubnetIP string `json:"subnetIP" validate:"required,ip"` SubnetMask *int `json:"subnetMask,omitempty" validate:"omitempty,max=24,min=8"` SubnetMaxIP *string `json:"subnetMaxIP,omitempty" validate:"required_without=SubnetMask,excluded_with=SubnetMask,omitempty,ip"` }
type Provider ¶
type Provider struct { ID *DynamoUUID `json:"id" dynamodbav:"id"` Name string `json:"name" dynamodbav:"name"` WebhookURL string `json:"webhookURL" dynamodbav:"webhookURL"` APIToken string `json:"apiToken" dynamodbav:"apiToken"` }
type ProviderListResponse ¶
type ProviderListResponse struct {
Items []*Provider `json:"items"`
}
type ProviderRequest ¶
type ProviderUpdateRequest ¶
type ProviderWebhook ¶
type ProviderWebhook struct { Event EventType `json:"event"` NetworkID string `json:"networkID" validate:"required"` Account string `json:"account" validate:"required"` Region string `json:"region" validate:"required"` Environment string `json:"environment" validate:"required"` CIDR string `json:"cidr" validate:"required_if=Event create_network,omitempty,cidr"` Subnets []*Subnet `json:"subnets,omitempty" validate:"required_if=Event create_network,omitempty"` }
type ProviderWebhookResponse ¶
type Subnet ¶
type Subnet struct { Name string `json:"name"` Type SubnetType `json:"type"` CIDR string `json:"cidr"` }
type SubnetResponse ¶
type SubnetResponse struct {
Subnets []*Subnet `json:"subnets"`
}
type SubnetType ¶
type SubnetType string
const ( Private SubnetType = "private" Public SubnetType = "public" TransitGateway SubnetType = "transitGateway" )
Source Files ¶
Click to show internal directories.
Click to hide internal directories.