Documentation ¶
Index ¶
- func AgentInfo(w http.ResponseWriter, r *http.Request)
- func IsSupportedOrigin(origin string) bool
- func Ping(w http.ResponseWriter, _ *http.Request)
- func RegisterDatatugHandlers(pathPrefix string, router *httprouter.Router, mode RegisterMode, wrap wrapper, ...)
- type ErrorResponse
- type Handler
- type ProjectAgentEndpoints
- type ProjectEndpoints
- type RegisterMode
- type VerifyRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AgentInfo ¶
func AgentInfo(w http.ResponseWriter, r *http.Request)
AgentInfo returns version of the agent
func IsSupportedOrigin ¶
IsSupportedOrigin check provided origin is allowed
func RegisterDatatugHandlers ¶
func RegisterDatatugHandlers( pathPrefix string, router *httprouter.Router, mode RegisterMode, wrap wrapper, contextProvider func(r *http.Request) (context.Context, error), handler Handler, )
RegisterDatatugHandlers registers datatug HTTP handlers
Types ¶
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error"`
}
ErrorResponse defines format of error response body
type Handler ¶
type Handler = func( w http.ResponseWriter, r *http.Request, requestDTO apicore.RequestDTO, verifyOptions verify.RequestOptions, successStatusCode int, getContext apicore.ContextProvider, handler apicore.Worker, )
Handler is responsible for creating context and call `handler()` func that should use provided context along with `requestDTO` that was populated from request body Its is exposed publicly so it can be replaced with custom implementation
type ProjectAgentEndpoints ¶
type ProjectAgentEndpoints struct { }
ProjectAgentEndpoints defines project endpoints
type ProjectEndpoints ¶
type ProjectEndpoints interface { CreateProject(w http.ResponseWriter, r *http.Request) DeleteProject(w http.ResponseWriter, r *http.Request) }
ProjectEndpoints defines project endpoints
type RegisterMode ¶
type RegisterMode = int
const ( RegisterWriteOnlyHandlers RegisterMode = iota RegisterAllHandlers )
type VerifyRequest ¶
VerifyRequest implements VerifyRequestOptions
func (VerifyRequest) AuthenticationRequired ¶
func (v VerifyRequest) AuthenticationRequired() bool
AuthenticationRequired specifies if authentication is mandatory
func (VerifyRequest) MaximumContentLength ¶
func (v VerifyRequest) MaximumContentLength() int64
MaximumContentLength defines max content length, if < 0 no limit
func (VerifyRequest) MinimumContentLength ¶
func (v VerifyRequest) MinimumContentLength() int64
MinimumContentLength defines min content length
Source Files ¶
- 0_interface.go
- agent_info_endpoint.go
- board_endpoints.go
- common.go
- constants.go
- dbserver_databases.go
- dbservers_endpoints.go
- entity_endpoints.go
- environment_endpoints.go
- execute_endpoints.go
- folder_endpoints.go
- ping_pong.go
- project_endpoints.go
- project_full.go
- projects.go
- query_endpoints.go
- recordsets_endpoints.go
- register.go
- routes.go
- util_error_handling.go
- util_json.go
- validators.go