Documentation ¶
Index ¶
- Constants
- func CommaJoinStrs(args ...interface{}) string
- func IndentJSONBody(args ...interface{}) string
- type APIDescription
- type APIDoc
- func (doc *APIDoc) RecordRequest(r *http.Request) (err error)
- func (doc *APIDoc) RecordResponse(r *http.Request, handler http.Handler) (resp *httptest.ResponseRecorder, err error)
- func (doc *APIDoc) WriteBody(jsonBody string) (err error)
- func (doc *APIDoc) WriteDescription() (err error)
- func (doc *APIDoc) WriteGroup(group TestGroup) (err error)
- func (doc *APIDoc) WriteHeaders(headers map[string][]string) (err error)
- func (doc *APIDoc) WriteRequestTitle(description string) (err error)
- func (doc *APIDoc) WriteResponseTitle(code int, contentType string) (err error)
- type BaseURISet
- type Group
- type PropertySet
- type RequestProperties
- type ResponseProperties
- type TestGroup
- type Title
Constants ¶
View Source
const ( RequestKind = "Request" ResponseKind = "Response" )
View Source
const APIBlueprintFormat = "1A"
Variables ¶
This section is empty.
Functions ¶
func CommaJoinStrs ¶
func CommaJoinStrs(args ...interface{}) string
func IndentJSONBody ¶
func IndentJSONBody(args ...interface{}) string
Types ¶
type APIDescription ¶
type APIDoc ¶
type APIDoc struct {
// contains filtered or unexported fields
}
func NewAPIDoc ¶
func NewAPIDoc(filePath string, desc *APIDescription) *APIDoc
func (*APIDoc) RecordResponse ¶
func (*APIDoc) WriteDescription ¶
func (*APIDoc) WriteGroup ¶
func (*APIDoc) WriteHeaders ¶
func (*APIDoc) WriteRequestTitle ¶
type BaseURISet ¶
type Group ¶
func (*Group) GetDescription ¶
type PropertySet ¶
type PropertySet interface {
List() string
}
type RequestProperties ¶
type RequestProperties struct {
Description string
}
func (*RequestProperties) List ¶
func (p *RequestProperties) List() string
type ResponseProperties ¶
func (*ResponseProperties) List ¶
func (p *ResponseProperties) List() string
type Title ¶
type Title struct { Kind string Properties PropertySet }
Click to show internal directories.
Click to hide internal directories.