Documentation
¶
Index ¶
- func APIData(w http.ResponseWriter, v interface{}, status int)
- func APIError(w http.ResponseWriter, e error, status int)
- func APIParseBlueprintHandler(c *gin.Context)
- func APIRootHandler(c *gin.Context)
- func ParseBlueprintHandler(w http.ResponseWriter, r *http.Request)
- func Run()
- func Watch(period int)
- type BlueprintResource
- func (s BlueprintResource) Create(obj interface{}, r api2go.Request) (api2go.Responder, error)
- func (s BlueprintResource) Delete(id string, r api2go.Request) (api2go.Responder, error)
- func (s BlueprintResource) FindAll(r api2go.Request) (api2go.Responder, error)
- func (s BlueprintResource) FindOne(id string, r api2go.Request) (api2go.Responder, error)
- func (s BlueprintResource) Update(obj interface{}, r api2go.Request) (api2go.Responder, error)
- type BlueprintYAML
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIData ¶
func APIData(w http.ResponseWriter, v interface{}, status int)
APIData writes JSONAPI compatible structure
func APIError ¶
func APIError(w http.ResponseWriter, e error, status int)
APIError writes JSONAPI compatible structure
func APIParseBlueprintHandler ¶
APIParseBlueprintHandler creates and stores a blueprint
func APIRootHandler ¶
APIRootHandler returns the API description
func ParseBlueprintHandler ¶
func ParseBlueprintHandler(w http.ResponseWriter, r *http.Request)
ParseBlueprintHandler creates and stores a blueprint
Types ¶
type BlueprintResource ¶
type BlueprintResource struct{}
BlueprintResource represents `api2go.CRUD` interface
type BlueprintYAML ¶
type BlueprintYAML struct {
Data string `json:"data"`
}
BlueprintYAML represents form data
func (BlueprintYAML) GetName ¶
func (BlueprintYAML) GetName() string
GetName implements jsonapi interface
func (*BlueprintYAML) SetID ¶
func (*BlueprintYAML) SetID(string) error
SetID implements jsonapi interface
Click to show internal directories.
Click to hide internal directories.