Documentation ¶
Index ¶
- func Delete(client *golangsdk.ServiceClient, routeTableId, routeId string) error
- type Attachment
- type CreateOpts
- type ListOpts
- type Route
- func Create(client *golangsdk.ServiceClient, routeTableId string, opts CreateOpts) (*Route, error)
- func Get(client *golangsdk.ServiceClient, routeTableId, routeId string) (*Route, error)
- func List(client *golangsdk.ServiceClient, routeTableId string, opts ListOpts) ([]Route, error)
- func Update(client *golangsdk.ServiceClient, routeTableId, routeId string, opts UpdateOpts) (*Route, error)
- type RoutePage
- type UpdateOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Attachment ¶
type Attachment struct { // The resource ID for the corresponding attachment. ResourceId string `json:"resource_id"` // The resource type for the corresponding attachment. ResourceType string `json:"resource_type"` // The ID of the corresponding attachment. AttachmentId string `json:"attachment_id"` }
Attachment is an object that represents the details of the corresponding route.
type CreateOpts ¶
type CreateOpts struct { // The destination of the route. Destination string `json:"destination" required:"true"` // The ID of the corresponding attachment. AttachmentId string `json:"attachment_id,omitempty"` // Whether route is the black hole route. IsBlackHole *bool `json:"is_blackhole,omitempty"` }
CreateOpts is the structure used to create the route under a specified route table.
type ListOpts ¶
type ListOpts struct { // Number of records to be queried. // The valid value is range from 0 to 2000. Limit int `q:"limit"` // The ID of the route of the last record on the previous page. // If it is empty, it is the first page of the query. // This parameter must be used together with limit. // The valid value is range from 1 to 128. Marker string `q:"marker"` // The list of the destinations, support for querying multiple routes. Destination []string `q:"destination"` // The list of attachment IDs, support for querying multiple routes. AttachmentIds []string `json:"attachment_id"` // The list of attachment resource types, support for querying multiple routes. ResourceType []string `json:"resource_type"` // The list of keyword to sort the associations result, sort by ID by default. // The optional values are as follow: // + id // + name // + state SortKey []string `q:"sort_key"` // The returned results are arranged in ascending or descending order, the default is asc. SortDir []string `q:"sort_dir"` }
ListOpts allows to filter list data using given parameters.
type Route ¶
type Route struct { // The ID of the route. ID string `json:"id"` // The type of the route. Type string `json:"type"` // Whether route is the black hole route. IsBlackHole bool `json:"is_blackhole"` // The destination of the route. Destination string `json:"destination"` // The corresponding attachments. Attachments []Attachment `json:"attachments"` // The ID of the route table to which the route belongs. RouteTableId string `json:"route_table_id"` // The current status of the route. Status string `json:"state"` // The creation time of the association. CreatedAt string `json:"created_at"` // The last update time of the association. UpdatedAt string `json:"updated_at"` }
Route is the structure that represents the details of the route under a specified route table.
func Create ¶
func Create(client *golangsdk.ServiceClient, routeTableId string, opts CreateOpts) (*Route, error)
Create is a method to create a new route under a specified route table.
func Get ¶
func Get(client *golangsdk.ServiceClient, routeTableId, routeId string) (*Route, error)
Get is a method to obtain the route details using given parameters.
func List ¶
List is a method to query the list of the routes under a specified route table using given parameters.
func Update ¶
func Update(client *golangsdk.ServiceClient, routeTableId, routeId string, opts UpdateOpts) (*Route, error)
Update is a method to update route configuration using update option.
type RoutePage ¶
type RoutePage struct {
pagination.MarkerPageBase
}
RoutePage represents the response pages of the List method.
func (RoutePage) LastMarker ¶
LastMarker returns the last marker index in a ListResult.
type UpdateOpts ¶
type UpdateOpts struct { // The ID of the corresponding attachment. AttachmentId string `json:"attachment_id,omitempty"` // Whether route is the black hole route. IsBlackHole *bool `json:"is_blackhole,omitempty"` }
UpdateOpts is the structure used to update the route configuration.