std

package
v0.0.0-...-ecf5411 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoHostFoundError = &ErrorResp{
	Message: "hosts param is required",
}

Functions

func Handler

func Handler(ctx *fastserver.Context)

resolve?host=www.baidu.com&appid=100ime

Types

type ErrorResp

type ErrorResp struct {
	Message string `json:"message"`
}

type HostIps

type HostIps struct {
	Debug map[string]interface{} `json:"debug,omitempty"`
	Host  string                 `json:"host"`
	Ips   []Ip                   `json:"ips"`
	Ttl   int                    `json:"ttl"`
}

func (HostIps) Json

func (h HostIps) Json(jw *fastjson.JsonWriter)

func (HostIps) MarshalEasyJSON

func (v HostIps) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (HostIps) MarshalJSON

func (v HostIps) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*HostIps) UnmarshalEasyJSON

func (v *HostIps) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*HostIps) UnmarshalJSON

func (v *HostIps) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Ip

type Ip struct {
	Ip string `json:"ip"`
	//Tags map[string]string `json:"tags,omitempty"`
	Port int `json:"port"`
}

func (Ip) Json

func (i Ip) Json(jw *fastjson.JsonWriter)

func (Ip) MarshalEasyJSON

func (v Ip) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Ip) MarshalJSON

func (v Ip) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Ip) UnmarshalEasyJSON

func (v *Ip) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Ip) UnmarshalJSON

func (v *Ip) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Responses

type Responses struct {
	Dns      []HostIps `json:"dns"`
	ClientIp string    `json:"client_ip"`
	Mode     string    `json:"mode"`
}

func (Responses) Json

func (r Responses) Json(jw *fastjson.JsonWriter)

func (Responses) MarshalEasyJSON

func (v Responses) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Responses) MarshalJSON

func (v Responses) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Responses) UnmarshalEasyJSON

func (v *Responses) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Responses) UnmarshalJSON

func (v *Responses) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type U

type U struct {
	A int
}

func (U) MarshalEasyJSON

func (v U) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (U) MarshalJSON

func (v U) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*U) UnmarshalEasyJSON

func (v *U) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*U) UnmarshalJSON

func (v *U) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

Jump to

Keyboard shortcuts

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