Documentation
¶
Overview ¶
========================================================================= Copyright © 2019 AppsByRam authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. =========================================================================
========================================================================= Copyright © 2019 AppsByRam authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. =========================================================================
========================================================================= Copyright © 2019 AppsByRam authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. =========================================================================
========================================================================= Copyright © 2019 AppsByRam authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. =========================================================================
Index ¶
Constants ¶
const ( //ContentTypeJSON represents JSON content type ContentTypeJSON = "application/json; charset=UTF-8" //ContentTypeXML represents XML content type ContentTypeXML = "application/xml; charset=UTF-8" //ContentTypeYaml represents yaml ContentTypeYaml = "application/x-yaml" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HealthReport ¶ added in v0.0.4
type HealthReport struct {
Status string `json:"status" yaml:"status"`
}
HealthReport represents a health report
type Payload ¶
type Payload interface { RequestReader ResponseReadWriter }
Payload represents an generic interface to read and write data from http
type RequestReader ¶
type RequestReader interface {
ReadRequest(contentType string, data interface{}, r *http.Request) error
}
RequestReader request reader
type ResponseReadWriter ¶
type ResponseReadWriter interface { WriteResponse(contentType string, status int, data interface{}, w http.ResponseWriter) ReadResponse(contentType string, data interface{}, response *http.Response) error }
ResponseReadWriter response read writer
type Route ¶
type Route struct { Name string Method string Pattern string HandlerFunc http.HandlerFunc }
Route defines an http route