api

package
v0.12.6 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2025 License: BSD-3-Clause Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key struct {
	ID          string     `json:"ID,omitempty"`
	Key         string     `json:"key,omitempty"`
	Manual      bool       `json:"manual,omitempty"`
	ValidTo     *time.Time `json:"validTo,omitempty"`
	Limit       float64    `json:"limit,omitempty"`
	QuotaValue  float64    `json:"quotaValue,omitempty"`
	QuotaFailed float64    `json:"quotaFailed,omitempty"`
	Created     *time.Time `json:"created,omitempty"`
	Updated     *time.Time `json:"updated,omitempty"`
	LastUsed    *time.Time `json:"lastUsed,omitempty"`
	LastIP      string     `json:"lastIP,omitempty"`
	IPWhiteList string     `json:"IPWhiteList,omitempty"`
	Disabled    bool       `json:"disabled,omitempty"`
	Description string     `json:"description,omitempty"`
	Tags        []string   `json:"tags,omitempty"`
}

Key structure for key data

type KeyIn added in v0.12.6

type KeyIn struct {
	Key string `json:"key,omitempty"`
}

type KeyInfoResp

type KeyInfoResp struct {
	Key  *Key   `json:"key,omitempty"`
	Logs []*Log `json:"logs,omitempty"`
}

KeyInfoResp keep key and logs data

type Log

type Log struct {
	KeyID        string    `json:"keyID,omitempty"`
	URL          string    `json:"url,omitempty"`
	QuotaValue   float64   `json:"quotaValue,omitempty"`
	Date         time.Time `json:"date,omitempty"`
	IP           string    `json:"ip,omitempty"`
	Value        string    `json:"value,omitempty"`
	Fail         bool      `json:"fail,omitempty"`
	ResponseCode int       `json:"response,omitempty"`
	RequestID    string    `json:"requestID,omitempty"`
	ErrorMsg     string    `json:"errorMsg,omitempty"`
}

Log structure for log data

Jump to

Keyboard shortcuts

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