Documentation
¶
Index ¶
- func ExtractSegmentsInto(r pagination.Page, v any) error
- func List(c *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
- type CreateOpts
- type CreateOptsBuilder
- type CreateResult
- type DeleteResult
- type GetResult
- type ListOpts
- type ListOptsBuilder
- type Segment
- type SegmentPage
- type UpdateOpts
- type UpdateOptsBuilder
- type UpdateResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractSegmentsInto ¶
func ExtractSegmentsInto(r pagination.Page, v any) error
ExtractSegmentsInto extracts the elements into a slice of Segment structs.
func List ¶
func List(c *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
List all segments.
Types ¶
type CreateOpts ¶
type CreateOpts struct { Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` NetworkID string `json:"network_id" required:"true"` NetworkType string `json:"network_type" required:"true"` PhysicalNetwork string `json:"physical_network,omitempty"` SegmentationID int `json:"segmentation_id,omitempty"` }
CreateOpts contains the fields needed for creating a segment.
func (CreateOpts) ToSegmentCreateMap ¶
func (opts CreateOpts) ToSegmentCreateMap() (map[string]any, error)
type CreateOptsBuilder ¶
CreateOptsBuilder allows extensions to add additional parameters.
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
func Create ¶
func Create(ctx context.Context, c *gophercloud.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
Create a new segment.
func (CreateResult) ExtractInto ¶
type DeleteResult ¶
type DeleteResult struct {
gophercloud.ErrResult
}
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
func (GetResult) ExtractInto ¶
type ListOpts ¶
type ListOpts struct { Name string `q:"name"` Description string `q:"description"` NetworkID string `q:"network_id"` PhysicalNetwork string `q:"physical_network"` NetworkType string `q:"network_type"` SegmentationID int `q:"segmentation_id"` RevisionNumber int `q:"revision_number"` SortDir string `q:"sort_dir"` SortKey string `q:"sort_key"` Fields string `q:"fields"` }
ListOpts allows filtering when listing segments.
func (ListOpts) ToSegmentListQuery ¶
type ListOptsBuilder ¶
ListOptsBuilder interface for listing.
type Segment ¶
type Segment struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` NetworkID string `json:"network_id"` NetworkType string `json:"network_type"` PhysicalNetwork string `json:"physical_network"` SegmentationID int `json:"segmentation_id"` RevisionNumber int `json:"revision_number"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
Segment model
func ExtractSegments ¶
func ExtractSegments(r pagination.Page) ([]Segment, error)
type SegmentPage ¶
type SegmentPage struct {
pagination.LinkedPageBase
}
SegmentPage wraps a page of segments.
func (SegmentPage) IsEmpty ¶
func (r SegmentPage) IsEmpty() (bool, error)
type UpdateOpts ¶
type UpdateOpts struct { Name *string `json:"name,omitempty"` Description *string `json:"description,omitempty"` SegmentationID *int `json:"segmentation_id,omitempty"` }
UpdateOpts contains fields to update a segment.
func (UpdateOpts) ToSegmentUpdateMap ¶
func (opts UpdateOpts) ToSegmentUpdateMap() (map[string]any, error)
type UpdateOptsBuilder ¶
UpdateOptsBuilder is the interface for update options.
type UpdateResult ¶
type UpdateResult struct {
// contains filtered or unexported fields
}
func Update ¶
func Update(ctx context.Context, c *gophercloud.ServiceClient, id string, opts UpdateOptsBuilder) (r UpdateResult)
Update a segment.
func (UpdateResult) ExtractInto ¶
Click to show internal directories.
Click to hide internal directories.