dc

package
v2.14.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: Apache-2.0 Imports: 13 Imported by: 22

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeDatacentersReq

func DecodeDatacentersReq(c context.Context, r *http.Request) (interface{}, error)

DecodeDatacentersReq decodes HTTP request into DCsReq

func DecodeLegacyDcReq

func DecodeLegacyDcReq(c context.Context, r *http.Request) (interface{}, error)

DecodeLegacyDcReq decodes http request into LegacyDCReq

func GetDatacenter

func GetDatacenter(userInfo *provider.UserInfo, seedsGetter provider.SeedsGetter, datacenterToGet string) (apiv1.Datacenter, error)

GetDatacenter a function that gives you a single apiv1.Datacenter object

func GetEndpoint

func GetEndpoint(seedsGetter provider.SeedsGetter, userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

GetEndpoint an HTTP endpoint that returns a single apiv1.Datacenter object

func ListEndpoint

func ListEndpoint(seedsGetter provider.SeedsGetter, userInfoGetter provider.UserInfoGetter) endpoint.Endpoint

ListEndpoint an HTTP endpoint that returns a list of apiv1.Datacenter

Types

type DCsReq

type DCsReq struct{}

DCsReq represent a request for datacenters specific data

type LegacyDCReq

type LegacyDCReq struct {
	// in: path
	DC string `json:"dc"`
}

LegacyDCReq represent a request for datacenter specific data swagger:parameters getDatacenter

func (LegacyDCReq) GetDC

func (req LegacyDCReq) GetDC() string

GetDC returns the name of the datacenter in the request

Jump to

Keyboard shortcuts

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