secret

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2026 License: MIT Imports: 11 Imported by: 0

README

Secret基础设施密钥管理

更新日志

v0.4.2

  • 首次添加

v0.4.7

  • 增加多个Get类型的接口

接入手册

1. 代码中使用

由于当前版本中,密钥信息维护在nacos里,请确保应用已经对接过nacos

// 程序启动时
import (
    "github.com/SigmaGavin/slardar/secret"
)

// 这里的key请找DBA进行分配,申请流程参见 https://horizonrobotics.feishu.cn/wiki/wikcnmasLIzcnLUDttV9Tt8DqEc#Fug8dU00Mo4u2IxqbvwcEd2rnbb
secret.Init()
mysqlAddrs := secret.GetString("infra.config.mysql.AAI.uni_api")

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetString

func GetString(key string) string

func GetStringArray

func GetStringArray(key string) []string

func GetStringMap

func GetStringMap(key string) map[string]string

func Init

func Init()

Init retrieve database information from secret store

Types

This section is empty.

Jump to

Keyboard shortcuts

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