internal

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthResponseXML

type AuthResponseXML struct {
	Name         xml.Name     `xml:",any"`
	Authorized   bool         `xml:"authorized,omitempty"`
	Reason       string       `xml:"reason,omitempty"`
	Code         string       `xml:"code,attr,omitempty"`
	Hierarchy    HierarchyXML `xml:"hierarchy"`
	UsageReports struct {
		Reports []UsageReportXML `xml:"usage_report"`
	} `xml:"usage_reports"`
}

AuthResponseXML formatted response from backend API for Authorize and AuthRep

type HierarchyXML

type HierarchyXML struct {
	Metric []struct {
		Name     string `xml:"name,attr"`
		Children string `xml:"children,attr"`
	} `xml:"metric"`
}

HierarchyXML encapsulates the return value when using "hierarchy" extension

type ReportErrorXML

type ReportErrorXML struct {
	XMLName xml.Name `xml:"error"`
	Text    string   `xml:",chardata"`
	Code    string   `xml:"code,attr"`
}

ReportErrorXML captures the XML response from Report endpoint when not status 202

type StatusResponse

type StatusResponse struct {
	Status  string `json:"status"`
	Version struct {
		Backend string `json:"backend"`
	} `json:"version"`
}

StatusResponse from the "/status" endpoint

type UsageReportXML

type UsageReportXML struct {
	Metric       string     `xml:"metric,attr"`
	Period       api.Period `xml:"period,attr"`
	PeriodStart  string     `xml:"period_start"`
	PeriodEnd    string     `xml:"period_end"`
	MaxValue     int        `xml:"max_value"`
	CurrentValue int        `xml:"current_value"`
}

UsageReportXML captures the XML response for rate limiting details

Jump to

Keyboard shortcuts

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