server

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const HTML = `` /* 8220-byte string literal not displayed */
View Source
const USER_AGENT = "clibing/knife"

用户发现时携带的UA

Variables

This section is empty.

Functions

func CreateErrMsg added in v0.1.1

func CreateErrMsg(code int, message string) (output []byte)

func CreateSuccessMsg added in v0.1.1

func CreateSuccessMsg[T any](message string, data T) (output []byte)

func NewFileServer

func NewFileServer() *cobra.Command

func SendIpAndPort added in v0.1.6

func SendIpAndPort(localIp, remoteIp string, localPort, remotePort int)

Types

type Message added in v0.1.6

type Message struct {
	UserAgent string `json:"UserAgent"`
	Port      int    `json:"Port"`
}

type Result added in v0.1.1

type Result[T any] struct {
	Code    int    `json:"code"`
	Data    T      `json:"data"`
	Message string `json:"message"`
}

Jump to

Keyboard shortcuts

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