Documentation ¶
Index ¶
- Constants
- func IsErrorObjectNotExists(err error) bool
- type Api
- func (ap *Api) FindGatewayByPublicIP(public_ip string, wait bool) (*Gateway, error)
- func (ap *Api) FindSubnet(cidr string, gatewayID string) (*Subnet, error)
- func (ap *Api) SetAccessCredentials(key string, secret string)
- func (ap *Api) SetFindGatewayTimeout(timeout string)
- func (ap *Api) SetURL(url string)
- type ApiConfig
- type Gateway
- type GatewaysEndpoint
- func (endpoint *GatewaysEndpoint) All() ([]Gateway, error)
- func (endpoint *GatewaysEndpoint) Delete(id string) error
- func (endpoint *GatewaysEndpoint) Get(id string) (*Gateway, error)
- func (endpoint *GatewaysEndpoint) GetInstallationScript(platform string, license string) (string, error)
- func (endpoint *GatewaysEndpoint) GetRegistrationToken(platform string, license string) (string, error)
- func (endpoint *GatewaysEndpoint) Update(id string, gateway *Gateway) (*Gateway, error)
- type IPSecConnection
- type IPSecConnectionsEndpoint
- func (endpoint *IPSecConnectionsEndpoint) All() ([]IPSecConnection, error)
- func (endpoint *IPSecConnectionsEndpoint) Create(connection *IPSecConnection) (*IPSecConnection, error)
- func (endpoint *IPSecConnectionsEndpoint) Delete(id string) error
- func (endpoint *IPSecConnectionsEndpoint) Get(id string) (*IPSecConnection, error)
- func (endpoint *IPSecConnectionsEndpoint) Update(id string, connection *IPSecConnection) (*IPSecConnection, error)
- type IpAddressSet
- type IpAddressSetsEndpoint
- func (endpoint *IpAddressSetsEndpoint) All() ([]IpAddressSet, error)
- func (endpoint *IpAddressSetsEndpoint) Create(set *IpAddressSet) (*IpAddressSet, error)
- func (endpoint *IpAddressSetsEndpoint) Delete(id string) error
- func (endpoint *IpAddressSetsEndpoint) Get(id string) (*IpAddressSet, error)
- func (endpoint *IpAddressSetsEndpoint) Update(set *IpAddressSet) (*IpAddressSet, error)
- type MissingGatewayError
- type MockApi
- type Session
- type Subnet
- type SubnetsEndpoint
- func (endpoint *SubnetsEndpoint) All() ([]Subnet, error)
- func (endpoint *SubnetsEndpoint) AssignGateway(subnetId string, gatewayId string) (*Subnet, error)
- func (endpoint *SubnetsEndpoint) AssignResourceGroup(subnetId string, resourceGroupId string) (*Subnet, error)
- func (endpoint *SubnetsEndpoint) ClearGateway(subnetId string) (*Subnet, error)
- func (endpoint *SubnetsEndpoint) Create(subnet *Subnet) (*Subnet, error)
- func (endpoint *SubnetsEndpoint) Delete(id string) error
- func (endpoint *SubnetsEndpoint) Get(id string) (*Subnet, error)
- func (endpoint *SubnetsEndpoint) Update(id string, subnet *Subnet) (*Subnet, error)
Constants ¶
View Source
const ( DEFAULT_API_URL = "https://api.fortycloud.net/restapi/v0.4" DEFAULT_FIND_GATEWAY_TIMEOUT = "5m" )
Variables ¶
This section is empty.
Functions ¶
func IsErrorObjectNotExists ¶
Types ¶
type Api ¶
type Api struct { Gateways *GatewaysEndpoint IPAddressSets *IpAddressSetsEndpoint IPSecConnections *IPSecConnectionsEndpoint Subnets *SubnetsEndpoint // contains filtered or unexported fields }
func (*Api) FindGatewayByPublicIP ¶
func (*Api) SetAccessCredentials ¶
func (*Api) SetFindGatewayTimeout ¶
type ApiConfig ¶
func DefaultApiConfig ¶
func DefaultApiConfig() *ApiConfig
type Gateway ¶
type Gateway struct { Fqdn string `json:"fqdn"` PublicIP string `json:"publicIP"` OverlayAddress string `json:"overlayAddress"` VpnUsersSubnet string `json:"vpnUsersSubnet"` Region string `json:"region"` Enable bool `json:"enable"` AllowSSHToEveryone bool `json:"allowSSHToEveryone"` RouteAllTrafficViaGW bool `json:"routeAllTrafficViaGW"` PrivateIP string `json:"privateIP"` State string `json:"state"` Name string `json:"name"` Description string `json:"description"` SecurityGroup string `json:"securityGroup"` OpenVPNProtocol string `json:"openVPNProtocol"` ClientRoutes []string `json:"clientRoutes"` GatewayAsDNS bool `json:"gatewayAsDNS"` DirectRoutesOnly bool `json:"directRoutesOnly"` HaState string `json:"haState"` Id string `json:"id,omitempty"` Release string `json:"release,omitempty"` IdentityServerName string `json:"identityServerName,omitempty"` }
type GatewaysEndpoint ¶
type GatewaysEndpoint struct {
// contains filtered or unexported fields
}
func NewGatewaysEndpoint ¶
func NewGatewaysEndpoint(service *internal.JsonService) *GatewaysEndpoint
func (*GatewaysEndpoint) All ¶
func (endpoint *GatewaysEndpoint) All() ([]Gateway, error)
func (*GatewaysEndpoint) Delete ¶
func (endpoint *GatewaysEndpoint) Delete(id string) error
func (*GatewaysEndpoint) GetInstallationScript ¶
func (endpoint *GatewaysEndpoint) GetInstallationScript(platform string, license string) (string, error)
func (*GatewaysEndpoint) GetRegistrationToken ¶
func (endpoint *GatewaysEndpoint) GetRegistrationToken(platform string, license string) (string, error)
type IPSecConnection ¶
type IPSecConnection struct { Name string `json:"name"` Description string `json:"description"` StateAB string `json:"stateAB"` ForceIPSecOverUDP bool `json:"forceIPSecOverUDP"` Enable bool `json:"enable"` GatewayA string `json:"gatewayA"` NetworkArchitectureA string `json:"networkArchitectureA"` GatewayB string `json:"gatewayB"` NetworkArchitectureB string `json:"networkArchitectureB"` IKEPhaseAlgorithm string `json:"iKEPhaseAlgorithm"` Pfs bool `json:"pfs"` DiffieHellmanGroup string `json:"diffieHellmanGroup"` IKESessionLifetime string `json:"iKESessionLifetime"` IPSecPhaseAlgorithm string `json:"iPSecPhaseAlgorithm"` IPSecSessionLifetime string `json:"iPSecSessionLifetime"` DPDTimeout int `json:"dPDTimeout"` DPDAction string `json:"dPDAction"` Id string `json:"id,omitempty"` }
type IPSecConnectionsEndpoint ¶
type IPSecConnectionsEndpoint struct {
// contains filtered or unexported fields
}
func NewIPSecConnectionsEndpoint ¶
func NewIPSecConnectionsEndpoint(service *internal.JsonService) *IPSecConnectionsEndpoint
func (*IPSecConnectionsEndpoint) All ¶
func (endpoint *IPSecConnectionsEndpoint) All() ([]IPSecConnection, error)
func (*IPSecConnectionsEndpoint) Create ¶
func (endpoint *IPSecConnectionsEndpoint) Create(connection *IPSecConnection) (*IPSecConnection, error)
func (*IPSecConnectionsEndpoint) Delete ¶
func (endpoint *IPSecConnectionsEndpoint) Delete(id string) error
func (*IPSecConnectionsEndpoint) Get ¶
func (endpoint *IPSecConnectionsEndpoint) Get(id string) (*IPSecConnection, error)
func (*IPSecConnectionsEndpoint) Update ¶
func (endpoint *IPSecConnectionsEndpoint) Update(id string, connection *IPSecConnection) (*IPSecConnection, error)
type IpAddressSet ¶
type IpAddressSetsEndpoint ¶
type IpAddressSetsEndpoint struct {
// contains filtered or unexported fields
}
func NewIpAddressSetsEndpoint ¶
func NewIpAddressSetsEndpoint(service *internal.JsonService) *IpAddressSetsEndpoint
func (*IpAddressSetsEndpoint) All ¶
func (endpoint *IpAddressSetsEndpoint) All() ([]IpAddressSet, error)
func (*IpAddressSetsEndpoint) Create ¶
func (endpoint *IpAddressSetsEndpoint) Create(set *IpAddressSet) (*IpAddressSet, error)
func (*IpAddressSetsEndpoint) Delete ¶
func (endpoint *IpAddressSetsEndpoint) Delete(id string) error
func (*IpAddressSetsEndpoint) Get ¶
func (endpoint *IpAddressSetsEndpoint) Get(id string) (*IpAddressSet, error)
func (*IpAddressSetsEndpoint) Update ¶
func (endpoint *IpAddressSetsEndpoint) Update(set *IpAddressSet) (*IpAddressSet, error)
type MissingGatewayError ¶
type MissingGatewayError struct {
PublicIP string
}
func (MissingGatewayError) Error ¶
func (err MissingGatewayError) Error() string
type MockApi ¶
type MockApi struct { Api // contains filtered or unexported fields }
func NewMockApi ¶
func NewMockApi() *MockApi
func (*MockApi) Handle ¶
func (b *MockApi) Handle(handler http.HandlerFunc)
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func DefaultSession ¶
func DefaultSession() *Session
type Subnet ¶
type Subnet struct { Id string `json:"id,omitempty"` Name string `json:"name"` Description string `json:"description"` Cidr string `json:"cidr"` DisableAutoNAT bool `json:"disableAutoNAT"` GatewayRef string `json:"gatewayRef,omitempty"` ResourceGroupRef string `json:"resourceGroupRef,omitempty"` }
func (*Subnet) ResourceGroupID ¶
func (*Subnet) SetGatewayID ¶
func (*Subnet) SetResourceGroupID ¶
type SubnetsEndpoint ¶
type SubnetsEndpoint struct {
// contains filtered or unexported fields
}
func NewSubnetsEndpoint ¶
func NewSubnetsEndpoint(service *internal.JsonService) *SubnetsEndpoint
func (*SubnetsEndpoint) All ¶
func (endpoint *SubnetsEndpoint) All() ([]Subnet, error)
func (*SubnetsEndpoint) AssignGateway ¶
func (endpoint *SubnetsEndpoint) AssignGateway(subnetId string, gatewayId string) (*Subnet, error)
func (*SubnetsEndpoint) AssignResourceGroup ¶
func (endpoint *SubnetsEndpoint) AssignResourceGroup(subnetId string, resourceGroupId string) (*Subnet, error)
func (*SubnetsEndpoint) ClearGateway ¶
func (endpoint *SubnetsEndpoint) ClearGateway(subnetId string) (*Subnet, error)
func (*SubnetsEndpoint) Create ¶
func (endpoint *SubnetsEndpoint) Create(subnet *Subnet) (*Subnet, error)
func (*SubnetsEndpoint) Delete ¶
func (endpoint *SubnetsEndpoint) Delete(id string) error
Click to show internal directories.
Click to hide internal directories.