Documentation ¶
Index ¶
- Variables
- func CacheExpires(r *http.Response) time.Time
- type APIClient
- type APIKey
- type APIResponse
- type AuthApiService
- type AuthOpts
- type AuthRespData
- type BasicAuth
- type CipherApiService
- func (a *CipherApiService) Decrypt(ctx context.Context, localVarOptionals *DecryptOpts) (*DecryptRespData, error)
- func (a *CipherApiService) Encrypt(ctx context.Context, localVarOptionals *EncryptOpts) (*EncryptRespData, error)
- func (a *CipherApiService) Random(ctx context.Context, localVarOptionals *RandomOpts) (*RandomRespData, error)
- type Configuration
- type DecryptOpts
- type DecryptRespData
- type EncryptOpts
- type EncryptRespData
- type GenerateKeyPairOpts
- type GenerateKeyPairRespData
- type GenerateKeyPairWithKEKOpts
- type GenerateKeyPairWithKEKRespData
- type GenerateWorkingKeyOpts
- type GenerateWorkingKeyRespData
- type GenericSwaggerError
- type ImportKeyPairWithKEKOpts
- type ImportKeyPairWithKEKRespData
- type KmsApiExtService
- func (a *KmsApiExtService) GenerateKeyPairWithKEK(ctx context.Context, localVarOptionals *GenerateKeyPairWithKEKOpts) (*GenerateKeyPairWithKEKRespData, error)
- func (a *KmsApiExtService) ImportKeyPairWithKEK(ctx context.Context, localVarOptionals *ImportKeyPairWithKEKOpts) (*ImportKeyPairWithKEKRespData, error)
- type KmsApiService
- type RandomOpts
- type RandomRespData
Constants ¶
This section is empty.
Variables ¶
var ( // ContextOAuth2 takes a oauth2.TokenSource as authentication for the request. ContextOAuth2 = contextKey("token") // ContextBasicAuth takes BasicAuth as authentication for the request. ContextBasicAuth = contextKey("basic") // ContextAccessToken takes a string oauth2 access token as authentication for the request. ContextAccessToken = contextKey("accesstoken") // ContextAPIKey takes an APIKey as authentication for the request ContextAPIKey = contextKey("apikey") )
Functions ¶
Types ¶
type APIClient ¶
type APIClient struct { // API Services AuthApi *AuthApiService KmsApi *KmsApiService KmsExtApi *KmsApiExtService CipherApi *CipherApiService // contains filtered or unexported fields }
APIClient manages communication with the Secloud Open API API v1.2.0 In most cases there should be only one, shared, APIClient.
func NewAPIClient ¶
func NewAPIClient(cfg *Configuration) *APIClient
NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.
func (*APIClient) ChangeBasePath ¶
Change base path to allow switching to mocks
type APIKey ¶
APIKey provides API key based authentication to a request passed via context using ContextAPIKey
type APIResponse ¶
type APIResponse struct { Message string `json:"msg,omitempty"` Code int `json:"code,omitempty"` Data interface{} `json:"data"` }
func NewAPIResponse ¶
func NewAPIResponse(r *http.Response, d interface{}) (*APIResponse, error)
type AuthApiService ¶
type AuthApiService service
func (*AuthApiService) Token ¶
func (a *AuthApiService) Token(ctx context.Context, localVarOptionals *AuthOpts) (*AuthRespData, error)
type AuthRespData ¶
type BasicAuth ¶
type BasicAuth struct { UserName string `json:"userName,omitempty"` Password string `json:"password,omitempty"` }
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
type CipherApiService ¶ added in v0.1.3
type CipherApiService service
func (*CipherApiService) Decrypt ¶ added in v0.1.3
func (a *CipherApiService) Decrypt(ctx context.Context, localVarOptionals *DecryptOpts) (*DecryptRespData, error)
func (*CipherApiService) Encrypt ¶ added in v0.1.3
func (a *CipherApiService) Encrypt(ctx context.Context, localVarOptionals *EncryptOpts) (*EncryptRespData, error)
func (*CipherApiService) Random ¶ added in v0.1.5
func (a *CipherApiService) Random(ctx context.Context, localVarOptionals *RandomOpts) (*RandomRespData, error)
type Configuration ¶
type Configuration struct { BasePath string `json:"basePath,omitempty"` Host string `json:"host,omitempty"` Scheme string `json:"scheme,omitempty"` DefaultHeader map[string]string `json:"defaultHeader,omitempty"` UserAgent string `json:"userAgent,omitempty"` HTTPClient *http.Client }
func NewConfiguration ¶
func NewConfiguration(basePath string) *Configuration
func (*Configuration) AddDefaultHeader ¶
func (c *Configuration) AddDefaultHeader(key string, value string)
type DecryptOpts ¶ added in v0.1.3
type DecryptRespData ¶ added in v0.1.3
type DecryptRespData struct {
Data string `json:"data"`
}
type EncryptOpts ¶ added in v0.1.3
type EncryptRespData ¶ added in v0.1.3
type EncryptRespData struct {
EncData string `json:"enc_data"`
}
type GenerateKeyPairOpts ¶
type GenerateKeyPairOpts struct { }
type GenerateKeyPairRespData ¶
type GenerateKeyPairRespData struct {
Index int `json:"index"`
}
type GenerateKeyPairWithKEKOpts ¶ added in v0.1.3
type GenerateKeyPairWithKEKRespData ¶ added in v0.1.3
type GenerateWorkingKeyOpts ¶
type GenerateWorkingKeyOpts struct { }
type GenericSwaggerError ¶
type GenericSwaggerError struct {
// contains filtered or unexported fields
}
GenericSwaggerError Provides access to the body, error and model on returned errors.
func (GenericSwaggerError) Body ¶
func (e GenericSwaggerError) Body() []byte
Body returns the raw bytes of the response
func (GenericSwaggerError) Error ¶
func (e GenericSwaggerError) Error() string
Error returns non-empty string if there was an error.
func (GenericSwaggerError) Model ¶
func (e GenericSwaggerError) Model() interface{}
Model returns the unpacked model of the error
type ImportKeyPairWithKEKOpts ¶ added in v0.1.3
type ImportKeyPairWithKEKRespData ¶ added in v0.1.3
type ImportKeyPairWithKEKRespData struct {
Id int `json:"id"`
}
type KmsApiExtService ¶ added in v0.1.3
type KmsApiExtService service
func (*KmsApiExtService) GenerateKeyPairWithKEK ¶ added in v0.1.3
func (a *KmsApiExtService) GenerateKeyPairWithKEK(ctx context.Context, localVarOptionals *GenerateKeyPairWithKEKOpts) (*GenerateKeyPairWithKEKRespData, error)
func (*KmsApiExtService) ImportKeyPairWithKEK ¶ added in v0.1.3
func (a *KmsApiExtService) ImportKeyPairWithKEK(ctx context.Context, localVarOptionals *ImportKeyPairWithKEKOpts) (*ImportKeyPairWithKEKRespData, error)
type KmsApiService ¶
type KmsApiService service
func (*KmsApiService) GenerateKeyPair ¶
func (a *KmsApiService) GenerateKeyPair(ctx context.Context, localVarOptionals *GenerateKeyPairOpts) (*GenerateKeyPairRespData, error)
func (*KmsApiService) GenerateWorkingKey ¶
func (a *KmsApiService) GenerateWorkingKey(ctx context.Context, localVarOptionals *GenerateWorkingKeyOpts) (*GenerateWorkingKeyRespData, error)
type RandomOpts ¶ added in v0.1.5
type RandomRespData ¶ added in v0.1.5
type RandomRespData struct {
Data string `json:"data"`
}