endpoints

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HandlerRoot = &Root{}
View Source
var HealthOK = bytes.NewBufferString("{\"status\": \"ok\"}")

Functions

This section is empty.

Types

type HandlerTask

type HandlerTask struct {
	http.DefaultHTTPHandlerTask
}

func (*HandlerTask) After

func (h *HandlerTask) After(req *http.Request, resp *http.Response, params map[string]interface{}) http.ErrorResponse

func (*HandlerTask) Before

func (h *HandlerTask) Before(req *http.Request, resp *http.Response, params map[string]interface{}) http.ErrorResponse

func (*HandlerTask) Connect

func (h *HandlerTask) Connect(ctx channel.HandlerContext, req *http.Request, resp *http.Response, params map[string]interface{}) http.ErrorResponse

func (*HandlerTask) Delete

func (h *HandlerTask) Delete(ctx channel.HandlerContext, req *http.Request, resp *http.Response, params map[string]interface{}) http.ErrorResponse

func (*HandlerTask) ErrorCaught

func (h *HandlerTask) ErrorCaught(req *http.Request, resp *http.Response, params map[string]interface{}, err http.ErrorResponse) error

func (*HandlerTask) Get

func (h *HandlerTask) Get(ctx channel.HandlerContext, req *http.Request, resp *http.Response, params map[string]interface{}) http.ErrorResponse

func (*HandlerTask) Index

func (h *HandlerTask) Index(ctx channel.HandlerContext, req *http.Request, resp *http.Response, params map[string]interface{}) http.ErrorResponse

func (*HandlerTask) Lang

func (h *HandlerTask) Lang(req *http.Request) string

func (*HandlerTask) Options

func (h *HandlerTask) Options(ctx channel.HandlerContext, req *http.Request, resp *http.Response, params map[string]interface{}) http.ErrorResponse

func (*HandlerTask) Patch

func (h *HandlerTask) Patch(ctx channel.HandlerContext, req *http.Request, resp *http.Response, params map[string]interface{}) http.ErrorResponse

func (*HandlerTask) Post

func (h *HandlerTask) Post(ctx channel.HandlerContext, req *http.Request, resp *http.Response, params map[string]interface{}) http.ErrorResponse

func (*HandlerTask) PreCheck

func (h *HandlerTask) PreCheck(req *http.Request, resp *http.Response, params map[string]interface{}) http.ErrorResponse

func (*HandlerTask) Put

func (h *HandlerTask) Put(ctx channel.HandlerContext, req *http.Request, resp *http.Response, params map[string]interface{}) http.ErrorResponse

func (*HandlerTask) ReaderDB

func (h *HandlerTask) ReaderDB() *gorm.DB

func (*HandlerTask) Redirect

func (h *HandlerTask) Redirect(redirectUrl string, resp *http.Response)

func (*HandlerTask) RedisRDB

func (h *HandlerTask) RedisRDB() redis.Conn

func (*HandlerTask) RedisWDB

func (h *HandlerTask) RedisWDB() redis.Conn

func (*HandlerTask) RenderHtml

func (h *HandlerTask) RenderHtml(templateName string, config *RenderConfig, resp *http.Response)

func (*HandlerTask) ResponseError

func (h *HandlerTask) ResponseError(er http.ErrorResponse, resp *http.Response)

func (*HandlerTask) SessionRenderData

func (h *HandlerTask) SessionRenderData(resp *http.Response, key string, value interface{})

func (*HandlerTask) T

func (h *HandlerTask) T(message string, lang string) string

func (*HandlerTask) Trace

func (h *HandlerTask) Trace(ctx channel.HandlerContext, req *http.Request, resp *http.Response, params map[string]interface{}) http.ErrorResponse

func (*HandlerTask) WriterDB

func (h *HandlerTask) WriterDB() *gorm.DB

type HealthCheck

type HealthCheck struct {
	HandlerTask
}

func (*HealthCheck) Get

func (a *HealthCheck) Get(ctx channel.HandlerContext, req *http.Request, resp *http.Response, params map[string]interface{}) http.ErrorResponse

type RenderConfig

type RenderConfig struct {
	PageTitle        string
	JavascriptHeader string
	JavascriptFooter string
	PageRenderData   map[string]interface{}
}

type Root

type Root struct {
	HandlerTask
}

func (*Root) Get

func (l *Root) Get(ctx channel.HandlerContext, req *http.Request, resp *http.Response, params map[string]interface{}) http.ErrorResponse

Jump to

Keyboard shortcuts

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