Documentation ¶
Overview ¶
Package vlan implements API functions residing under /vlan. This path contains methods for querying, creating and deleting of VLANs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API interface { List(ctx context.Context, page, limit int, search string) ([]Summary, error) Get(ctx context.Context, identifier string) (Info, error) Create(ctx context.Context, createDefinition CreateDefinition) (Summary, error) Delete(ctx context.Context, identifier string) error Update(ctx context.Context, identifier string, updateDefinition UpdateDefinition) error }
API contains methods for VLAN control.
type CreateDefinition ¶
type CreateDefinition struct { Location string `json:"location"` VMProvisioning bool `json:"vm_provisioning,omitempty"` CustomerDescription string `json:"description_customer,omitempty"` }
CreateDefinition contains information required to create a VLAN.
type Info ¶
type Info struct { Identifier string `json:"identifier"` Name string `json:"name"` CustomerDescription string `json:"description_customer"` InternalDescription string `json:"description_internal"` Role string `json:"role_text"` Status string `json:"status"` VMProvisioning bool `json:"vm_provisioning,omitempty"` Locations []Location }
Info describes all attributes of a VLAN.
type Location ¶
type Location struct { Identifier string `json:"identifier"` Name string `json:"name"` Code string `json:"code"` CountryCode string `json:"country"` Latitude string `json:"lat"` Longitude string `json:"lon"` CityCode string `json:"city_code"` }
Location is the metadata of a single location.
type Summary ¶
type Summary struct { Identifier string `json:"identifier"` Name string `json:"name"` CustomerDescription string `json:"description_customer"` }
Summary describes some attributes of a VLAN.
type UpdateDefinition ¶
type UpdateDefinition struct { CustomerDescription string `json:"description_customer,omitempty"` VMProvisioning bool `json:"vm_provisioning,omitempty"` }
UpdateDefinition contains information required to update a VLAN.
Click to show internal directories.
Click to hide internal directories.