Documentation
¶
Overview ¶
Package blueprint provides a set of interfaces for developing Go applications with clean framework design in mind. The package blueprint is a "kit" of common framework abstractions. At github.com/blueprint you can also find some implimentations for these interfaces. You are always invited to write your own implimentations, or plugins for external libraries.
Package render writes HTTP responses in different formats.
Index ¶
- func JSON(w http.ResponseWriter, code int, pretty bool, v interface{}) (int, error)
- func JSONP(w http.ResponseWriter, code int, pretty bool, callback string, v interface{}) (int, error)
- func XML(w http.ResponseWriter, code int, pretty bool, v interface{}) (int, error)
- func YML(w http.ResponseWriter, code int, v interface{}) (int, error)
- type Database
- type Model
- type Serializer
- type SerializerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSONP ¶
func JSONP(w http.ResponseWriter, code int, pretty bool, callback string, v interface{}) (int, error)
JSONP wraps a callback function around an object and writes the result to a http.ResponseWriter as JSONP.
Types ¶
type Model ¶
type Model interface { New() Model PathID() string SetID(id string) error FindAll() ([]Model, error) FindByID(id string) error FindAllByOwner(owner Model) ([]Model, error) BelongsTo(owner Model) error Save() error Delete() error Validate() error }
Model represents a data model used by resource controllers to automate RESTful CRUD operations.
Directories
¶
Path | Synopsis |
---|---|
Package bootstrap bootstraps configuration, databases, and servers.
|
Package bootstrap bootstraps configuration, databases, and servers. |
Package dba is an singleton that manages databases as would a Database Administrator.
|
Package dba is an singleton that manages databases as would a Database Administrator. |
examples
|
|
swagger
@APIVersion 1.0.0 @APITitle Gophersaurus Example Swagger API @APIDescription This API is an example to demonstrate Swagger capabilities.
|
@APIVersion 1.0.0 @APITitle Gophersaurus Example Swagger API @APIDescription This API is an example to demonstrate Swagger capabilities. |
Package middleware provides out-of-the-box options for middlware.
|
Package middleware provides out-of-the-box options for middlware. |
Package mock contains useful convenience methods to mock objects for testing.
|
Package mock contains useful convenience methods to mock objects for testing. |
Package resource automates CRUD via resource controllers.
|
Package resource automates CRUD via resource controllers. |
router
|
|
swagger
Package docs generates endpoint documentation.
|
Package docs generates endpoint documentation. |
Click to show internal directories.
Click to hide internal directories.