Documentation ¶
Index ¶
- type CreateFabricInput
- type CreateRuleInput
- type CreateVLANInput
- type DeleteFabricInput
- type DeleteRuleInput
- type DeleteVLANInput
- type DisableRuleInput
- type EnableRuleInput
- type FabricVLAN
- type FabricsClient
- func (c *FabricsClient) Create(ctx context.Context, input *CreateFabricInput) (*Network, error)
- func (c *FabricsClient) CreateVLAN(ctx context.Context, input *CreateVLANInput) (*FabricVLAN, error)
- func (c *FabricsClient) Delete(ctx context.Context, input *DeleteFabricInput) error
- func (c *FabricsClient) DeleteVLAN(ctx context.Context, input *DeleteVLANInput) error
- func (c *FabricsClient) Get(ctx context.Context, input *GetFabricInput) (*Network, error)
- func (c *FabricsClient) GetVLAN(ctx context.Context, input *GetVLANInput) (*FabricVLAN, error)
- func (c *FabricsClient) List(ctx context.Context, input *ListFabricsInput) ([]*Network, error)
- func (c *FabricsClient) ListVLANs(ctx context.Context, _ *ListVLANsInput) ([]*FabricVLAN, error)
- func (c *FabricsClient) UpdateVLAN(ctx context.Context, input *UpdateVLANInput) (*FabricVLAN, error)
- type FirewallClient
- func (c *FirewallClient) CreateRule(ctx context.Context, input *CreateRuleInput) (*FirewallRule, error)
- func (c *FirewallClient) DeleteRule(ctx context.Context, input *DeleteRuleInput) error
- func (c *FirewallClient) DisableRule(ctx context.Context, input *DisableRuleInput) (*FirewallRule, error)
- func (c *FirewallClient) EnableRule(ctx context.Context, input *EnableRuleInput) (*FirewallRule, error)
- func (c *FirewallClient) GetRule(ctx context.Context, input *GetRuleInput) (*FirewallRule, error)
- func (c *FirewallClient) ListMachineRules(ctx context.Context, input *ListMachineRulesInput) ([]*FirewallRule, error)
- func (c *FirewallClient) ListRuleMachines(ctx context.Context, input *ListRuleMachinesInput) ([]*Machine, error)
- func (c *FirewallClient) ListRules(ctx context.Context, _ *ListRulesInput) ([]*FirewallRule, error)
- func (c *FirewallClient) UpdateRule(ctx context.Context, input *UpdateRuleInput) (*FirewallRule, error)
- type FirewallRule
- type GetFabricInput
- type GetInput
- type GetRuleInput
- type GetVLANInput
- type ListFabricsInput
- type ListInput
- type ListMachineRulesInput
- type ListRuleMachinesInput
- type ListRulesInput
- type ListVLANsInput
- type Machine
- type Network
- type NetworkClient
- func (c *NetworkClient) Fabrics() *FabricsClient
- func (c *NetworkClient) Firewall() *FirewallClient
- func (c *NetworkClient) Get(ctx context.Context, input *GetInput) (*Network, error)
- func (c *NetworkClient) List(ctx context.Context, _ *ListInput) ([]*Network, error)
- func (c *NetworkClient) SetHeader(header *http.Header)
- type UpdateRuleInput
- type UpdateVLANInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateFabricInput ¶
type CreateFabricInput struct { FabricVLANID int `json:"-"` Name string `json:"name"` Description string `json:"description,omitempty"` Subnet string `json:"subnet"` ProvisionStartIP string `json:"provision_start_ip"` ProvisionEndIP string `json:"provision_end_ip"` Gateway string `json:"gateway,omitempty"` Resolvers []string `json:"resolvers,omitempty"` Routes map[string]string `json:"routes,omitempty"` InternetNAT bool `json:"internet_nat"` }
type CreateRuleInput ¶
type CreateVLANInput ¶
type DeleteFabricInput ¶
type DeleteRuleInput ¶
type DeleteRuleInput struct {
ID string
}
type DeleteVLANInput ¶
type DeleteVLANInput struct {
ID int `json:"-"`
}
type DisableRuleInput ¶
type DisableRuleInput struct {
ID string `json:"-"`
}
type EnableRuleInput ¶
type EnableRuleInput struct {
ID string `json:"-"`
}
type FabricVLAN ¶
type FabricsClient ¶
type FabricsClient struct {
// contains filtered or unexported fields
}
func (*FabricsClient) Create ¶
func (c *FabricsClient) Create(ctx context.Context, input *CreateFabricInput) (*Network, error)
func (*FabricsClient) CreateVLAN ¶
func (c *FabricsClient) CreateVLAN(ctx context.Context, input *CreateVLANInput) (*FabricVLAN, error)
func (*FabricsClient) Delete ¶
func (c *FabricsClient) Delete(ctx context.Context, input *DeleteFabricInput) error
func (*FabricsClient) DeleteVLAN ¶
func (c *FabricsClient) DeleteVLAN(ctx context.Context, input *DeleteVLANInput) error
func (*FabricsClient) Get ¶
func (c *FabricsClient) Get(ctx context.Context, input *GetFabricInput) (*Network, error)
func (*FabricsClient) GetVLAN ¶
func (c *FabricsClient) GetVLAN(ctx context.Context, input *GetVLANInput) (*FabricVLAN, error)
func (*FabricsClient) List ¶
func (c *FabricsClient) List(ctx context.Context, input *ListFabricsInput) ([]*Network, error)
func (*FabricsClient) ListVLANs ¶
func (c *FabricsClient) ListVLANs(ctx context.Context, _ *ListVLANsInput) ([]*FabricVLAN, error)
func (*FabricsClient) UpdateVLAN ¶
func (c *FabricsClient) UpdateVLAN(ctx context.Context, input *UpdateVLANInput) (*FabricVLAN, error)
type FirewallClient ¶
type FirewallClient struct {
// contains filtered or unexported fields
}
func (*FirewallClient) CreateRule ¶
func (c *FirewallClient) CreateRule(ctx context.Context, input *CreateRuleInput) (*FirewallRule, error)
func (*FirewallClient) DeleteRule ¶
func (c *FirewallClient) DeleteRule(ctx context.Context, input *DeleteRuleInput) error
func (*FirewallClient) DisableRule ¶
func (c *FirewallClient) DisableRule(ctx context.Context, input *DisableRuleInput) (*FirewallRule, error)
func (*FirewallClient) EnableRule ¶
func (c *FirewallClient) EnableRule(ctx context.Context, input *EnableRuleInput) (*FirewallRule, error)
func (*FirewallClient) GetRule ¶
func (c *FirewallClient) GetRule(ctx context.Context, input *GetRuleInput) (*FirewallRule, error)
func (*FirewallClient) ListMachineRules ¶
func (c *FirewallClient) ListMachineRules(ctx context.Context, input *ListMachineRulesInput) ([]*FirewallRule, error)
func (*FirewallClient) ListRuleMachines ¶
func (c *FirewallClient) ListRuleMachines(ctx context.Context, input *ListRuleMachinesInput) ([]*Machine, error)
func (*FirewallClient) ListRules ¶
func (c *FirewallClient) ListRules(ctx context.Context, _ *ListRulesInput) ([]*FirewallRule, error)
func (*FirewallClient) UpdateRule ¶
func (c *FirewallClient) UpdateRule(ctx context.Context, input *UpdateRuleInput) (*FirewallRule, error)
type FirewallRule ¶
type FirewallRule struct { // ID is a unique identifier for this rule ID string `json:"id"` // Enabled indicates if the rule is enabled Enabled bool `json:"enabled"` // Rule is the firewall rule text Rule string `json:"rule"` // Global indicates if the rule is global. Optional. Global bool `json:"global"` // Description is a human-readable description for the rule. Optional Description string `json:"description"` }
FirewallRule represents a firewall rule
type GetFabricInput ¶
type GetRuleInput ¶
type GetRuleInput struct {
ID string
}
type GetVLANInput ¶
type GetVLANInput struct {
ID int `json:"-"`
}
type ListFabricsInput ¶
type ListFabricsInput struct {
FabricVLANID int `json:"-"`
}
type ListMachineRulesInput ¶
type ListMachineRulesInput struct {
MachineID string
}
type ListRuleMachinesInput ¶
type ListRuleMachinesInput struct {
ID string
}
type ListRulesInput ¶
type ListRulesInput struct{}
type ListVLANsInput ¶
type ListVLANsInput struct{}
type Machine ¶
type Machine struct { ID string `json:"id"` Name string `json:"name"` Type string `json:"type"` Brand string `json:"brand"` State string `json:"state"` Image string `json:"image"` Memory int `json:"memory"` Disk int `json:"disk"` Metadata map[string]string `json:"metadata"` Tags map[string]interface{} `json:"tags"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` Docker bool `json:"docker"` IPs []string `json:"ips"` Networks []string `json:"networks"` PrimaryIP string `json:"primaryIp"` FirewallEnabled bool `json:"firewall_enabled"` ComputeNode string `json:"compute_node"` Package string `json:"package"` }
type Network ¶
type Network struct { Id string `json:"id"` Name string `json:"name"` Public bool `json:"public"` Fabric bool `json:"fabric"` Description string `json:"description"` Subnet string `json:"subnet"` ProvisioningStartIP string `json:"provision_start_ip"` ProvisioningEndIP string `json:"provision_end_ip"` Gateway string `json:"gateway"` Resolvers []string `json:"resolvers"` Routes map[string]string `json:"routes"` InternetNAT bool `json:"internet_nat"` }
type NetworkClient ¶
func NewClient ¶
func NewClient(config *triton.ClientConfig) (*NetworkClient, error)
NewClient returns a new client for working with Network endpoints and resources within CloudAPI
func (*NetworkClient) Fabrics ¶
func (c *NetworkClient) Fabrics() *FabricsClient
Fabrics returns a FabricsClient used for accessing functions pertaining to Fabric functionality in the Triton API.
func (*NetworkClient) Firewall ¶
func (c *NetworkClient) Firewall() *FirewallClient
Firewall returns a FirewallClient client used for accessing functions pertaining to firewall functionality in the Triton API.
func (*NetworkClient) SetHeader ¶
func (c *NetworkClient) SetHeader(header *http.Header)
SetHeaders allows a consumer of the current client to set custom headers for the next backend HTTP request sent to CloudAPI
type UpdateRuleInput ¶
type UpdateVLANInput ¶
Click to show internal directories.
Click to hide internal directories.