mock

package
v1.18.0-beta Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IPInfos []IPInfo
)

Functions

func RandomIpv4Int

func RandomIpv4Int() uint32

func RunMockCMDBServer

func RunMockCMDBServer(cnt int) (int, net.Listener)

Types

type IPInfo

type IPInfo struct {
	IP     string       `json:"ip"`
	Type   IPType       `json:"type"`
	Region LocationInfo `json:"region"`
	Zone   LocationInfo `json:"zone"`
	Campus LocationInfo `json:"campus"`
}

IPInfo ip info

type IPType

type IPType string

IPType ip type

const (
	Host    IPType = "host"
	Mask    IPType = "mask"
	Backoff IPType = "backoff"
)

type IPv4Int

type IPv4Int uint32

type LocationInfo

type LocationInfo struct {
	Name     string                 `json:"name"`
	Metadata map[string]interface{} `json:"metadata"`
}

LocationInfo

type Request

type Request struct {
	RequestID string `json:"request_id"`
	PageNo    int64  `json:"page_no"`
	PageSize  int64  `json:"page_size"`
}

Request request cmdb data

type Response

type Response struct {
	Total    int      `json:"total"`
	Size     int      `json:"size"`
	Code     int      `json:"code"`
	Info     string   `json:"info"`
	Priority string   `json:"priority"`
	Data     []IPInfo `json:"data"`
}

Response response cmdb data

Jump to

Keyboard shortcuts

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