module

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewJWT added in v0.4.0

func NewJWT(name string, cfg JWTConfig) interfaces.IModules

Types

type JWT added in v0.4.0

type JWT struct {
	Cfg  JWTConfig
	Name string
	// contains filtered or unexported fields
}

JWT openssl genrsa -out private.key 2048

func (*JWT) GenerateToken added in v0.4.0

func (t *JWT) GenerateToken(data jwt.MapClaims) (string, error)

func (*JWT) Init added in v0.4.0

func (t *JWT) Init(_ interfaces.IEngine) error

func (*JWT) Stop added in v0.4.0

func (t *JWT) Stop() error

func (*JWT) String added in v0.4.0

func (t *JWT) String() string

type JWTConfig added in v0.4.0

type JWTConfig struct {
	PrivateKey string        `yaml:"public_key"`
	Expire     time.Duration `yaml:"expire"`
}

type Mock

type Mock struct {
	Name string
}

func (*Mock) Init

func (t *Mock) Init(_ interfaces.IEngine) error

func (*Mock) Stop

func (t *Mock) Stop() error

func (*Mock) String

func (t *Mock) String() string

Jump to

Keyboard shortcuts

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