client

package
v0.0.0-...-3e0b10d Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IsStart = "INTERACTIVE_SIGNAL_START"
	IsStop  = "INTERACTIVE_SIGNAL_STOP"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(addr string) *Client

func (*Client) Start

func (s *Client) Start() error

type Common

type Common struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
}

type Context

type Context struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewContext

func NewContext(user LoginRespData) *Context

func (*Context) Auth

func (c *Context) Auth() error

func (*Context) Connect

func (c *Context) Connect(net string, addr string) error

func (*Context) Listener

func (c *Context) Listener() error

type LoginResp

type LoginResp struct {
	Common
	Data LoginRespData `json:"data"`
}

type LoginRespData

type LoginRespData struct {
	ID       int    `json:"id"`
	Name     string `json:"name"`
	Score    int    `json:"score"`
	Username string `json:"username"`
	Token    string `json:"token"`
}

Jump to

Keyboard shortcuts

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