Documentation ¶
Index ¶
- func Get(uri string, headers Headers) ([]byte, error)
- func GetForm[T any](uri string, headers Headers) (*T, error)
- func MarshalForm(data interface{}) string
- func Post(uri string, headers Headers, body string) ([]byte, error)
- func PostForm[T any](uri string, headers Headers, body interface{}) (*T, error)
- func ReadForm[T interface{}](w *WebSocket) *T
- func TrimPrefixes(s string, prefixes ...string) string
- func UnmarshalByteForm[T any](data []byte) (*T, error)
- func UnmarshalForm[T any](data string) *T
- type Headers
- type WebSocket
- func (w *WebSocket) Close() error
- func (w *WebSocket) DeferClose()
- func (w *WebSocket) GetCursor() int
- func (w *WebSocket) IncrCursor()
- func (w *WebSocket) IsEmpty() bool
- func (w *WebSocket) NextWriter(messageType int) (io.WriteCloser, error)
- func (w *WebSocket) Read() (int, []byte, error)
- func (w *WebSocket) ReadJSON(v interface{}) error
- func (w *WebSocket) Receive(v interface{}) bool
- func (w *WebSocket) Send(v interface{}) bool
- func (w *WebSocket) SendJSON(v interface{}) error
- func (w *WebSocket) SendText(message string) bool
- func (w *WebSocket) Write(messageType int, data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalForm ¶
func MarshalForm(data interface{}) string
func TrimPrefixes ¶
func UnmarshalByteForm ¶
func UnmarshalForm ¶
Types ¶
type WebSocket ¶
func NewWebsocket ¶
func (*WebSocket) DeferClose ¶
func (w *WebSocket) DeferClose()
func (*WebSocket) IncrCursor ¶
func (w *WebSocket) IncrCursor()
func (*WebSocket) NextWriter ¶
func (w *WebSocket) NextWriter(messageType int) (io.WriteCloser, error)
Click to show internal directories.
Click to hide internal directories.