model

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 20, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAuthDenied = goerr.NewTag("auth denied")
)

Functions

This section is empty.

Types

type Request

type Request struct {
	ID     string            `json:"id"`
	Path   string            `json:"path"`
	Method string            `json:"method"`
	Body   []byte            `json:"body"`
	Remote string            `json:"remote"`
	Header map[string]string `json:"header"`
}

func NewRequest

func NewRequest(r *http.Request) (*Request, error)

func (*Request) NewHTTPRequest

func (x *Request) NewHTTPRequest(ctx context.Context, dst string) (*http.Request, error)

func (*Request) NewResponse

func (x *Request) NewResponse(r *http.Response) (*Response, error)

type Response

type Response struct {
	ID     string              `json:"id"`
	Code   int                 `json:"code"`
	Body   []byte              `json:"body"`
	Header map[string][]string `json:"header"`
}

Jump to

Keyboard shortcuts

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