github.com/sacloud/iaas-api-go@v1.12.0/types/disk_connection.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 // EDiskConnection ディスク接続方法 18 type EDiskConnection string 19 20 // String EDiskConnectionの文字列表現 21 func (c EDiskConnection) String() string { 22 return string(c) 23 } 24 25 var ( 26 // DiskConnections ディスク接続方法 27 DiskConnections = struct { 28 // VirtIO virtio 29 VirtIO EDiskConnection 30 // IDE ide 31 IDE EDiskConnection 32 }{ 33 VirtIO: EDiskConnection("virtio"), 34 IDE: EDiskConnection("ide"), 35 } 36 37 // DiskConnectionMap 文字列とDiskConnectionのマップ 38 DiskConnectionMap = map[string]EDiskConnection{ 39 DiskConnections.VirtIO.String(): DiskConnections.VirtIO, 40 DiskConnections.IDE.String(): DiskConnections.IDE, 41 } 42 43 // DiskConnectionStrings DiskConnectionに指定できる有効な文字列 44 DiskConnectionStrings = []string{ 45 DiskConnections.VirtIO.String(), 46 DiskConnections.IDE.String(), 47 } 48 )