handler

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	Handle(ctx context.Context, request *HttpRequest) (*HttpResponse, error)
}

type HttpRequest

type HttpRequest struct {
	// contains filtered or unexported fields
}

func NewHttpRequest

func NewHttpRequest(query, body map[string]interface{}) *HttpRequest

func (*HttpRequest) Body

func (r *HttpRequest) Body(fieldName string) string

func (*HttpRequest) Query

func (r *HttpRequest) Query(paramName string) string

type HttpResponse

type HttpResponse struct {
	Status int         `json:"status"`
	Body   interface{} `json:"body"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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