secret

package
v1.23.2 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2026 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DiskFileName = "secret.txt" // 密钥存放位置
)

Variables

This section is empty.

Functions

func Get

func Get() string

Get 获取程序本地密钥, 必须先调用 Init 进行初始化

func Init

func Init() error

Init 初始化密钥, 如果磁盘中已经存在密钥 则进行复用

func Need

func Need(handler gin.HandlerFunc) gin.HandlerFunc

Need 对 api 进行 secret 校验

Types

This section is empty.

Jump to

Keyboard shortcuts

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