api

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BytesUsage

type BytesUsage struct {
	In  uint64 `json:"in"`
	Out uint64 `json:"out"`
}

type Key added in v0.11.2

type Key struct {
	Name       string      `json:"name,omitempty"`
	Key        string      `json:"key"`
	Limit      *Limit      `json:"limit,omitempty"`
	BytesUsage *BytesUsage `json:"bytesUsage,omitempty"`
}

type Limit added in v0.10.4

type Limit struct {
	Bytes     string   `json:"bytes,omitempty"`
	InBytes   string   `json:"inBytes,omitempty"`
	OutBytes  string   `json:"outBytes,omitempty"`
	Whitelist []string `json:"whitelist,omitempty"`
	Blacklist []string `json:"blacklist,omitempty"`
}

type ServerAdminClient added in v0.10.4

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

func NewServerAdminClient added in v0.10.4

func NewServerAdminClient(server, adminKey string) *ServerAdminClient

func (*ServerAdminClient) ACLDelKey added in v0.10.4

func (c *ServerAdminClient) ACLDelKey(key string) (err error)

func (*ServerAdminClient) ACLDelUsage added in v0.10.4

func (c *ServerAdminClient) ACLDelUsage(key string) (err error)

func (*ServerAdminClient) ACLGetLimit added in v0.10.4

func (c *ServerAdminClient) ACLGetLimit(key string) (l *Limit, err error)

func (*ServerAdminClient) ACLGetUsage added in v0.10.4

func (c *ServerAdminClient) ACLGetUsage(key string) (usage *BytesUsage, err error)

func (*ServerAdminClient) ACLNewKey added in v0.10.4

func (c *ServerAdminClient) ACLNewKey(name string) (key string, err error)

func (*ServerAdminClient) ACLPatchLimit added in v0.10.4

func (c *ServerAdminClient) ACLPatchLimit(key string, l *Limit) (err error)

func (*ServerAdminClient) ACLShow added in v0.11.2

func (c *ServerAdminClient) ACLShow() (keys []Key, err error)

type Stats

type Stats struct {
	BytesLimit    string              `json:"bytesLimit,omitempty"`
	InBytesLimit  string              `json:"inBytesLimit,omitempty"`
	OutBytesLimit string              `json:"outBytesLimit,omitempty"`
	BytesUsage    *BytesUsage         `json:"bytesUsage,omitempty"`
	Status        string              `json:"status"`
	Overlay       map[string][]string `json:"overlay"`
}

Jump to

Keyboard shortcuts

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