Documentation
¶
Overview ¶
* @Description: * @Autor: liujinyin * @Date: 2021-06-28 18:40:43 * @LastEditors: liujinyin * @LastEditTime: 2021-07-02 19:58:33
Index ¶
- func GetSecretCache(euid string) (data types.XMap, err error)
- type CertResponse
- type CertSecret
- func (s *CertSecret) Disable(euid string) (res *CertResponse, err error)
- func (s *CertSecret) Enable(euid string) (res *CertResponse, err error)
- func (s *CertSecret) Generate(euid string, item *models.Item) (res *CertResponse, err error)
- func (s *CertSecret) Get(euid string) (res *CertResponse, err error)
- func (s *CertSecret) Reset(euid string, item *models.Item) (res *CertResponse, err error)
- func (s *CertSecret) Set(euid string, item *models.Item) (res *CertResponse, err error)
- type DBSecret
- type GeneralSecret
- func (s *GeneralSecret) Disable(euid, secretType string) (res *Response, err error)
- func (s *GeneralSecret) Enable(euid, secretType string) (res *Response, err error)
- func (s *GeneralSecret) Generate(euid, secretType string) (res *Response, err error)
- func (s *GeneralSecret) Get(euid string, secretType ...string) (res *models.Item, err error)
- func (s *GeneralSecret) Reset(euid, secretType string, item *models.Item) (res *Response, err error)
- func (s *GeneralSecret) Set(euid, secretType, secret string, expireTime string) (res *Response, err error)
- type ISecret
- type RSAResponse
- type RSASecret
- func (s *RSASecret) Disable(euid string) (res *RSAResponse, err error)
- func (s *RSASecret) Enable(euid string) (res *RSAResponse, err error)
- func (s *RSASecret) Generate(euid string, item *models.Item) (res *RSAResponse, err error)
- func (s *RSASecret) Get(euid string) (res *RSAResponse, err error)
- func (s *RSASecret) Reset(euid string, item *models.Item) (res *RSAResponse, err error)
- func (s *RSASecret) Set(euid string, item *models.Item) (res *RSAResponse, err error)
- type Response
- type Secret
- func (s *Secret) Disable(euid, sType string) (res interface{}, err error)
- func (s *Secret) Enable(euid, sType string) (res interface{}, err error)
- func (s *Secret) Generate(euid, sType string, item *models.Item) (interface{}, error)
- func (s *Secret) Get(euid string, sType ...string) (interface{}, error)
- func (s *Secret) Reset(euid, sType string, item *models.Item) (res interface{}, err error)
- func (s *Secret) Set(euid, sType string, item *models.Item) (res interface{}, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CertResponse ¶
type CertResponse struct {
UID string `json:"uid"`
MerchantCert string `json:"mer_cert,omitempty"`
SupplierCert string `json:"spl_cert,omitempty"`
RootCert string `json:"root_cert,omitempty"`
CertKey string `json:"cert_key,omitempty"`
Status string `json:"status"`
Time string `json:"time"`
ExpireTime string `json:"expire_time"`
}
type CertSecret ¶
type CertSecret struct {
// contains filtered or unexported fields
}
CertSecret 对象
func (*CertSecret) Disable ¶
func (s *CertSecret) Disable(euid string) (res *CertResponse, err error)
Disable Cert密钥禁用
func (*CertSecret) Enable ¶
func (s *CertSecret) Enable(euid string) (res *CertResponse, err error)
Enable Cert密钥启用
func (*CertSecret) Generate ¶
func (s *CertSecret) Generate(euid string, item *models.Item) (res *CertResponse, err error)
Generate Cert密钥生成
func (*CertSecret) Get ¶
func (s *CertSecret) Get(euid string) (res *CertResponse, err error)
Get Cert密钥获取
func (*CertSecret) Reset ¶
func (s *CertSecret) Reset(euid string, item *models.Item) (res *CertResponse, err error)
Reset Cert密钥重置
func (*CertSecret) Set ¶
func (s *CertSecret) Set(euid string, item *models.Item) (res *CertResponse, err error)
Set Cert密钥设置
type GeneralSecret ¶
type GeneralSecret struct {
// contains filtered or unexported fields
}
GeneralSecret 对象
func (*GeneralSecret) Disable ¶
func (s *GeneralSecret) Disable(euid, secretType string) (res *Response, err error)
Disable 一般密钥禁用(md5,sha1,sha256,sha512,hmac,aes,des适用)
func (*GeneralSecret) Enable ¶
func (s *GeneralSecret) Enable(euid, secretType string) (res *Response, err error)
Enable 一般密钥启用(md5,sha1,sha256,sha512,hmac,aes,des适用)
func (*GeneralSecret) Generate ¶
func (s *GeneralSecret) Generate(euid, secretType string) (res *Response, err error)
Generate 一般密钥生成(md5,sha1,sha256,sha512,hmac,aes,des适用)
type ISecret ¶
type ISecret interface {
Generate(euid, sType string, item *models.Item) (interface{}, error)
Get(euid string, sType ...string) (interface{}, error)
Reset(euid, sType string, item *models.Item) (res interface{}, err error)
Enable(euid, sType string) (res interface{}, err error)
Disable(euid, sType string) (res interface{}, err error)
Set(euid, sType string, item *models.Item) (res interface{}, err error)
}
ISecret 接口
type RSAResponse ¶
type RSAResponse struct {
UID string `json:"uid"`
PublicSecret string `json:"pubilc_secret"`
PrivateSecret string `json:"private_secret"`
Status string `json:"status"`
Time string `json:"time"`
ExpireTime string `json:"expire_time"`
PkcsType string `json:"pkcs_type"`
Bits int `json:"bits"`
}
RSAResponse RSA返回信息
type RSASecret ¶
type RSASecret struct {
// contains filtered or unexported fields
}
RSASecret 对象
func (*RSASecret) Disable ¶
func (s *RSASecret) Disable(euid string) (res *RSAResponse, err error)
Disable RSA密钥禁用
func (*RSASecret) Enable ¶
func (s *RSASecret) Enable(euid string) (res *RSAResponse, err error)
Enable RSA密钥启用
func (*RSASecret) Get ¶
func (s *RSASecret) Get(euid string) (res *RSAResponse, err error)
Get RSA密钥获取
type Response ¶
type Response struct {
UID string `json:"uid"`
Secret string `json:"secret"`
Status string `json:"status"`
Time string `json:"time"`
}
Response 返回信息
Click to show internal directories.
Click to hide internal directories.