parsers

package
v0.0.0-...-2cd20ca Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchOpenAPI

func FetchOpenAPI(url string) libopenapi.Document

Types

type Api

type Api struct {
	BaseUrl string
	Paths   []Path
	Config  Config
}

func ParseGCloudSLOs

func ParseGCloudSLOs(projectId string, serviceId string, serviceUrl string, docsUrl string) Api

func ParseOpenAPI

func ParseOpenAPI(document libopenapi.Document) Api

type Config

type Config struct {
	Users    *int
	Duration *int
	Stages   []Stage
}

type Examples

type Examples struct {
	Path *map[string]any
}

type Metric

type Metric string

func (Metric) IsK6Supported

func (metric Metric) IsK6Supported() bool

type ParamDescription

type ParamDescription struct {
	Example any
	Pattern *string
}

type Params

type Params struct {
	Path  map[string]ParamDescription
	Query map[string]ParamDescription
}

type Path

type Path struct {
	Method   string
	Pathname string
	Detail   PathDetail
}

type PathDetail

type PathDetail struct {
	Latency      []Metric
	ErrorRate    []Metric
	ResponseSize []Metric
	Params       Params
}

type RangeDescription

type RangeDescription struct {
	Min  int
	Max  int
	Step int
}

type Stage

type Stage struct {
	Duration string
	Target   int
}

Jump to

Keyboard shortcuts

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