utils

package
v0.0.0-...-83ff69c Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const GLOBAL_IP_SERVER = "https://ifconfig.me/ip"

解析公网IP的服务器

Variables

This section is empty.

Functions

func IPGlobal

func IPGlobal() (string, error)

获取公网IP

func IPMatch

func IPMatch(str string) (ip string, err error)

判断公网IP是否符合规则

Types

type AliErrResponse

type AliErrResponse struct {
	Status    int    `json:"status"`
	Msg       string `json:"msg"`
	Title     string `json:"Title"`
	ErrorCode string `json:"ErrorCode"`
	Recommend string `json:"Recommend"`
	RequestId string `json:"RequestId"`
	Message   string `json:"Message"`
}

func ParsingAliErr

func ParsingAliErr(err error) (alierr AliErrResponse, ok bool)

Jump to

Keyboard shortcuts

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