rest_http

package
v1.7.5 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResponseError

func ResponseError(err rest.IErrorArgs) rest.IRequestOut

func ResponseSuccess

func ResponseSuccess(req rest.IRequest) rest.IRequestOut

Types

type RequestIn added in v1.3.0

type RequestIn struct {
	*rest.RequestIn
	// contains filtered or unexported fields
}

func (*RequestIn) Auth added in v1.3.0

func (s *RequestIn) Auth() json.Map

func (*RequestIn) IsAuth added in v1.3.0

func (s *RequestIn) IsAuth() bool

func (*RequestIn) OutError added in v1.3.0

func (s *RequestIn) OutError(err rest.IErrorArgs) rest.IRequestOut

func (*RequestIn) OutSuccess added in v1.3.0

func (s *RequestIn) OutSuccess(data json.Map, files rest.RequestFiles) rest.IRequestOut

type RequestOut added in v1.3.0

type RequestOut struct {
	Err rest.IErrorArgs
	rest.IRequest
}

Response реализует объект ответа

func NewRequestOut added in v1.3.0

func NewRequestOut(req rest.IRequest) *RequestOut

func (*RequestOut) RClose added in v1.3.3

func (s *RequestOut) RClose()

func (*RequestOut) Write added in v1.3.0

func (s *RequestOut) Write(writer io.Writer) rest.IErrorArgs

Send отправляет запрос серверу

type Rest

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

func New

func New(app rest.IApplication, core any, responseHeaders map[string]string) *Rest

func (*Rest) App

func (s *Rest) App() rest.IApplication

func (*Rest) Prepare added in v1.3.0

func (s *Rest) Prepare(server rest.IServer, httpPrefix string)

Jump to

Keyboard shortcuts

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