Documentation ¶
Index ¶
- Constants
- Variables
- func CORSHelper(request Request, response Response)
- type DefaultCORSHandler
- type DefaultEmptyHandler
- type DefaultHandler
- func (d *DefaultHandler) GetParam(ctx context.Context, key string) any
- func (d *DefaultHandler) GoLA(ctx context.Context) *GoLA
- func (d *DefaultHandler) IsLastNode(ctx context.Context) bool
- func (d *DefaultHandler) Node(ctx context.Context) Node
- func (d *DefaultHandler) Run(ctx context.Context, request Request, response Response) (er error)
- func (d *DefaultHandler) SetParam(ctx context.Context, key string, value any)
- type DefaultHttpHandler
- func (h *DefaultHttpHandler) After(ctx context.Context, request Request, response Response) (er error)
- func (h *DefaultHttpHandler) Before(ctx context.Context, request Request, response Response) (er error)
- func (h *DefaultHttpHandler) Connect(ctx context.Context, request Request, response Response) (er error)
- func (h *DefaultHttpHandler) Create(ctx context.Context, request Request, response Response) (er error)
- func (h *DefaultHttpHandler) Delete(ctx context.Context, request Request, response Response) (er error)
- func (h *DefaultHttpHandler) ErrorCaught(ctx context.Context, request Request, response Response, ...)
- func (h *DefaultHttpHandler) Get(ctx context.Context, request Request, response Response) (er error)
- func (h *DefaultHttpHandler) Index(ctx context.Context, request Request, response Response) (er error)
- func (h *DefaultHttpHandler) Options(ctx context.Context, request Request, response Response) (er error)
- func (h *DefaultHttpHandler) Patch(ctx context.Context, request Request, response Response) (er error)
- func (h *DefaultHttpHandler) Post(ctx context.Context, request Request, response Response) (er error)
- func (h *DefaultHttpHandler) Put(ctx context.Context, request Request, response Response) (er error)
- func (h *DefaultHttpHandler) Run(ctx context.Context, request Request, response Response) (er error)
- func (h *DefaultHttpHandler) Trace(ctx context.Context, request Request, response Response) (er error)
- type DefaultNotFoundHandler
- type DefaultServerErrorHandler
- type ErrorResponseImpl
- type GoLA
- type Handler
- type HttpHandler
- type Node
- type NodeType
- type Request
- type Response
- type Route
Constants ¶
View Source
const ( CtxGoLA = "gola" CtxGoLAParams = "gola-params" CtxGoLANode = "gola-node" CtxGoLANodeLast = "gola-node-last" CtxGoLAHandler = "gola-handler" CtxGoLAHandlerError = "gola-handler-error" )
Variables ¶
View Source
var NotImplemented = erresponse.NotImplemented
Functions ¶
func CORSHelper ¶
Types ¶
type DefaultCORSHandler ¶
type DefaultCORSHandler struct { }
type DefaultEmptyHandler ¶ added in v0.8.3
type DefaultEmptyHandler struct {
DefaultHandler
}
type DefaultHandler ¶
type DefaultHandler struct { }
func (*DefaultHandler) GetParam ¶ added in v0.8.6
func (d *DefaultHandler) GetParam(ctx context.Context, key string) any
func (*DefaultHandler) GoLA ¶ added in v0.8.1
func (d *DefaultHandler) GoLA(ctx context.Context) *GoLA
func (*DefaultHandler) IsLastNode ¶ added in v0.8.1
func (d *DefaultHandler) IsLastNode(ctx context.Context) bool
func (*DefaultHandler) Node ¶ added in v0.8.1
func (d *DefaultHandler) Node(ctx context.Context) Node
type DefaultHttpHandler ¶ added in v0.7.3
type DefaultHttpHandler struct {
DefaultHandler
}
func (*DefaultHttpHandler) ErrorCaught ¶ added in v0.7.3
func (h *DefaultHttpHandler) ErrorCaught(ctx context.Context, request Request, response Response, err erresponse.ErrorResponse)
type DefaultNotFoundHandler ¶
type DefaultNotFoundHandler struct { }
type DefaultServerErrorHandler ¶
type DefaultServerErrorHandler struct { }
type ErrorResponseImpl ¶ added in v0.7.3
type ErrorResponseImpl struct { erresponse.ErrorResponse Caught *kkpanic.CaughtImpl `json:"caught,omitempty"` }
func (*ErrorResponseImpl) String ¶ added in v0.7.3
func (e *ErrorResponseImpl) String() string
type GoLA ¶
type GoLA struct {
BeginHandler, NotFoundHandler, ServerErrorHandler, FinishHandler Handler
// contains filtered or unexported fields
}
func (*GoLA) Register ¶
func (g *GoLA) Register(ctx context.Context, request events.ALBTargetGroupRequest) (events.ALBTargetGroupResponse, error)
type HttpHandler ¶ added in v0.7.3
type HttpHandler interface { Index(ctx context.Context, request Request, response Response) (er error) Get(ctx context.Context, request Request, response Response) (er error) Create(ctx context.Context, request Request, response Response) (er error) Post(ctx context.Context, request Request, response Response) (er error) Put(ctx context.Context, request Request, response Response) (er error) Delete(ctx context.Context, request Request, response Response) (er error) Options(ctx context.Context, request Request, response Response) (er error) Patch(ctx context.Context, request Request, response Response) (er error) Trace(ctx context.Context, request Request, response Response) (er error) Connect(ctx context.Context, request Request, response Response) (er error) Before(ctx context.Context, request Request, response Response) (er error) After(ctx context.Context, request Request, response Response) (er error) ErrorCaught(ctx context.Context, request Request, response Response, err erresponse.ErrorResponse) }
type Request ¶
type Request interface { Request() *events.ALBTargetGroupRequest Method() string Path() string PathParameter(name string) string TraceId() string UserAgent() string Header() http.Header GetHeader(name string) string GetHeaders(name string) []string QueryValue(name string) string QueryValues(name string) []string Body() buf.ByteBuf }
func NewRequest ¶ added in v0.8.7
func NewRequest(req events.ALBTargetGroupRequest, pathParameters map[string]string) Request
type Response ¶
type Response interface { Build() *events.ALBTargetGroupResponse StatusCode() int SetStatusCode(code int) Response AddHeader(name string, value string) Response SetHeader(name string, value string) Response DelHeader(name string) Response Header() http.Header GetHeader(name string) string GetHeaders(name string) []string Cookie(name string) *http.Cookie SetCookie(cookie http.Cookie) Response Cookies() map[string][]http.Cookie Body() []byte SetBody(buf buf.ByteBuf) Response SetContentType(ct string) Response JSONResponse(buf buf.ByteBuf) Response }
func NewResponse ¶ added in v0.8.7
func NewResponse() Response
Click to show internal directories.
Click to hide internal directories.