Documentation
¶
Overview ¶
Package models contains models used by services for communication with billing service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NamespaceTariff ¶
type NamespaceTariff struct {
Tariff
CPULimit int `json:"cpu_limit"`
MemoryLimit int `json:"memory_limit"`
Traffic int `json:"traffic"` // in gigabytes
TrafficPrice float64 `json:"traffic_price"` // price of overused traffic.
ExternalServices int `json:"external_services"`
InternalServices int `json:"internal_services"`
VolumeSize int `json:"volume_size"`
}
NamespaceTariff represents billing tariff for namespace If VolumeSize provided non-persistent volume will be created.
swagger:model
type ResourceType ¶
type ResourceType string
swagger:ignore
const ( Namespace ResourceType = "namespace" Volume ResourceType = "volume" )
type SubscribeTariffRequest ¶
type SubscribeTariffRequest struct {
TariffID string `json:"tariff_id"`
ResourceType ResourceType `json:"resource_type"`
ResourceLabel string `json:"resource_label"`
ResourceID string `json:"resource_id"`
}
SubscribeTariffRequest contains parameters needed for tariff subscribing
swagger:model
type Tariff ¶
type Tariff struct {
ID string `json:"id"`
Label string `json:"label"`
Price float64 `json:"price"`
Active bool `json:"is_active"`
Public bool `json:"is_public"`
BillingID int `json:"billing_id"`
Description string `json:"description,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
Tariff represents generic billing tariff for resource If tariff is public it available for all users. If tariff not public it available only for admins.
swagger:ignore
type UnsubscribeTariffRequest ¶
type UnsubscribeTariffRequest struct {
ResourceID string `json:"resource_id"`
}
UnsubscribeTariffRequest contains parameters needed for tariff unsubscribing
swagger:model
type VolumeTariff ¶
type VolumeTariff struct {
Tariff
StorageLimit int `json:"storage_limit"` // in gigabytes
ReplicasLimit int `json:"replicas_limit"`
}
VolumeTariff represents billing tariff for (persistent) volume
swagger:model