types

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultSession = &Session{
	TokenKey:   "sess_token",
	KeyPrefix:  "ci_session:",
	Expiration: 6 * 30 * 86400,
}
View Source
var DefaultZgin = &Zgin{
	Name:                      "zgin",
	Version:                   "1.0.0",
	VersionKey:                "app_version",
	LogDir:                    "apps/logs/go/zgin",
	SignTimeExpiration:        60,
	LogMaxTimeout:             3 * time.Second,
	SendMaxTimeout:            5 * time.Second,
	HttpServerReadTimeout:     10 * time.Second,
	HttpServerWriteTimeout:    15 * time.Second,
	HttpServerShutDownTimeout: 15 * time.Second,
	Session:                   DefaultSession,
}

Functions

This section is empty.

Types

type Session

type Session struct {
	TokenKey      string
	KeyPrefix     string
	Expiration    int64
	GetClientFunc func() *redis.Client
}

type Zgin

type Zgin struct {
	Name           string
	Version        string
	VersionKey     string
	LogDir         string
	HttpServerAddr string

	Mode                      string
	TokenKey                  string
	DevSign                   string
	ErrorRobotToken           string
	GracefulRobotToken        string
	SignTimeExpiration        int64
	LogMaxTimeout             time.Duration
	SendMaxTimeout            time.Duration
	HttpServerReadTimeout     time.Duration
	HttpServerWriteTimeout    time.Duration
	HttpServerShutDownTimeout time.Duration

	Engine  *gin.Engine
	Session *Session
}

Jump to

Keyboard shortcuts

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