Documentation ¶
Index ¶
- func Execute(y ...func()) error
- func InitConfig() error
- func ReadConfig(y ...func())
- func ReadYamlFile(file string, j interface{}, replacor ...func(b []byte) []byte) error
- func Write(marshal Marshal, outpath string, content interface{}) error
- func WriteAuto(outpath string, content interface{}) error
- type ApiConfig
- type AuthConfig
- type Config
- type DynamicAuth
- type DynamicRequest
- type ImpersionationCredentials
- type Marshal
- type Output
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitConfig ¶
func InitConfig() error
func ReadConfig ¶
func ReadConfig(y ...func())
func ReadYamlFile ¶
Types ¶
type ApiConfig ¶ added in v0.4.1
type ApiConfig struct { Address string `cfg:"address" default:"0.0.0.0" description:"Address (interface) to listen to)"` RedirectPort int `` /* 142-byte string literal not displayed */ Port int `cfg:"port" default:"80" description:"Port to listen to"` CertFile string `cfg:"cert-file" default:"" description:"Number of request to make total"` CertKey string `cfg:"cert-key" default:"" description:"Number of request to make total"` DBLocation string `cfg:"db-path" default:"./storage/db.bbolt" description:"Filepath to where to store the database"` }
type AuthConfig ¶
type Config ¶
type Config struct { Auth AuthConfig `cfg:"-"` Url string `cfg:"url" description:"The url to make requests to"` NoTokenValidation bool `cfg:"no-token-validation" description:"If set, will skip validation of token"` PrintTable bool `cfg:"print-table" description:"If set, will print table while running"` AuthToken string `cfg:"auth-token" description:"Set to use a token"` OperationName string `cfg:"operation-name" description:"For Graphql, you may set an operation-name"` Body interface{} `cfg:"data" short:"d" description:"Data to include in requests."` Header map[string]string `cfg:"header" short:"H" description:"Additional headers to include"` Method string `cfg:"method" short:"X" description:"Http-method"` Query string `cfg:"query" description:"For Graphql, you may set a query"` Variables map[string]interface{} `cfg:"variables" description:"For Graphql, you may add variables"` LogLevel string `cfg:"log-level" default:"info" description:"Log-level to use. Can be trace,debug,info,warn(ing),error or panic"` LogFormat string `cfg:"log-format" default:"human" description:"Format of the logs. Can be human or json"` Output string `cfg:"output" description:"File to output results to"` OkStatusCodes []int `` /* 142-byte string literal not displayed */ ResponseData bool `cfg:"response-data" description:"Set to include response-data in output"` Mock bool `cfg:"mock" description:"Enable to mock the requests."` Concurrency int `cfg:"concurrency" description:"Amount of concurrent requests." default:"100" short:"c"` RequestCount int `cfg:"request-count" default:"200" description:"Number of request to make total" short:"n"` Api ApiConfig `cfg:"api" description:"Used with the api-server"` }
type DynamicAuth ¶
type DynamicAuth struct {
Requests []DynamicRequest
}
type DynamicRequest ¶
type Output ¶
type Output struct { Url string `json:"url,omitempty"` Query queries.Request `json:"query,omitempty"` Details map[requests.ErrorType][]requests.CompactStat `json:"details,omitempty"` JwtPayload map[string]interface{} `json:"jwt_payload,omitempty"` Count map[requests.ErrorType]int `json:"count,omitempty"` Stats map[requests.ErrorType]requests.Stats `json:"stats,omitempty"` AllRequests map[requests.ErrorType][]queries.RequestStat `json:"-"` ResponseHashMap requests.ByteHashMap `json:"responseHashMap,omitempty"` // contains filtered or unexported fields }
func (*Output) CalculateStats ¶
func (o *Output) CalculateStats()
func (*Output) PrintTable ¶
func (out *Output) PrintTable()
Click to show internal directories.
Click to hide internal directories.