web

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(m proto.Message) ([]byte, error)

func Unmarshal

func Unmarshal(b []byte, m proto.Message) error

Types

type Forward

type Forward interface {
	Request(counted uint64, messageType int, p []byte) error
	Response(counted uint64) (e error)
	CloseSend() error
}

func NewForward

func NewForward(req func(counted uint64, messageType int, p []byte) error,
	resp func(counted uint64) (e error),
	closeSend func() error,
) Forward

type IHelper

type IHelper interface {
	Register(*grpc.ClientConn, *gin.RouterGroup)
}

type Websocket

type Websocket struct {
	*websocket.Conn
}

func (Websocket) Error

func (w Websocket) Error(e error) error

func (Websocket) Forward

func (w Websocket) Forward(f Forward)

func (Websocket) Send

func (w Websocket) Send(v interface{}) error

func (Websocket) SendBinary

func (w Websocket) SendBinary(b []byte) error

func (Websocket) SendMessage

func (w Websocket) SendMessage(m proto.Message) error

func (Websocket) Success

func (w Websocket) Success() error

Directories

Path Synopsis
contrib

Jump to

Keyboard shortcuts

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