Documentation ¶
Overview ¶
Copyright © 2023 Nils Knieling <https://github.com/Cyclenerd>
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.
Copyright © 2023 Nils Knieling <https://github.com/Cyclenerd>
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.
Copyright © 2023 Nils Knieling <https://github.com/Cyclenerd>
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.
Copyright © 2023 Nils Knieling <https://github.com/Cyclenerd>
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.
Copyright © 2023 Nils Knieling <https://github.com/Cyclenerd>
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.
Copyright © 2023 Nils Knieling <https://github.com/Cyclenerd>
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.
Copyright © 2023 Nils Knieling <https://github.com/Cyclenerd>
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.
Index ¶
- Variables
- func CalcComputeDisk(pricingYml StructPricing, inputName string, inputStorageType string, ...) float32
- func CalcComputeInstance(pricingYml StructPricing, inputName string, inputMachineType string, ...) float32
- func CalcComputeLicense(pricingYml StructPricing, inputName string, inputMachineType string, ...) float32
- func CalcComputeNetworkIp(pricingYml StructPricing, inputName string, inputExternalIp int, ...) float32
- func CalcComputeNetworkNatGateway(pricingYml StructPricing, inputName string, inputData float32, ...) float32
- func CalcComputeNetworkTrafficEgress(pricingYml StructPricing, inputName string, inputWorld float32, ...) float32
- func CalcComputeNetworkVpnTunnel(pricingYml StructPricing, inputName string, inputRegion string, ...) float32
- func CalcMonitoring(pricingYml StructPricing, inputName string, inputData float32, ...) float32
- func CalcStorageBucket(pricingYml StructPricing, inputName string, inputStorageClass string, ...) float32
- func CheckRegion(pricingYml StructPricing, inputRegion string) bool
- func ExportCsv(lineItems []LineItem, inputExportCsv string)
- func Hour(cost Cost) float32
- func HourSpot(cost Cost) float32
- func Month(cost Cost) float32
- func Month1Y(cost Cost) float32
- func Month3Y(cost Cost) float32
- func MonthSpot(cost Cost) float32
- func OverwirteDefault(pricingYml StructPricing, defaultRegion string, inputRegion string, ...) (string, float32)
- func ReturnDiscount(defaultDiscount float32, inputDiscount float32) float32
- func ReturnProject(defaultProject string, inputProject string) string
- func ReturnRegion(pricingYml StructPricing, defaultRegion string, inputRegion string) string
- type Bucket
- type Cost
- func CostComputeDisk(pricingYml StructPricing, inputDiskType string, inputRegion string) Cost
- func CostComputeInstance(pricingYml StructPricing, inputMachineType string, inputRegion string) Cost
- func CostComputeLicense(pricingYml StructPricing, inputMachineType string, inputOperatingSystem string) Cost
- func CostComputeNetworkIpUnused(pricingYml StructPricing, inputRegion string) Cost
- func CostComputeNetworkIpVm(pricingYml StructPricing, inputRegion string) Cost
- func CostComputeNetworkNatData(pricingYml StructPricing, inputRegion string) Cost
- func CostComputeNetworkNatGateway(pricingYml StructPricing, inputRegion string) Cost
- func CostComputeNetworkTrafficEgressAustraliaTiB0_1(pricingYml StructPricing, inputRegion string) Cost
- func CostComputeNetworkTrafficEgressAustraliaTiB10n(pricingYml StructPricing, inputRegion string) Cost
- func CostComputeNetworkTrafficEgressAustraliaTiB1_10(pricingYml StructPricing, inputRegion string) Cost
- func CostComputeNetworkTrafficEgressChinaTiB0_1(pricingYml StructPricing, inputRegion string) Cost
- func CostComputeNetworkTrafficEgressChinaTiB10n(pricingYml StructPricing, inputRegion string) Cost
- func CostComputeNetworkTrafficEgressChinaTiB1_10(pricingYml StructPricing, inputRegion string) Cost
- func CostComputeNetworkTrafficEgressTiB0_1(pricingYml StructPricing, inputRegion string) Cost
- func CostComputeNetworkTrafficEgressTiB10n(pricingYml StructPricing, inputRegion string) Cost
- func CostComputeNetworkTrafficEgressTiB1_10(pricingYml StructPricing, inputRegion string) Cost
- func CostComputeNetworkVpnTunnel(pricingYml StructPricing, inputRegion string) Cost
- func CostMonitoringDataMiB0_100000(pricingYml StructPricing, inputRegion string) Cost
- func CostMonitoringDataMiB0_100000_250000(pricingYml StructPricing, inputRegion string) Cost
- func CostMonitoringDataMiB0_250000n(pricingYml StructPricing, inputRegion string) Cost
- func CostStorageBucket(pricingYml StructPricing, inputStorageClass string, inputRegion string) Cost
- func CostStorageRetrieval(pricingYml StructPricing, inputStorageClass string, inputRegion string) Cost
- type DualRegion
- type Instance
- type License
- type LineItem
- type MultiRegion
- type Region
- type Retrieval
- type Storage
- type StructPricing
Constants ¶
This section is empty.
Variables ¶
var CostSum float32
var File string
var LineItems []LineItem
var Project string
Functions ¶
func CalcComputeDisk ¶
func CalcComputeInstance ¶
func CalcComputeLicense ¶
func CalcComputeNetworkIp ¶
func CalcComputeNetworkVpnTunnel ¶
func CalcComputeNetworkVpnTunnel(pricingYml StructPricing, inputName string, inputRegion string, inputDiscount float32) float32
func CalcMonitoring ¶
func CalcStorageBucket ¶
func CheckRegion ¶
func CheckRegion(pricingYml StructPricing, inputRegion string) bool
func OverwirteDefault ¶
func ReturnDiscount ¶
func ReturnProject ¶
func ReturnRegion ¶
func ReturnRegion(pricingYml StructPricing, defaultRegion string, inputRegion string) string
Types ¶
type Bucket ¶
func CheckStorageBucket ¶
func CheckStorageBucket(pricingYml StructPricing, inputStorageClass string) Bucket
type Cost ¶
type Cost struct { Hour float32 HourSpot float32 `yaml:"hour_spot"` Month float32 Month1Y float32 `yaml:"month_1y"` Month3Y float32 `yaml:"month_3y"` MonthSpot float32 `yaml:"month_spot"` }
func CostComputeDisk ¶
func CostComputeDisk(pricingYml StructPricing, inputDiskType string, inputRegion string) Cost
func CostComputeInstance ¶
func CostComputeInstance(pricingYml StructPricing, inputMachineType string, inputRegion string) Cost
func CostComputeLicense ¶
func CostComputeLicense(pricingYml StructPricing, inputMachineType string, inputOperatingSystem string) Cost
func CostComputeNetworkIpUnused ¶
func CostComputeNetworkIpUnused(pricingYml StructPricing, inputRegion string) Cost
func CostComputeNetworkIpVm ¶
func CostComputeNetworkIpVm(pricingYml StructPricing, inputRegion string) Cost
func CostComputeNetworkNatData ¶
func CostComputeNetworkNatData(pricingYml StructPricing, inputRegion string) Cost
func CostComputeNetworkNatGateway ¶
func CostComputeNetworkNatGateway(pricingYml StructPricing, inputRegion string) Cost
func CostComputeNetworkTrafficEgressAustraliaTiB0_1 ¶
func CostComputeNetworkTrafficEgressAustraliaTiB0_1(pricingYml StructPricing, inputRegion string) Cost
func CostComputeNetworkTrafficEgressAustraliaTiB10n ¶
func CostComputeNetworkTrafficEgressAustraliaTiB10n(pricingYml StructPricing, inputRegion string) Cost
func CostComputeNetworkTrafficEgressAustraliaTiB1_10 ¶
func CostComputeNetworkTrafficEgressAustraliaTiB1_10(pricingYml StructPricing, inputRegion string) Cost
func CostComputeNetworkTrafficEgressChinaTiB0_1 ¶
func CostComputeNetworkTrafficEgressChinaTiB0_1(pricingYml StructPricing, inputRegion string) Cost
func CostComputeNetworkTrafficEgressChinaTiB10n ¶
func CostComputeNetworkTrafficEgressChinaTiB10n(pricingYml StructPricing, inputRegion string) Cost
func CostComputeNetworkTrafficEgressChinaTiB1_10 ¶
func CostComputeNetworkTrafficEgressChinaTiB1_10(pricingYml StructPricing, inputRegion string) Cost
func CostComputeNetworkTrafficEgressTiB0_1 ¶
func CostComputeNetworkTrafficEgressTiB0_1(pricingYml StructPricing, inputRegion string) Cost
func CostComputeNetworkTrafficEgressTiB10n ¶
func CostComputeNetworkTrafficEgressTiB10n(pricingYml StructPricing, inputRegion string) Cost
func CostComputeNetworkTrafficEgressTiB1_10 ¶
func CostComputeNetworkTrafficEgressTiB1_10(pricingYml StructPricing, inputRegion string) Cost
func CostComputeNetworkVpnTunnel ¶
func CostComputeNetworkVpnTunnel(pricingYml StructPricing, inputRegion string) Cost
func CostMonitoringDataMiB0_100000 ¶
func CostMonitoringDataMiB0_100000(pricingYml StructPricing, inputRegion string) Cost
func CostMonitoringDataMiB0_100000_250000 ¶
func CostMonitoringDataMiB0_100000_250000(pricingYml StructPricing, inputRegion string) Cost
func CostMonitoringDataMiB0_250000n ¶
func CostMonitoringDataMiB0_250000n(pricingYml StructPricing, inputRegion string) Cost
func CostStorageBucket ¶
func CostStorageBucket(pricingYml StructPricing, inputStorageClass string, inputRegion string) Cost
func CostStorageRetrieval ¶
func CostStorageRetrieval(pricingYml StructPricing, inputStorageClass string, inputRegion string) Cost
type DualRegion ¶
type DualRegion struct {
Regions []string
}
type Instance ¶
func CheckComputeInstance ¶
func CheckComputeInstance(pricingYml StructPricing, inputMachineType string) Instance
type License ¶
func CheckComputeLicense ¶
func CheckComputeLicense(pricingYml StructPricing, inputMachineType string) License
type MultiRegion ¶
type MultiRegion struct {
Description string
}
type Retrieval ¶
func CheckStorageRetrieval ¶
func CheckStorageRetrieval(pricingYml StructPricing, inputStorageClass string) Retrieval
type Storage ¶
func CheckComputeDisk ¶
func CheckComputeDisk(pricingYml StructPricing, inputDiskType string) Storage
type StructPricing ¶
type StructPricing struct { About struct { Copyright string Generated string Timestamp string Url string } Region map[string]Region DualRegion map[string]DualRegion `yaml:"dual-region"` MultiRegion map[string]MultiRegion `yaml:"multi-region"` Monitoring struct { Data struct { Cost struct { MiB0_100000 map[string]Cost `yaml:"0-100000"` MiB0_100000_250000 map[string]Cost `yaml:"100000-250000"` MiB0_250000n map[string]Cost `yaml:"250000n"` } } } Storage struct { Bucket map[string]Bucket Retrieval map[string]Retrieval } Compute struct { Storage map[string]Storage Instance map[string]Instance License map[string]License Network struct { Ip struct { Unused struct { Cost map[string]Cost } Vm struct { Cost map[string]Cost } } Vpn struct { Tunnel struct { Cost map[string]Cost } } Nat struct { Gateway struct { Cost map[string]Cost } Data struct { Cost map[string]Cost } } Traffic struct { Egress struct { Internet struct { China struct { Cost struct { TiB0_1 map[string]Cost `yaml:"0-1"` TiB1_10 map[string]Cost `yaml:"1-10"` TiB10n map[string]Cost `yaml:"10n"` } } Australia struct { Cost struct { TiB0_1 map[string]Cost `yaml:"0-1"` TiB1_10 map[string]Cost `yaml:"1-10"` TiB10n map[string]Cost `yaml:"10n"` } } Cost struct { TiB0_1 map[string]Cost `yaml:"0-1"` TiB1_10 map[string]Cost `yaml:"1-10"` TiB10n map[string]Cost `yaml:"10n"` } } } } } } }
func Yml ¶
func Yml(file string) StructPricing