namec

package module
v0.0.0-...-95ede0f Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2020 License: MIT Imports: 11 Imported by: 0

README

namec - ナメック星

vegeta に pipe で渡すリクエストを aws signature v4 で著名してくれるやつ

インストール

go get github.com/kzmake/namec/cmd/namec

使い方

jq -ncM '{method: "GET", url: "https://example.com/"}' \
    | namec -a $ACCESS_KEY_ID -s $SECRET_ACCESS_KEY -service サービスID -region リージョン名 \
    | vegeta attack -duration=5s -rate 10/s -format json > results.rqp10.bin

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AWSSignV4

func AWSSignV4(req *http.Request, accessKey, secretKey, service, region string) (http.Header, error)

AWSSignV4 ...

Types

type Request

type Request struct {
	Method string              `json:"method"`
	URL    string              `json:"url"`
	Body   string              `json:"body,omitempty"`
	Header map[string][]string `json:"header,omitempty"`
}

Request ...

func (Request) MarshalEasyJSON

func (v Request) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Request) MarshalJSON

func (v Request) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Request) UnmarshalEasyJSON

func (v *Request) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Request) UnmarshalJSON

func (v *Request) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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