acronis

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2024 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AcronisClient

type AcronisClient struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(clientID string, secret string, dcURL string) *AcronisClient

func (*AcronisClient) GetApplication

func (c *AcronisClient) GetApplication(appId string) (ApplicationResponse, error)

func (*AcronisClient) GetTenantID

func (c *AcronisClient) GetTenantID() (string, error)

fetch tenant id

func (*AcronisClient) GetUsage

func (c *AcronisClient) GetUsage(tenantId string) (UsageResponse, error)

fetch usage data

type ApplicationResponse

type ApplicationResponse struct {
	Id   string `json:"id"`
	Name string `json:"name"`
	Type string `json:"type"`
}

type UsageItem

type UsageItem struct {
	AbsoluteValue   float64     `json:"absolute_value"`
	ApplicationID   string      `json:"application_id"`
	Edition         interface{} `json:"edition"`
	InfraID         string      `json:"infra_id"`
	MeasurementUnit string      `json:"measurement_unit"`
	Name            string      `json:"name"`
	RangeStart      string      `json:"range_start"`
	TenantID        float64     `json:"tenant_id"`
	ItemType        string      `json:"type"`
	UsageName       string      `json:"usage_name"`
	Value           float64     `json:"value"`

	// not relevant but there
	OfferingItem struct {
		Status int `json:"status"`
		Quota  struct {
			Value   interface{} `json:"value"`
			Overage interface{} `json:"overage"`
			Version int         `json:"version"`
		} `json:"quota"`
	} `json:"offering_item,omitempty"`
}

type UsageItems

type UsageItems struct {
	Tenant string      `json:"tenant"`
	Usages []UsageItem `json:"usages"`
}

type UsageResponse

type UsageResponse struct {
	Items []UsageItems `json:"items"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL