netutil

package
v0.0.0-...-9bb4683 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExternalIP

func ExternalIP() (net.IP, error)

func GetOutBoundIPWithUDP

func GetOutBoundIPWithUDP() (ip string, err error)

func GetRequestIP

func GetRequestIP(r *http.Request) string

func GetUploadFileSize

func GetUploadFileSize(upfile multipart.File) (int64, error)

GetUploadFileSize 返回HTTP upload文件的大小

Types

type Dsn

type Dsn struct {
	Scheme string
	Source string
}

func ParseDsn

func ParseDsn(dsn string) (Dsn, error)

type Size

type Size interface {
	Size() int64
}

Size 获取文件大小的接口

type Stat

type Stat interface {
	Stat() (os.FileInfo, error)
}

Stat 获取文件信息的接口

Jump to

Keyboard shortcuts

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