origingroups

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2024 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateOpts

type CreateOpts struct {
	Name    string   `json:"name"`
	Origins []Origin `json:"origins"`
	UseNext bool     `json:"useNext"`
}

CreateOpts specifies attributes used to create a CDN origin group.

func (CreateOpts) Map

func (opts CreateOpts) Map() (map[string]interface{}, error)

Map builds a request body from a CreateOpts structure.

type CreateOptsBuilder

type CreateOptsBuilder interface {
	Map() (map[string]interface{}, error)
}

type CreateResult

type CreateResult struct {
	// contains filtered or unexported fields
}

CreateResult is the result of a create request. Call its Extract method to interpret a result as a OriginGroup.

func Create

func Create(client *gophercloud.ServiceClient, projectID string, opts CreateOptsBuilder) (r CreateResult)

Create implements an origin group create request.

func (CreateResult) Extract

func (r CreateResult) Extract() (*OriginGroup, error)

Extract interprets any origin group result as a OriginGroup, if possible.

type DeleteResult

type DeleteResult struct {
	gophercloud.ErrResult
}

DeleteResult is the result of a delete request. Call its ExtractErr method to determine if a request succeeded or failed.

func Delete

func Delete(client *gophercloud.ServiceClient, projectID string, id int) (r DeleteResult)

Delete implements an origin group delete request.

type GetResult

type GetResult struct {
	// contains filtered or unexported fields
}

GetResult is the result of a get request. Call its Extract method to interpret a result as a OriginGroup.

func Get

func Get(client *gophercloud.ServiceClient, projectID string, id int) (r GetResult)

Get returns information about an origin group, given its ID.

func (GetResult) Extract

func (r GetResult) Extract() (*OriginGroup, error)

Extract interprets any origin group result as a OriginGroup, if possible.

type ListResult

type ListResult struct {
	gophercloud.Result
}

ListResult is the result of a list request. Call its Extract method to interpret a result as a slice of OriginGroup.

func List

func List(client *gophercloud.ServiceClient, projectID string) (r ListResult)

List returns a list of origin groups in a project.

func (ListResult) Extract

func (r ListResult) Extract() ([]OriginGroup, error)

Extract interprets a ListResult as a slice of OriginGroup, if possible.

type Origin

type Origin struct {
	Backup  bool   `json:"backup"`
	Enabled bool   `json:"enabled"`
	Source  string `json:"source"`
}

Origin represents a CDN origin.

type OriginGroup

type OriginGroup struct {
	ID        int        `json:"id"`
	Name      string     `json:"name"`
	OriginIDs []OriginID `json:"origin_ids"`
	Origins   []Origin   `json:"origins"`
	UseNext   bool       `json:"useNext"`
}

OriginGroup represents a CDN origin group.

type OriginID

type OriginID struct {
	ID      int    `json:"id"`
	Backup  bool   `json:"backup"`
	Enabled bool   `json:"enabled"`
	Source  string `json:"source"`
}

type UpdateOpts

type UpdateOpts struct {
	Name    string   `json:"name"`
	Origins []Origin `json:"origins,omitempty"`
	UseNext bool     `json:"useNext"`
}

UpdateOpts specifies attributes used to update a CDN origin group.

func (UpdateOpts) Map

func (opts UpdateOpts) Map() (map[string]interface{}, error)

Map builds a request body from a UpdateOpts structure.

type UpdateOptsBuilder

type UpdateOptsBuilder interface {
	Map() (map[string]interface{}, error)
}

type UpdateResult

type UpdateResult struct {
	// contains filtered or unexported fields
}

UpdateResult is the result of an update request. Call its Extract method to interpret a result as a OriginGroup.

func Update

func Update(client *gophercloud.ServiceClient, projectID string, id int, opts UpdateOptsBuilder) (r UpdateResult)

Update implements an origin group update request.

func (UpdateResult) Extract

func (r UpdateResult) Extract() (*OriginGroup, error)

Extract interprets any origin group result as a OriginGroup, if possible.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL