Documentation
¶
Index ¶
Constants ¶
View Source
const (
MegaByte16 = 16 * 1024 * 1024
)
Variables ¶
View Source
var ( ErrXSignExpired = fmt.Errorf("接口签名已过期") ErrXSignInvalid = fmt.Errorf("接口签名无效") )
Functions ¶
This section is empty.
Types ¶
type IXSignMiddlewareOption ¶
type IXSignMiddlewareOption interface {
// contains filtered or unexported methods
}
type XSignMiddleware ¶
type XSignMiddleware struct {
// contains filtered or unexported fields
}
func NewXSignMiddleware ¶
func NewXSignMiddleware(opts ...IXSignMiddlewareOption) *XSignMiddleware
func (*XSignMiddleware) ClientHTTP ¶
func (*XSignMiddleware) ServerHTTP ¶
func (x *XSignMiddleware) ServerHTTP(next http.HandlerFunc) http.HandlerFunc
type XSignMiddlewareOptionFunc ¶
type XSignMiddlewareOptionFunc func(*XSignMiddlewareOptions)
func WithEnabled ¶
func WithEnabled(enabled bool) XSignMiddlewareOptionFunc
func WithLogger ¶
func WithLogger(log logger.Logger) XSignMiddlewareOptionFunc
func WithSignKey ¶
func WithSignKey(signKey string) XSignMiddlewareOptionFunc
type XSignMiddlewareOptions ¶
type XSignMiddlewareOptions struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.