Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyHeader ¶
Types ¶
type Action ¶
type Action struct { Title string Description string Method HTTPMethod Requests []*Request }
func (*Action) AddRequest ¶
type Doc ¶
type Doc struct { Group ResourceGroup // contains filtered or unexported fields }
func (*Doc) AddResource ¶
TODO: add Resource to appropriate ResourceGroup,
not just to ResourceGroups[0]
type HTTPMethod ¶
type HTTPMethod string
type JSONRPCRequest ¶
type JSONRPCRequest struct { JsonRpc string `json:"jsonrpc"` ID uint32 `json:"id"` Method string `json:"method"` Params json.RawMessage `json:"params"` }
Helper for jsonrpc calls
type Parameter ¶
type Parameter struct { Name string Description string Value ParameterValue Type ParameterType IsRequired bool }
func MakeParameter ¶
type ParameterType ¶
type ParameterType int
const ( Number ParameterType = iota String Boolean )
func (ParameterType) String ¶
func (pt ParameterType) String() string
type ParameterValue ¶
type ParameterValue string
func (ParameterValue) Quote ¶
func (val ParameterValue) Quote() (qval string)
type Request ¶
func (*Request) HasContentType ¶
type Resource ¶
type Resource struct { Title string Description string //Model *Model URL *URL Actions map[HTTPMethod]*Action }
func (*Resource) FindAction ¶
type ResourceGroup ¶
func (*ResourceGroup) Render ¶
func (rg *ResourceGroup) Render() string
type Response ¶
func NewResponse ¶
func NewResponse(resp *httptest.ResponseRecorder) *Response
func (*Response) HasContentType ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.