 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Overview ¶
Package restapi provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen DO NOT EDIT.
Package restapi provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen DO NOT EDIT.
Index ¶
- func GetSwagger() (*openapi3.Swagger, error)
- func RegisterHandlers(router EchoRouter, si ServerInterface)
- func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
- type EchoRouter
- type ErrorResponse
- type FlagCheckBody
- type FlagCheckResponse
- type GetFlagValueJSONBody
- type GetFlagValueJSONRequestBody
- type PongResponse
- type ServerInterface
- type ServerInterfaceWrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSwagger ¶
GetSwagger returns the Swagger specification corresponding to the generated code in this file.
func RegisterHandlers ¶
func RegisterHandlers(router EchoRouter, si ServerInterface)
RegisterHandlers adds each server route to the EchoRouter.
func RegisterHandlersWithBaseURL ¶
func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
Registers handlers, and prepends BaseURL to the paths, so that the paths can be served under a prefix.
Types ¶
type EchoRouter ¶
type EchoRouter interface {
	CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
}
    This is a simple interface which specifies echo.Route addition functions which are present on both echo.Echo and echo.Group, since we want to allow using either of them for path registration
type ErrorResponse ¶
type ErrorResponse struct {
	ErrorMessage string `json:"error_message"`
}
    Error Status for wrapper
type FlagCheckBody ¶
type FlagCheckBody struct {
	FlagKey  string `json:"flag_key"`
	FlagKind string `json:"flag_kind"`
	Target   *struct {
		Attributes *struct {
			Email    *string `json:"email,omitempty"`
			Region   *string `json:"region,omitempty"`
			Username *string `json:"username,omitempty"`
		} `json:"attributes,omitempty"`
		TargetIdentifier *string `json:"target_identifier,omitempty"`
		TargetName       *string `json:"target_name,omitempty"`
	} `json:"target,omitempty"`
}
    Request to check flag in SDK
type FlagCheckResponse ¶
type FlagCheckResponse struct {
	FlagKey   string `json:"flag_key"`
	FlagValue string `json:"flag_value"`
}
    Response to flag check in SDK
type GetFlagValueJSONBody ¶
type GetFlagValueJSONBody FlagCheckBody
GetFlagValueJSONBody defines parameters for GetFlagValue.
type GetFlagValueJSONRequestBody ¶
type GetFlagValueJSONRequestBody GetFlagValueJSONBody
GetFlagValueJSONRequestBody defines body for GetFlagValue for application/json ContentType.
type ServerInterface ¶
type ServerInterface interface {
	// Check the value of a flag
	// (POST /check_flag)
	GetFlagValue(ctx echo.Context) error
	// Check the system is up
	// (GET /ping)
	Ping(ctx echo.Context) error
}
    ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
	Handler ServerInterface
}
    ServerInterfaceWrapper converts echo contexts to parameters.
func (*ServerInterfaceWrapper) GetFlagValue ¶
func (w *ServerInterfaceWrapper) GetFlagValue(ctx echo.Context) error
GetFlagValue converts echo context to params.
func (*ServerInterfaceWrapper) Ping ¶
func (w *ServerInterfaceWrapper) Ping(ctx echo.Context) error
Ping converts echo context to params.