Documentation ¶
Index ¶
- Variables
- func GetToken(gatewayConfig GatewayConfig, permission int, expiresecd int64) (token string, err error)
- type CheckStatusRequest
- type CheckStatusResponse
- type ConnectSSH
- type ConnectSTCP
- type ConnectSerialPort
- type ConnectTCP
- type ConnectUDP
- type ConnectWs
- type ConnectWss
- type Error
- type FindmDNS
- type GatewayConfig
- type GatewayLogin
- type GatewayWorkConn
- type GetMyUDPPublicAddr
- type InstallPlugin
- type JsonResponse
- type MDNSResult
- type Message
- type Msg
- type NewService
- type NewSubSession
- type OK
- type OpenIoTHubLogin
- type Ping
- type Pong
- type QueryInstalledPlugin
- type RemoteNetInfo
- type RemovePlugin
- type ReqNewP2PCtrlAsClient
- type ReqNewP2PCtrlAsServer
- type RequestNewWorkConn
- type RespInstalledPlugin
- type RunPlugin
- type ScanPort
- type ScanPortResult
- type ServerConfig
- type Srever
- type StopPlugin
- type TokenClaims
- type UpgradePlugin
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TypeMap = make(map[string]reflect.Type) TypeStringMap = make(map[reflect.Type]string) Types = []interface{}{ GatewayLogin{}, GatewayWorkConn{}, OpenIoTHubLogin{}, ConnectTCP{}, ConnectSTCP{}, ConnectUDP{}, ConnectWs{}, ConnectWss{}, ConnectSerialPort{}, ConnectSSH{}, NewSubSession{}, RemoteNetInfo{}, ReqNewP2PCtrlAsServer{}, ReqNewP2PCtrlAsClient{}, CheckStatusRequest{}, CheckStatusResponse{}, NewService{}, RequestNewWorkConn{}, GetMyUDPPublicAddr{}, net.UDPAddr{}, Ping{}, Pong{}, OK{}, Error{}, JsonResponse{}, } )
Functions ¶
Types ¶
type CheckStatusRequest ¶
type CheckStatusResponse ¶
type ConnectSSH ¶
type ConnectSTCP ¶
type ConnectSerialPort ¶
type ConnectSerialPort serial.OpenOptions
type ConnectTCP ¶
connect //tcp,stcp,udp,serialport,ws,wss
type ConnectUDP ¶
type ConnectWss ¶
type GatewayConfig ¶
type GatewayWorkConn ¶
type GetMyUDPPublicAddr ¶
type GetMyUDPPublicAddr struct{}
type JsonResponse ¶
type MDNSResult ¶
type MDNSResult []*zeroconf.ServiceEntry
type NewService ¶
type NewSubSession ¶
type NewSubSession struct{}
type OpenIoTHubLogin ¶
Connect TO
type RemoteNetInfo ¶
TODO:NETINFO Model
type RemovePlugin ¶
type RemovePlugin struct {
TargetUrl string
}
type ReqNewP2PCtrlAsClient ¶
type ReqNewP2PCtrlAsClient struct { IntranetIp string IntranetPort int ExternalIp string ExternalPort int }
让内网端以dial的身份连接我
type ReqNewP2PCtrlAsServer ¶ added in v0.0.6
type ReqNewP2PCtrlAsServer struct { IntranetIp string IntranetPort int ExternalIp string ExternalPort int }
P2P让远端以listener身份运行
type RequestNewWorkConn ¶
type RespInstalledPlugin ¶
type RespInstalledPlugin struct{}
type ScanPortResult ¶
type ScanPortResult []int
type ServerConfig ¶
type ServerConfig struct { Common struct { BindAddr string `yaml:"bind_addr"` TcpPort int `yaml:"tcp_port"` KcpPort int `yaml:"kcp_port"` UdpApiPort int `yaml:"udp_p2p_port"` KcpApiPort int `yaml:"kcp_p2p_port"` TlsPort int `yaml:"tls_port"` GrpcPort int `yaml:"grpc_port"` HttpPort int `yaml:"http_port"` HttpsPort int `yaml:"https_port"` } Security struct { LoginKey string `yaml:"login_key"` TlsCertFilePath string `yaml:"tls_Cert_file_path"` TlsKeyFilePath string `yaml:"tls_key_file_path"` HttpsCertFilePath string `yaml:"https_cert_file_path"` HttpsKeyFilePath string `yaml:"https_key_file_path"` } }
type StopPlugin ¶
type StopPlugin struct {
TargetUrl string
}
type TokenClaims ¶
type TokenClaims struct { RunId string Host string TcpPort int KcpPort int TlsPort int GrpcPort int UDPApiPort int KCPApiPort int Permission int jwt.StandardClaims }
func DecodeToken ¶
func DecodeToken(salt, tokenStr string) (*TokenClaims, error)
func DecodeUnverifiedToken ¶
func DecodeUnverifiedToken(tokenStr string) (*TokenClaims, error)
type UpgradePlugin ¶
type UpgradePlugin struct {
TargetUrl string
}
Click to show internal directories.
Click to hide internal directories.