http

package
v0.0.0-...-7437625 Latest Latest
Warning

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

Go to latest
Published: May 18, 2017 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoRender

func AutoRender(w http.ResponseWriter, data interface{}, err error)

func ParseIP

func ParseIP(ip string, block *net.IPNet) string

func PrivateIP

func PrivateIP(ip string, Nats []g.NAT) string

func RenderDataJson

func RenderDataJson(w http.ResponseWriter, data interface{})

func RenderJson

func RenderJson(w http.ResponseWriter, v interface{})

func RenderMsgJson

func RenderMsgJson(w http.ResponseWriter, msg string)

func Start

func Start()

Types

type Dto

type Dto struct {
	Msg  string      `json:"msg"`
	Data interface{} `json:"data"`
}

type Endpoint

type Endpoint struct {
	Endpoint string `json:"endpoint,omitempty"`
}

type ResponseEndpoints

type ResponseEndpoints struct {
	Items []ResponseHost `json:"items,omitempty"`
}

type ResponseHost

type ResponseHost struct {
	Ip       string `json:"ip,omitempty"`
	Endpoint string `json:"endpoint,omitempty"`
}

type ResponseHostId

type ResponseHostId struct {
	Name   string `json:"name,omitempty"`
	HostId int    `json:"host_id,omitempty"`
}

Jump to

Keyboard shortcuts

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