routermock

package
v0.0.0-...-7f5b3d9 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

func List() map[string]RouterMock

List 获取路由mock配置

func Update

func Update(configs []string)

更新router config配置

Types

type RouterMock

type RouterMock struct {
	Router     string `json:"router"`
	Route      string `json:"route"`
	Method     string `json:"method"`
	Status     int    `json:"status"`
	CotentType string `json:"cotentType"`
	Response   string `json:"response"`
	// DelaySeconds 延时,单位秒
	DelaySeconds int    `json:"delaySeconds"`
	URL          string `json:"url"`
}

RouterMock 路由配置信息

func Get

func Get(method, route string) *RouterMock

Get 获取路由配置

Jump to

Keyboard shortcuts

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