Documentation ¶
Index ¶
- type Instance
- func (this *Instance) Checksum(data []byte) uint32
- func (this *Instance) DefaultLogFunc(ctx context.Context, format string, data ...interface{})
- func (this *Instance) DiscardLogFunc(ctx context.Context, format string, data ...interface{})
- func (this *Instance) GetCachedFile(filePath string) (file *os.File, err error)
- func (this *Instance) GetClientIP(req *http.Request) string
- func (this *Instance) GetServerAddress() (ip string, err error)
- func (this *Instance) InArrayString(needle string, haystack []string, caseSensitives ...bool) bool
- func (this *Instance) InMapString(needle string, haystack map[string]string) bool
- func (this *Instance) Initiate(ctx context.Context) (context.Context, error)
- func (this *Instance) Md5Byte(text []byte) string
- func (this *Instance) Md5File(f *os.File) (string, error)
- func (this *Instance) NewFile(filePath string, perm os.FileMode, payload io.Reader, sizes ...int64) (file *os.File, err error)
- func (this *Instance) NewTemporaryFile(temporaryPath string, prefix string, payload io.Reader, sizes ...int64) (file *os.File, fileSize int64, err error)
- func (this *Instance) OnRequestShutdown(c *routing.Context) error
- func (this *Instance) OnRequestStartup(c *routing.Context) error
- func (this *Instance) OnShutdown(ctx context.Context) (context.Context, error)
- func (this *Instance) OnStartup(ctx context.Context) (context.Context, error)
- func (this *Instance) SetDefaultLogFunc(defaultLogFunc LogFunc)
- func (this *Instance) WildcardMatch(pattern, subject string) bool
- type LogFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Instance ¶
type Instance struct {
CustomDefaultLogFunc LogFunc
}
func NewInstance ¶
func NewInstance() *Instance
func (*Instance) DefaultLogFunc ¶
func (*Instance) DiscardLogFunc ¶
func (*Instance) GetCachedFile ¶
func (*Instance) GetServerAddress ¶
func (*Instance) InArrayString ¶
inArray 判断字符串是否存在数组中
func (*Instance) InMapString ¶
func (*Instance) NewTemporaryFile ¶
func (*Instance) OnRequestShutdown ¶
func (*Instance) OnRequestStartup ¶
func (*Instance) OnShutdown ¶
func (*Instance) SetDefaultLogFunc ¶
func (*Instance) WildcardMatch ¶
Click to show internal directories.
Click to hide internal directories.