Versions in this module Expand all Collapse all v0 v0.2.0 Feb 14, 2018 Changes in this version type TestCase + AssertFunc assertFunc + func NewTestCase(target string, expected interface{}, description string) TestCase v0.1.0 May 31, 2017 Changes in this version + const EnvHTTPDoc + func Asset(name string) ([]byte, error) + func AssetDir(name string) ([]string, error) + func AssetInfo(name string) (os.FileInfo, error) + func AssetNames() []string + func MustAsset(name string) []byte + func Record(next http.Handler, document *Document, opt *RecordOption) http.Handler + func RestoreAsset(dir, name string) error + func RestoreAssets(dir, name string) error + type Data struct + Description string + Name string + Value interface{} + type Document struct + Entries []Entry + ExcludeHeaders []string + Name string + func (d *Document) Generate(path string) error + type Entry struct + Description string + Method string + Path string + RequestExample string + RequestFields []Data + RequestHeaders []Data + RequestParams []Data + ResponseExample string + ResponseFields []Data + ResponseHeaders []Data + ResponseStatusCode int + type ProtoBufferOption struct + RequestUnmarshaler proto.Unmarshaler + ResponseUnmarshaler proto.Unmarshaler + type RecordOption struct + Description string + ExcludeHeaders []string + WithProtoBuffer *ProtoBufferOption + WithValidate func(*Validator) + type TestCase struct + Description string + Expected interface{} + Target string + type Validator struct + func (v *Validator) RequestBody(t *testing.T, cases []TestCase, request interface{}) + func (v *Validator) RequestHeaders(t *testing.T, cases []TestCase) + func (v *Validator) RequestParams(t *testing.T, cases []TestCase) + func (v *Validator) ResponseBody(t *testing.T, cases []TestCase, response interface{}) + func (v *Validator) ResponseHeaders(t *testing.T, cases []TestCase) + func (v *Validator) ResponseStatusCode(t *testing.T, expected int)