models

package
v0.0.0-...-db0f42a Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2020 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Request

type Request struct {
	Method     string         `json:"method,omitempty"`
	Proto      string         `json:"proto,omitempty"`
	URL        string         `json:"url,omitempty"`
	RequestURI string         `json:"request_uri,omitempty"`
	Body       string         `json:"body,omitempty"`
	Header     http.Header    `json:"headers,omitempty"`
	Cookies    []*http.Cookie `json:"cookies,omitempty"`
	RemoteAddr string         `json:"remote_address,omitempty"`
	UserAgent  string         `json:"user_agent,omitempty"`
	Referer    string         `json:"referer,omitempty"`
}

Request модель http.Request, импортируемая в лог

type Response

type Response struct {
	Status     string         `json:"status,omitempty"`
	StatusCode int            `json:"status_code,omitempty"`
	Proto      string         `json:"proto,omitempty"`
	Location   string         `json:"location,omitempty"`
	Body       string         `json:"body,omitempty"`
	Header     http.Header    `json:"headers,omitempty"`
	Cookies    []*http.Cookie `json:"cookies,omitempty"`
}

Response модель http.Response, импортируемая в лог

type Zaplog

type Zaplog struct {
	Level    string      `json:"level"`
	Caller   string      `json:"caller"`
	Function string      `json:"function"`
	Message  string      `json:"message"`
	Method   string      `json:"method"`
	URL      string      `json:"url"`
	Code     int         `json:"code"`
	Request  Request     `json:"request"`
	Response Response    `json:"response"`
	Extend   interface{} `json:"extend"`
}

Zaplog модель

Jump to

Keyboard shortcuts

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