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 ChangeTariffRequest ¶ added in v1.0.1
type ChangeTariffRequest struct {
TariffID string `json:"tariff_id"`
}
ChangeTariffRequest contains parameters needed for tariff changing
swagger:model
type MassiveUnsubscribeTariffRequest ¶ added in v1.0.1
type MassiveUnsubscribeTariffRequest struct {
Resources []string `json:"resources"`
}
MassiveUnsubscribeTariffRequest contains parameters needed for all tariffs unsubscribing
swagger:model
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 RenameRequest ¶ added in v1.0.1
type RenameRequest struct {
ResourceLabel string `json:"resource_label"`
}
RenameRequest contains parameters needed for resource renaming
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"` Description string `json:"description,omitempty"` CreatedAt time.Time `json:"created_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 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