mockaviserver

package
v0.0.0-...-c7431a4 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RandomUUID              = "random-uuid"
	InvalidObjectNameSuffix = "does-not-exist"
)

Variables

View Source
var (
	AviMockAPIServer *httptest.Server

	CustomServerMiddleware InjectFault
	PostGSMiddleware       InjectFaultWithData
	PostHMMiddleware       InjectFaultWithData
	PutMiddleware          InjectFaultWithData
	GetMiddleware          InjectFault
	DeleteMiddleware       InjectFault
)

Functions

func AddMiddleware

func AddMiddleware(exec InjectFault)

func BuildHealthMonitorRef

func BuildHealthMonitorRef(hmRefs []interface{}) []interface{}

func DefaultServerMiddleware

func DefaultServerMiddleware(w http.ResponseWriter, r *http.Request)

func FeedMockCloudData

func FeedMockCloudData(w http.ResponseWriter, r *http.Request)

func FeedMockClusterData

func FeedMockClusterData(w http.ResponseWriter, r *http.Request)

func FeedMockGSData

func FeedMockGSData(w http.ResponseWriter, r *http.Request)

func FeedMockGslbData

func FeedMockGslbData(w http.ResponseWriter, r *http.Request)

func FeedMockHMData

func FeedMockHMData(w http.ResponseWriter, r *http.Request)

func FeedMockPersistenceData

func FeedMockPersistenceData(w http.ResponseWriter, r *http.Request)

func FeedMockPkiProfileData

func FeedMockPkiProfileData(w http.ResponseWriter, r *http.Request)

func GetMockFilePath

func GetMockFilePath(mockFileName string) string

func GetMockServerURL

func GetMockServerURL() string

func NewAviMockAPIServer

func NewAviMockAPIServer()

func ResetMiddleware

func ResetMiddleware()

func SendResponseForObjects

func SendResponseForObjects(objects []string, w http.ResponseWriter, r *http.Request)

Types

type InjectFault

type InjectFault func(w http.ResponseWriter, r *http.Request) bool

type InjectFaultWithData

type InjectFaultWithData func(data []byte, w http.ResponseWriter) bool

Jump to

Keyboard shortcuts

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