// Copyright 2019 Yunion // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package identity import "yunion.io/x/onecloud/pkg/apis" type CredentialDetails struct { apis.StandaloneResourceDetails SCredential Blob string `json:"blob"` User string `json:"user"` Domain string `json:"domain"` DomainId string `json:"domain_id"` } type CredentialUpdateInput struct { apis.StandaloneResourceBaseUpdateInput // enabled Enabled *bool `json:"enabled"` // 更新 blob 内容(明文,服务端加密后写入 encrypted_blob) Blob string `json:"blob"` // 由 ValidateUpdateData 在提供 blob 时填充,不允许客户端直接传入 EncryptedBlob string `json:"encrypted_blob"` KeyHash string `json:"key_hash"` } type CredentialCreateInput struct { apis.StandaloneResourceCreateInput Type string `json:"type"` ProjectId string `json:"project_id"` UserId string `json:"user_id"` Blob string `json:"blob"` // Ignore EncryptedBlob string `json:"encrypted_blob"` // Ignore KeyHash string `json:"key_hash"` } type CredentialContainerImageBlob struct { Username string `json:"username"` Password string `json:"password"` Auth string `json:"auth"` ServerAddress string `json:"server_address,omitempty"` // IdentityToken is used to authenticate the user and get // an access token for the registry. IdentityToken string `json:"identity_token,omitempty"` // RegistryToken is a bearer token to be sent to a registry RegistryToken string `json:"registry_token,omitempty"` }