fake

package
v0.0.0-...-976d991 Latest Latest
Warning

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

Go to latest
Published: May 26, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorResponse

func ErrorResponse(cmd, msg string) []byte

func MarshalResponse

func MarshalResponse(name string, obj interface{}) []byte

Types

type CloudstackServer

type CloudstackServer struct {
	*httptest.Server
	Calls []MockAPICall
	Hook  func(w http.ResponseWriter, r *http.Request) bool

	Jobs map[string]func() interface{}
	// contains filtered or unexported fields
}

func NewCloudstackServer

func NewCloudstackServer() *CloudstackServer

func (*CloudstackServer) AddIP

func (*CloudstackServer) AddLBRule

func (s *CloudstackServer) AddLBRule(lbName string, lbRule LoadBalancerRule)

func (*CloudstackServer) AddTags

func (s *CloudstackServer) AddTags(resourceid string, tags []cloudstack.Tags)

func (*CloudstackServer) DeleteTags

func (s *CloudstackServer) DeleteTags(resourceid string, tagKeys []string)

func (*CloudstackServer) HasCalls

func (s *CloudstackServer) HasCalls(t *testing.T, calls []MockAPICall)

func (*CloudstackServer) ServeHTTP

func (s *CloudstackServer) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*CloudstackServer) SetDefaultLBPoolCreation

func (s *CloudstackServer) SetDefaultLBPoolCreation(lbId string)

type LoadBalancerRule

type LoadBalancerRule struct {
	Rule  map[string]interface{}
	Pools []globoNetworkPool
	// contains filtered or unexported fields
}

type MockAPICall

type MockAPICall struct {
	Command string
	Params  url.Values
}

type UpdateGloboNetworkPoolResponse

type UpdateGloboNetworkPoolResponse struct {
	JobID string `json:"jobid"`
}

Jump to

Keyboard shortcuts

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