core

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Float64

func Float64(val string) float64

Float64 is used to convert a string to float64

func Match

func Match(operandX string, operator string, operandY string) (bool, error)

Match is used to perform the operation of operator (operandX, operandY)

func Render

func Render(ctx *Context, path string) string

Render is used to render variables based on context

func RenderWithFaker

func RenderWithFaker(ctx *Context, path string) string

RenderWithRequest is used to render $mock... variable

func RenderWithRequest

func RenderWithRequest(ctx *Context, path string) string

RenderWithRequest is used to render $request... variable

func SplitWithFirstSegment

func SplitWithFirstSegment(s string, split string) (string, string)

SplitWithFirstSegment is used to extract the first segment of s divided by split

Types

type Context

type Context struct {
	Request *interact.Request `json:"request"`
}

Context defines the context

func NewContext

func NewContext(request *interact.Request) *Context

NewContext is used to create context

Jump to

Keyboard shortcuts

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