Documentation ¶
Index ¶
- type AuthService
- type BaseService
- type CipherService
- type DecryptResp
- type DecryptRespData
- type EncryptResp
- type EncryptRespData
- type GenerateKeyPairResp
- type GenerateKeyPairRespData
- type GenerateKeyPairWithKEKResp
- type GenerateKeyPairWithKEKRespData
- type GenerateWorkingKeyResp
- type GenerateWorkingKeyRespData
- type ImportKeyPairWithKEKArgs
- type ImportKeyPairWithKEKResp
- type ImportKeyPairWithKEKRespData
- type KmsService
- func (ks *KmsService) GenerateKeyPair(token string) (*GenerateKeyPairRespData, error)
- func (ks *KmsService) GenerateKeyPairWithKEK(token string, kekIndex int) (*GenerateKeyPairWithKEKRespData, error)
- func (ks *KmsService) GenerateWorkingKey(token string) (*GenerateWorkingKeyRespData, error)
- func (ks *KmsService) ImportKeyPairWithKEK(token string, args *ImportKeyPairWithKEKArgs) (*ImportKeyPairWithKEKRespData, error)
- type RandomResp
- type RandomRespData
- type SecClient
- type SecClientConfig
- type TokenResp
- type TokenRespData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthService ¶ added in v0.1.8
type AuthService struct {
Base *BaseService
}
func NewAuthService ¶ added in v0.1.8
func NewAuthService() *AuthService
type BaseService ¶ added in v0.1.8
type BaseService struct {
C *resty.Client
}
var BaseSvc *BaseService
type CipherService ¶ added in v0.1.8
type CipherService struct {
Base *BaseService
}
func NewCipherService ¶ added in v0.1.8
func NewCipherService() *CipherService
func (*CipherService) Decrypt ¶ added in v0.1.8
func (cs *CipherService) Decrypt(token string, data string) (*DecryptRespData, error)
func (*CipherService) Encrypt ¶ added in v0.1.8
func (cs *CipherService) Encrypt(token string, keyId string, data string) (*EncryptRespData, error)
func (*CipherService) Random ¶ added in v0.1.8
func (cs *CipherService) Random(token string, len int) (*RandomRespData, error)
type DecryptResp ¶ added in v0.1.8
type DecryptResp struct { Code int `json:"code"` Msg string `json:"msg"` Data *DecryptRespData `json:"data"` }
type DecryptRespData ¶ added in v0.1.3
type DecryptRespData struct {
Data string `json:"data"`
}
type EncryptResp ¶ added in v0.1.8
type EncryptResp struct { Code int `json:"code"` Msg string `json:"msg"` Data *EncryptRespData `json:"data"` }
type EncryptRespData ¶ added in v0.1.3
type EncryptRespData struct {
EncData string `json:"enc_data"`
}
type GenerateKeyPairResp ¶ added in v0.1.8
type GenerateKeyPairResp struct { Code int `json:"code"` Msg string `json:"msg"` Data *GenerateKeyPairRespData `json:"data"` }
type GenerateKeyPairRespData ¶
type GenerateKeyPairWithKEKResp ¶ added in v0.1.8
type GenerateKeyPairWithKEKResp struct { Code int `json:"code"` Msg string `json:"msg"` Data *GenerateKeyPairWithKEKRespData `json:"data"` }
type GenerateKeyPairWithKEKRespData ¶ added in v0.1.3
type GenerateWorkingKeyResp ¶ added in v0.1.8
type GenerateWorkingKeyResp struct { Code int `json:"code"` Msg string `json:"msg"` Data *GenerateWorkingKeyRespData `json:"data"` }
type ImportKeyPairWithKEKArgs ¶ added in v0.1.8
type ImportKeyPairWithKEKResp ¶ added in v0.1.8
type ImportKeyPairWithKEKResp struct { Code int `json:"code"` Msg string `json:"msg"` Data *ImportKeyPairWithKEKRespData `json:"data"` }
type ImportKeyPairWithKEKRespData ¶ added in v0.1.3
type ImportKeyPairWithKEKRespData struct {
ID int `json:"id"`
}
type KmsService ¶ added in v0.1.8
type KmsService struct {
Base *BaseService
}
func NewKmsService ¶ added in v0.1.8
func NewKmsService() *KmsService
func (*KmsService) GenerateKeyPair ¶ added in v0.1.8
func (ks *KmsService) GenerateKeyPair(token string) (*GenerateKeyPairRespData, error)
func (*KmsService) GenerateKeyPairWithKEK ¶ added in v0.1.8
func (ks *KmsService) GenerateKeyPairWithKEK(token string, kekIndex int) (*GenerateKeyPairWithKEKRespData, error)
func (*KmsService) GenerateWorkingKey ¶ added in v0.1.8
func (ks *KmsService) GenerateWorkingKey(token string) (*GenerateWorkingKeyRespData, error)
func (*KmsService) ImportKeyPairWithKEK ¶ added in v0.1.8
func (ks *KmsService) ImportKeyPairWithKEK(token string, args *ImportKeyPairWithKEKArgs) (*ImportKeyPairWithKEKRespData, error)
type RandomResp ¶ added in v0.1.8
type RandomResp struct { Code int `json:"code"` Msg string `json:"msg"` Data *RandomRespData `json:"data"` }
type RandomRespData ¶ added in v0.1.5
type RandomRespData struct {
Data string `json:"data"`
}
type SecClient ¶ added in v0.1.8
type SecClient struct { Config *SecClientConfig AuthApi *AuthService CipherApi *CipherService KmsApi *KmsService }
func NewSecClient ¶ added in v0.1.8
func NewSecClient(config *SecClientConfig) *SecClient
type SecClientConfig ¶ added in v0.1.8
type SecClientConfig struct {
ServerUrl string
}
type TokenResp ¶ added in v0.1.8
type TokenResp struct { Code int `json:"code"` Msg string `json:"msg"` Data TokenRespData `json:"data"` }
type TokenRespData ¶ added in v0.1.8
Click to show internal directories.
Click to hide internal directories.