utils

package
v0.0.0-...-fe055a6 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UpstreamAddr         = "http://172.17.0.1:7024"
	UpstreamAddr2        = "http://172.17.0.1:7025"
	UpstreamAddr7026     = "http://172.17.0.1:7026"
	ApisixConfigYamlPath = "../../repos/apisix-docker/example/apisix_conf/config.yaml"

	KongAdminAddress   = "http://127.0.0.1:8001"
	KongAdminRouteURI  = "/routes"
	TestKongDeckMode   = "kong/deck"
	TestKongConfigMode = "kong/config"
)

Functions

func Compare

func Compare(c *CompareCase)

do compare here

func CreateRoute

func CreateRoute(route kong.Route) (bool, error)

func DefaultConsumer

func DefaultConsumer() *gokong.ConsumerRequest

func DefaultRoute

func DefaultRoute() *gokong.RouteRequest

func DefaultService

func DefaultService() *gokong.ServiceRequest

func DefaultTarget

func DefaultTarget() *gokong.TargetRequest

func DefaultUpstream

func DefaultUpstream() *gokong.UpstreamRequest

func GetBodys

func GetBodys(c *CompareCase) (string, string)

func GetKongConfigExportData

func GetKongConfigExportData() ([]byte, error)

func GetKongDeckExportData

func GetKongDeckExportData() ([]byte, error)

func GetResps

func GetResps(c *CompareCase) (*http.Response, *http.Response)

func PurgeAll

func PurgeAll(kongCli gokong.KongAdminClient) error

func TestMigrate

func TestMigrate(mode string) error

Types

type CompareCase

type CompareCase struct {
	Path              string
	Url               string
	Headers           map[string]string
	CompareBody       bool
	CompareStatusCode int
}

type TestCase

type TestCase struct {
	RouteRequest   *gokong.RouteRequest
	ServiceRequest *gokong.ServiceRequest
}

Jump to

Keyboard shortcuts

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