package router import "io" type RequestBuilder interface { Allowed(method string) (errRes ErrorResponse) Header(header Header) (errRes ErrorResponse) Body(body io.ReadCloser) (errRes ErrorResponse) Values(values Values) (errRes ErrorResponse) } type PrototypeRequestBuilder interface { RequestBuilder() (req RequestBuilder) } type Response interface { Header() (header Header) Bytes() (body []byte) } type PrototypeResponse interface { Response() (res Response) } type ErrorResponse interface { Ok() (ok bool) HttpStatus() (code int) Bytes() (body []byte) String() (out string) Error() (out string) } type PrototypeErrorResponse interface { ErrorResponse() (errRes ErrorResponse) } type Prototype struct { PrototypeRequestBuilder PrototypeResponse PrototypeErrorResponse }