Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct { BaseURL string Client *Client Resources map[string]*RestResource DefaultRouter *CBRouter }
func (*API) AddResource ¶
func (a *API) AddResource(name string, resource *RestResource)
func (*API) ListResources ¶
type CBRouter ¶
type CBRouter struct { Routers map[int]RouterFunc DefaultRouter RouterFunc }
func (*CBRouter) AddFunc ¶
func (r *CBRouter) AddFunc(status int, handler RouterFunc)
type Client ¶
func (*Client) ProcessRequest ¶
type RestResource ¶
func NewRestResource ¶
func NewRestResource(method, endpoint string, router *CBRouter) *RestResource
func (*RestResource) RenderEndpoint ¶
func (r *RestResource) RenderEndpoint(params map[string]string) string
type RouterFunc ¶
Click to show internal directories.
Click to hide internal directories.