_interface

package
v0.0.0-...-43dd9f0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddHttp

func AddHttp(http Http)

func Init

func Init()

Types

type Context

type Context struct {
	Path    string `json:"path"`
	StartTs uint64 `json:"startTs"`
	EndTs   uint64 `json:"endTs"`
}

type Http

type Http interface {
	Path() string
	Method() []network.HttpMethod
	GetDTO() util.DTO
	SetDTO(request *http.Request, dto util.DTO)
	Verify(dto util.DTO) bool
	Start(request *http.Request, response http.ResponseWriter)
	Execute(request *http.Request, response http.ResponseWriter, dto util.DTO) util.Result
	Error(request *http.Request, response http.ResponseWriter) util.Result
	End(request *http.Request, response http.ResponseWriter)
}

type Req

type Req struct {
}

func (*Req) End

func (this *Req) End(request *http.Request, response http.ResponseWriter)

func (*Req) Error

func (this *Req) Error(request *http.Request, response http.ResponseWriter) util.Result

func (*Req) Execute

func (this *Req) Execute(request *http.Request, response http.ResponseWriter, dto util.DTO) util.Result

func (*Req) GetDTO

func (this *Req) GetDTO() util.DTO

func (*Req) Method

func (this *Req) Method() []network.HttpMethod

func (*Req) Path

func (this *Req) Path() string

func (*Req) SetDTO

func (this *Req) SetDTO(request *http.Request, dto util.DTO)

func (*Req) Start

func (this *Req) Start(request *http.Request, response http.ResponseWriter)

func (*Req) Verify

func (this *Req) Verify(dto util.DTO) bool

type V1Default

type V1Default struct {
	Req
}

func (*V1Default) Execute

func (this *V1Default) Execute(request *http.Request, response http.ResponseWriter, dto util.DTO) util.Result

func (*V1Default) Method

func (this *V1Default) Method() []network.HttpMethod

func (*V1Default) Path

func (this *V1Default) Path() string

type V1Test

type V1Test struct {
	Req
}

func (*V1Test) Execute

func (this *V1Test) Execute(request *http.Request, response http.ResponseWriter, dto util.DTO) util.Result

func (*V1Test) Method

func (this *V1Test) Method() []network.HttpMethod

func (*V1Test) Path

func (this *V1Test) Path() string

Jump to

Keyboard shortcuts

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