internal

package
v0.0.0-...-f30af28 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Json     bodyType = "json"
	FormData bodyType = "form-data"
	Form     bodyType = "form"
	Raw      bodyType = "raw"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Body

type Body struct {
	Type bodyType    `json:"type"`
	Data interface{} `json:"data"`
}

type CertConfig

type CertConfig struct {
	InsecureSkipVerify bool   `json:"insecureSkipVerify" yaml:"insecureSkipVerify"`
	ClientCertFile     string `json:"clientCertFile" yaml:"clientCertFile"`
}

type Counter

type Counter struct {
	TotalCount   int
	SucceedCount int
	FailedCount  int
}

func (Counter) String

func (c Counter) String() string

type EnvConfig

type EnvConfig struct {
	Namespace string            `json:"namespace" yaml:"namespace"`
	Env       map[string]string `json:"env" yaml:"env"`
}

type FormDataBody

type FormDataBody struct {
	Type     string `json:"type"`
	Name     string `json:"name"`
	Value    string `json:"value"`
	Filename string `json:"filename"`
	FilePath string `json:"filePath"`
	Content  string `json:"content"`
}

type LikConfig

type LikConfig struct {
	Env      []EnvConfig       `json:"env" yaml:"env"`
	Config   []NamespaceConfig `json:"config" yaml:"config"`
	Request  RequestConfig     `json:"request" yaml:"request"`
	Response ResponseConfig    `json:"response" yaml:"response"`
}

type NamespaceConfig

type NamespaceConfig struct {
	Namespace string         `json:"namespace" yaml:"namespace"`
	Request   RequestConfig  `json:"request" yaml:"request"`
	Response  ResponseConfig `json:"response" yaml:"response"`
}

type Request

type Request struct {
	Namespace string `json:"namespace" yaml:"namespace"`
	Name      string `json:"name" yaml:"name"`
	Method    string `json:"method" yaml:"method"`
	Url       string `json:"url" yaml:"url"`
	// Username basic header username
	Username string `json:"username" yaml:"username"`
	// Password basic header password
	Password      string      `json:"password" yaml:"password"`
	Repeat        int         `json:"repeat" yaml:"repeat"`
	Headers       http.Header `json:"headers" yaml:"headers"`
	Queries       url.Values  `json:"queries" yaml:"queries"`
	Body          Body        `json:"body" yaml:"body"`
	Timeout       string      `json:"timeout" yaml:"timeout"`
	Skip          bool        `json:"skip" yaml:"skip"`
	ExitOnFailure bool        `json:"exitOnFailure" yaml:"exitOnFailure"`
	Response      response    `json:"response" yaml:"response"`
	CertConfig    `json:"inline" yaml:"inline"`
	// contains filtered or unexported fields
}

func (*Request) Clone

func (r *Request) Clone() *Request

func (*Request) Do

func (r *Request) Do(likConfig *LikConfig, out io.Writer) error

func (*Request) ShouldRequest

func (r *Request) ShouldRequest(ns, name string) bool

type RequestConfig

type RequestConfig struct {
	Timeout string `json:"timeout" yaml:"timeout"`
}

type RequestManager

type RequestManager struct {
	// contains filtered or unexported fields
}

RequestManager request manager

func NewRequestManager

func NewRequestManager(namespace, requestName string, config *LikConfig, requests []*Request, output io.Writer) *RequestManager

func (*RequestManager) Run

func (r *RequestManager) Run() error

type ResponseConfig

type ResponseConfig struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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