github.com/sacloud/iaas-api-go@v1.12.0/types/disk_encryption_algorithm.go (about) 1 // Copyright 2022-2023 The sacloud/iaas-api-go Authors 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 package types 16 17 // EDiskEncryptionAlgorithm ディスク暗号化アルゴリズム 18 type EDiskEncryptionAlgorithm string 19 20 // String EDiskEncryptionAlgorithmの文字列表現 21 func (c EDiskEncryptionAlgorithm) String() string { 22 return string(c) 23 } 24 25 var ( 26 // DiskEncryptionAlgorithms ディスク接続方法 27 DiskEncryptionAlgorithms = struct { 28 // None unencrypted 29 None EDiskEncryptionAlgorithm 30 // AES256XTS aes256_xts 31 AES256XTS EDiskEncryptionAlgorithm 32 }{ 33 None: EDiskEncryptionAlgorithm("none"), 34 AES256XTS: EDiskEncryptionAlgorithm("aes256_xts"), 35 } 36 37 // DiskEncryptionAlgorithmMap 文字列とDiskEncryptionAlgorithmのマップ 38 DiskEncryptionAlgorithmMap = map[string]EDiskEncryptionAlgorithm{ 39 DiskEncryptionAlgorithms.None.String(): DiskEncryptionAlgorithms.None, 40 DiskEncryptionAlgorithms.AES256XTS.String(): DiskEncryptionAlgorithms.AES256XTS, 41 } 42 43 // DiskEncryptionAlgorithmStrings DiskEncryptionAlgorithmに指定できる有効な文字列 44 DiskEncryptionAlgorithmStrings = []string{ 45 DiskEncryptionAlgorithms.None.String(), 46 DiskEncryptionAlgorithms.AES256XTS.String(), 47 } 48 )