traffic

package
v6.18.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Information

type Information struct {
	// The end date in 'Y-m-d' format
	EndDate rest.Date `json:"endDate"`
	// The maximum amount of bytes that can be used in this period
	MaxInBytes int64 `json:"maxInBytes"`
	// The start date in 'Y-m-d' format
	StartDate rest.Date `json:"startDate"`
	// The usage in bytes for this period
	UsedInBytes int64 `json:"usedInBytes"`
	// The usage in bytes
	UsedTotalBytes int64 `json:"usedTotalBytes"`
}

Information struct wrapping the traffic information

type Repository

type Repository repository.RestRepository

Repository allows you to get information about your usage in your traffic pool you can retrieve this information globally or per vps

func (*Repository) GetTrafficInformationForVps

func (r *Repository) GetTrafficInformationForVps(vpsName string) (Information, error)

GetTrafficInformationForVps allows you to get specific traffic information for a given VPS

func (*Repository) GetTrafficPool

func (r *Repository) GetTrafficPool() (Information, error)

GetTrafficPool returns all the traffic of your VPSes combined, overusage will also be billed based on this information

Jump to

Keyboard shortcuts

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