capabilities

package
v0.1.4-0...-4d5b6ff Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Column2

func Column2(rows *sql.Rows, row int) [][]byte

func Column3

func Column3(rows *sql.Rows, row int) [][]byte

func HandleGet

func HandleGet(rows *sql.Rows, err error, closure func(*sql.Rows, int) [][]byte) ([][][]byte, myerror.Code)

handleGet used for Database get row

func HandleUpdate

func HandleUpdate(res sql.Result, err error) myerror.Code

func HttpRequest

func HttpRequest(addr string, req []byte) ([]byte, util.CurlCommand, postman.Item, error)

func HttpRequestRaw

func HttpRequestRaw(req http.Request) (Response, RequestReceivedInMock, error)

func IndexDbGet

func IndexDbGet(safeIndexDb *util.SafeIndexDb, binding string) ([]byte, error)

func IndexDbStore

func IndexDbStore(safeIndexDb *util.SafeIndexDb, binding string, req []byte) ([]byte, error)

func MemcacheDeleteKey

func MemcacheDeleteKey(addr string, req []byte) ([]byte, error)

func MemcacheExistKey

func MemcacheExistKey(addr string, req []byte, flag bool) ([]byte, error)

func MemcacheGetKey

func MemcacheGetKey(addr string, req []byte) ([]byte, error)

func MysqlStatement

func MysqlStatement(addr string, req []byte) ([]byte, error)

func RedisDeleteKey

func RedisDeleteKey(addr string, req []byte) ([]byte, error)

func RedisExistKey

func RedisExistKey(addr string, req []byte, flag bool) ([]byte, error)

func RedisGetKey

func RedisGetKey(addr string, req []byte) ([]byte, error)

func SaveFile

func SaveFile(payload []byte, filepath string)

func SeleniumClick

func SeleniumClick(wdElementMap *map[string]selenium.WebElement, uid string) ([]byte, error)

func SeleniumClose

func SeleniumClose(wdMap *map[string]selenium.WebDriver, wdServiceMap *map[string]*selenium.Service, wdElementMap *map[string]selenium.WebElement, uid string) ([]byte, error)

func SeleniumFindElement

func SeleniumFindElement(wdMap *map[string]selenium.WebDriver, wdElementMap *map[string]selenium.WebElement, uid string, selector []byte) ([]byte, error)

func SeleniumFindElements

func SeleniumFindElements(wdMap *map[string]selenium.WebDriver, wdElementMap *map[string]selenium.WebElement, uid string, index int, selector []byte) ([]byte, error)

func SeleniumGet

func SeleniumGet(wdMap *map[string]selenium.WebDriver, uid string, addr []byte) ([]byte, error)

func SeleniumGetCookies

func SeleniumGetCookies(wdMap *map[string]selenium.WebDriver, uid string) ([]byte, error)

func SeleniumSendKeys

func SeleniumSendKeys(wdElementMap *map[string]selenium.WebElement, uid string, text []byte) ([]byte, error)

func SeleniumStart

func SeleniumStart(wdMap *map[string]selenium.WebDriver, wdServiceMap *map[string]*selenium.Service, uid string) ([]byte, error)

func TcpNewReqDial

func TcpNewReqDial(payload []byte, binding string)

func TcpNewRes

func TcpNewRes(payload []byte, binding string, tcpNewWriteResChan map[string]chan TcpReq) (string, string, error)

Types

type Bytes

type Bytes []byte

func (*Bytes) Marshal

func (m *Bytes) Marshal() (dAtA []byte, err error)

func (*Bytes) Unmarshal

func (m *Bytes) Unmarshal(dAtA []byte) error

type Entity

type Entity struct {
	Id          string `json:"id"`
	Command     string `json:"command"`
	ResponseLen int64  `json:"response_len"`
}

type EntityWhole

type EntityWhole struct {
	Id          string
	Time        time.Time
	Command     string
	ResponseLen int64
	ReportType  string
	Payload     []byte
}

type FiddlerAB

type FiddlerAB struct {
	ResA    Response `json:"res_a"`
	ResB    Response `json:"res_b"`
	UrlPath string   `json:"url_path"`
}

type MysqlRequest

type MysqlRequest struct {
	Query       string `json:"query"`
	Execute     string `json:"execute"`
	QueryColumn string `json:query_column`
}

type MysqlResponse

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

type Request

type Request struct {
	Http1x   string `json:"http1x"`
	ProxyUrl string `json:"proxy_url"`
	HttpBody []byte `json:"http_body"`
}

type RequestForReport

type RequestForReport struct {
	Http1x   string `json:"http1x"`
	ProxyUrl string `json:"proxy_url"`
	HttpBody string `json:"http_body"`
}

type RequestReceivedInMock

type RequestReceivedInMock struct {
	HttpParam    map[string][]string    `json:"http_param"`
	HttpHeader   http.Header            `json:"http_header"`
	HttpCookie   map[string]string      `json:"http_cookie"`
	HttpBody     map[string]interface{} `json:"http_body"`
	HttpBodyRaw  string                 `json:"http_body_raw"`
	HttpProxyUrl string                 `json:"http_proxy_url"`
	HttpPath     string                 `json:"http_path"`
	HttpScheme   string                 `json:"http_scheme"`
	HttpMethod   string                 `json:"http_method"`
}

type Response

type Response struct {
	HttpHeader  http.Header            `json:"http_header"`
	HttpCookie  map[string]string      `json:"http_cookie"`
	HttpBody    map[string]interface{} `json:"http_body"`
	HttpBodyRaw string                 `json:"http_body_raw"`
	Error       string                 `json:"error"`
	StatusCode  string                 `json:"status_code"`
	HttpRequest RequestReceivedInMock  `json:"http_req"`
}

type TcpFiddlerAB

type TcpFiddlerAB struct {
	ResA []byte
	ResB []byte
}

type TcpItem

type TcpItem struct {
	Payload string
	String  string
	Id      string
	Laddr   string
	Raddr   string
}

type TcpReq

type TcpReq struct {
	Payload    string
	String     string
	Index      int
	Id         string
	Command    string
	ReportType string
	Timeout    bool
	Laddr      string
	Raddr      string
}

func TcpNewReq

func TcpNewReq(payload []byte, binding string, tcpNewWriteReqChan map[string]chan TcpReq, tcpNewWriteReqResponderChan map[string]chan TcpReq) (TcpReq, error)

type WsCallProtocol

type WsCallProtocol struct {
	Loop    string `json:"loop"`
	Fn      string `json:"fn"`
	Payload string `json:"payload"`
	Index   int64  `json:"index"`
	Binding string `json:"binding"`
	Message string `json:"message"`
	Targets string `json:"targets"`
}

type WsProtocol

type WsProtocol struct {
	Fn         string `json:"fn"`
	Payload    string `json:"payload"`
	CallerAddr string `json:"caller_addr"`
}

Jump to

Keyboard shortcuts

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