model

package
v0.0.4-alpha Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BodyVariable

type BodyVariable struct {
	VariableParams
	Path string `json:"json_path"`
	Func string `json:"func"`
}

type Mock

type Mock struct {
	Method          string   `json:"method"`
	Endpoint        string   `json:"endpoint"`
	Request         Request  `json:"request"`
	DefaultResponse bool     `json:"default_response"`
	Response        Response `json:"response"`
}

type QueryParameter

type QueryParameter struct {
	Key        string         `json:"key"`
	Value      string         `json:"value"`
	Validation *QueryVariable `json:"validation"`
}

type QueryVariable

type QueryVariable struct {
	VariableParams
	Func string `json:"func"`
}

type Request

type Request struct {
	Body            any              `json:"body"`
	QueryParameters []QueryParameter `json:"query_parameters"`
	Validations     []BodyVariable   `json:"body_validations"`
}

type Response

type Response struct {
	StatusCode   int            `json:"status_code"`
	Body         any            `json:"body"`
	Replacements []BodyVariable `json:"body_replacements"`
}

type VariableParams

type VariableParams struct {
	Args   []string `json:"args"`
	Prefix string   `json:"prefix"`
	Suffix string   `json:"suffix"`
}

Jump to

Keyboard shortcuts

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