core

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2021 License: Apache-2.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnknownType = errors.New("unknown type")

ErrUnknownType 未知错误类型

Functions

func BytesToString

func BytesToString(b []byte) string

BytesToString 没有内存开销的转换

func CloneRequest

func CloneRequest(r *http.Request) (*http.Request, error)

func GetBytes

func GetBytes(v interface{}) (b []byte, ok bool)

func GetNoPortExists

func GetNoPortExists() string

获取没有绑定服务的端口

func GetString

func GetString(v interface{}) (s string, ok bool)

func LoopElem

func LoopElem(v reflect.Value) reflect.Value

LoopElem 不停地对指针解引用

func NewPtrVal

func NewPtrVal(defValue interface{}) interface{}

NewPtrVal 新建这个类型的指针变量并赋值

func StringToBytes

func StringToBytes(s string) (b []byte)

StringToBytes 没有内存开销的转换

Types

type A

type A []interface{}

A是[]interface{} 简写

type Entery

type Entery struct {
	gorm.Model_UUID
	JarKey     string    `yaml:"jar_key"`
	Name       string    `yaml:"name"`
	Value      string    `yaml:"value"`
	Domain     string    `yaml:"domain"`
	Path       string    `yaml:"path"`
	SameSite   string    `yaml:"same_site"`
	Secure     bool      `yaml:"secure"`
	HttpOnly   bool      `yaml:"http_only"`
	Persistent bool      `yaml:"persistent"`
	HostOnly   bool      `yaml:"host_only"`
	Expires    time.Time `yaml:"expires"`
}

func (*Entery) BeforeCreate

func (e *Entery) BeforeCreate(tx *gorm.DB) error

type FormFile

type FormFile string

FormFile 用于formdata类型数据编码 从文件读取数据流

type FormMem

type FormMem []byte

FormMem 用于formdata类型数据编码 从[]byte里面读取数据流

type FormType

type FormType struct {
	FileName    string      //filename
	ContentType string      //Content-Type:Mime-Type
	File        interface{} //FromFile | FromMem (这里就是您的从文件地址中读取和从内存中读取)
}

FormType 自定义formdata文件名和流的类型

type H

type H map[string]interface{}

H 是map[string]interface{} 简写

type Need

type Need struct {
	Need interface{}
	Got  interface{}
}

type ReadCloseFail

type ReadCloseFail struct{}

ReadCloseFail 内部测试使用

func (*ReadCloseFail) Close

func (r *ReadCloseFail) Close() error

Close 内部测试使用

func (*ReadCloseFail) Read

func (r *ReadCloseFail) Read(p []byte) (n int, err error)

Read 供测试使用

type TCookieJar

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

func (TCookieJar) Cookies

func (jar TCookieJar) Cookies(u *url.URL) (cookies []*http.Cookie)

func (*TCookieJar) InitCookieJarWithSqlite

func (jar *TCookieJar) InitCookieJarWithSqlite(db *gorm.DB) (err error)

func (TCookieJar) SetCookies

func (jar TCookieJar) SetCookies(u *url.URL, cookies []*http.Cookie)

Jump to

Keyboard shortcuts

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