Documentation ¶
Index ¶
- func Httpserver(o HttpServerOption)
- func MarshalJsonAndWrite(w http.ResponseWriter, data interface{}) error
- func MarshalProtoAndWrite(w http.ResponseWriter, data proto.Message, ...) error
- func UnmarshalJsonFromRequest(r *http.Request, data interface{}) error
- func UnmarshalProtoFromRequest(r *http.Request, data proto.Message, opts ...func(*protojson.UnmarshalOptions)) error
- type Handler
- type HttpServerOption
- func (n *HttpServerOption) AddNode(w http.ResponseWriter, r *http.Request) error
- func (c *HttpServerOption) CloseConn(w http.ResponseWriter, r *http.Request) error
- func (cc *HttpServerOption) ConnWebsocket(w http.ResponseWriter, r *http.Request) error
- func (s *HttpServerOption) DeleteLink(w http.ResponseWriter, r *http.Request) error
- func (n *HttpServerOption) DeleteNOde(w http.ResponseWriter, r *http.Request) error
- func (t *HttpServerOption) DeleteTag(w http.ResponseWriter, r *http.Request) error
- func (cc *HttpServerOption) GetConfig(w http.ResponseWriter, r *http.Request) error
- func (g *HttpServerOption) GetGroups(w http.ResponseWriter, r *http.Request) error
- func (l *HttpServerOption) GetLatency(w http.ResponseWriter, r *http.Request) error
- func (s *HttpServerOption) GetLinkList(w http.ResponseWriter, r *http.Request) error
- func (nn *HttpServerOption) GetNode(w http.ResponseWriter, r *http.Request) error
- func (g *HttpServerOption) GroupList(w http.ResponseWriter, r *http.Request) error
- func (z *HttpServerOption) NodeNow(w http.ResponseWriter, r *http.Request) error
- func (s *HttpServerOption) PatchLink(w http.ResponseWriter, r *http.Request) error
- func (o *HttpServerOption) Routers() Handler
- func (c *HttpServerOption) SaveConfig(w http.ResponseWriter, r *http.Request) error
- func (s *HttpServerOption) SaveLink(w http.ResponseWriter, r *http.Request) error
- func (n *HttpServerOption) SaveNode(w http.ResponseWriter, r *http.Request) error
- func (t *HttpServerOption) SaveTag(w http.ResponseWriter, r *http.Request) error
- func (t *HttpServerOption) TagList(w http.ResponseWriter, r *http.Request) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Httpserver ¶
func Httpserver(o HttpServerOption)
func MarshalJsonAndWrite ¶
func MarshalJsonAndWrite(w http.ResponseWriter, data interface{}) error
func MarshalProtoAndWrite ¶
func MarshalProtoAndWrite(w http.ResponseWriter, data proto.Message, opts ...func(*protojson.MarshalOptions)) error
Types ¶
type HttpServerOption ¶
type HttpServerOption struct { Mux *http.ServeMux Shunt *shunt.Shunt NodeServer gn.NodeServer Subscribe gn.SubscribeServer Tag gn.TagServer Connections gs.ConnectionsServer Config gc.ConfigServiceServer }
func (*HttpServerOption) AddNode ¶
func (n *HttpServerOption) AddNode(w http.ResponseWriter, r *http.Request) error
func (*HttpServerOption) CloseConn ¶
func (c *HttpServerOption) CloseConn(w http.ResponseWriter, r *http.Request) error
func (*HttpServerOption) ConnWebsocket ¶
func (cc *HttpServerOption) ConnWebsocket(w http.ResponseWriter, r *http.Request) error
func (*HttpServerOption) DeleteLink ¶
func (s *HttpServerOption) DeleteLink(w http.ResponseWriter, r *http.Request) error
func (*HttpServerOption) DeleteNOde ¶
func (n *HttpServerOption) DeleteNOde(w http.ResponseWriter, r *http.Request) error
func (*HttpServerOption) DeleteTag ¶
func (t *HttpServerOption) DeleteTag(w http.ResponseWriter, r *http.Request) error
func (*HttpServerOption) GetConfig ¶
func (cc *HttpServerOption) GetConfig(w http.ResponseWriter, r *http.Request) error
func (*HttpServerOption) GetGroups ¶
func (g *HttpServerOption) GetGroups(w http.ResponseWriter, r *http.Request) error
func (*HttpServerOption) GetLatency ¶
func (l *HttpServerOption) GetLatency(w http.ResponseWriter, r *http.Request) error
func (*HttpServerOption) GetLinkList ¶
func (s *HttpServerOption) GetLinkList(w http.ResponseWriter, r *http.Request) error
func (*HttpServerOption) GetNode ¶
func (nn *HttpServerOption) GetNode(w http.ResponseWriter, r *http.Request) error
func (*HttpServerOption) GroupList ¶
func (g *HttpServerOption) GroupList(w http.ResponseWriter, r *http.Request) error
func (*HttpServerOption) NodeNow ¶
func (z *HttpServerOption) NodeNow(w http.ResponseWriter, r *http.Request) error
func (*HttpServerOption) PatchLink ¶
func (s *HttpServerOption) PatchLink(w http.ResponseWriter, r *http.Request) error
func (*HttpServerOption) Routers ¶
func (o *HttpServerOption) Routers() Handler
func (*HttpServerOption) SaveConfig ¶
func (c *HttpServerOption) SaveConfig(w http.ResponseWriter, r *http.Request) error
func (*HttpServerOption) SaveLink ¶
func (s *HttpServerOption) SaveLink(w http.ResponseWriter, r *http.Request) error
func (*HttpServerOption) SaveNode ¶
func (n *HttpServerOption) SaveNode(w http.ResponseWriter, r *http.Request) error
func (*HttpServerOption) SaveTag ¶
func (t *HttpServerOption) SaveTag(w http.ResponseWriter, r *http.Request) error
func (*HttpServerOption) TagList ¶
func (t *HttpServerOption) TagList(w http.ResponseWriter, r *http.Request) error
Click to show internal directories.
Click to hide internal directories.