middleware

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewErrorWithCodes

func NewErrorWithCodes(code string, message string) error

Types

type AuthNoop

type AuthNoop struct{}

func (AuthNoop) Auth

func (self AuthNoop) Auth(ctx *endpoint.Context, VisitAllHeaders func(func(key, value []byte))) (int, error)

type ErrorJsonWithCodeResponse

type ErrorJsonWithCodeResponse struct {
	Code         string `json:"code"`
	InternalCode string `json:"internal_code"`
	Message      string `json:"message"`
}

func (ErrorJsonWithCodeResponse) HandleError

func (self ErrorJsonWithCodeResponse) HandleError(ctx *endpoint.Context, httpStatus int, err error) (int, interface{})

type ErrorWithCodes

type ErrorWithCodes struct {
	Code    string
	Message string
}

func (ErrorWithCodes) Error

func (self ErrorWithCodes) Error() string

type NoopLogConfig

type NoopLogConfig struct {
	*log.Config
}

func (*NoopLogConfig) Out

func (self *NoopLogConfig) Out() io.Writer

type ValidateNoopRequest

type ValidateNoopRequest struct {
}

func (ValidateNoopRequest) ValidateRequest

func (self ValidateNoopRequest) ValidateRequest(ctx *endpoint.Context, requestBodyBytes []byte) (int, error)

type ValidateNoopResponse

type ValidateNoopResponse struct {
}

func (ValidateNoopResponse) ValidateResponse

func (self ValidateNoopResponse) ValidateResponse(ctx *endpoint.Context, httpStatus int, responseBodyBytes []byte) (int, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL