apihandlers

package
v1.10.1-ddls413.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HANDLERS = map[string]ApiHandler{
	"aws_uptime":       &AWSUptime{},
	"aws_costs":        &AWSCosts{},
	"github_standards": &GithubStandards{},
}

Functions

This section is empty.

Types

type AWSCosts

type AWSCosts struct{}

func (*AWSCosts) Handle

func (costs *AWSCosts) Handle(data map[string]interface{}, key string, remote *httphandler.HttpHandler, w http.ResponseWriter, r *http.Request)

func (*AWSCosts) Handles

func (costs *AWSCosts) Handles(url string) bool

func (*AWSCosts) IsYTD

func (costs *AWSCosts) IsYTD(remote *httphandler.HttpHandler) bool

IsYTD flags if this is the year to date endpoint, as this result should not get converted to rows

type AWSUptime

type AWSUptime struct{}

func (*AWSUptime) Handle

func (up *AWSUptime) Handle(data map[string]interface{}, key string, remote *httphandler.HttpHandler, w http.ResponseWriter, r *http.Request)

func (*AWSUptime) Handles

func (up *AWSUptime) Handles(url string) bool

type ApiHandler

type ApiHandler interface {
	Handles(uri string) bool
	Handle(data map[string]interface{}, key string, remote *httphandler.HttpHandler, w http.ResponseWriter, r *http.Request)
}

func Get

func Get(uri string) (apiHandler ApiHandler)

Get returns the struct to call to process the api call requried

type GithubStandards

type GithubStandards struct{}

func (*GithubStandards) Handle

func (gh *GithubStandards) Handle(data map[string]interface{}, key string, remote *httphandler.HttpHandler, w http.ResponseWriter, r *http.Request)

func (*GithubStandards) Handles

func (gh *GithubStandards) Handles(url string) bool

Jump to

Keyboard shortcuts

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