apikey

package
v1.64.2 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: AGPL-3.0 Imports: 12 Imported by: ? 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 Entry

type Entry struct {
	Index  int
	Key    string
	Secret string
	Fields map[string]string
}

func (*Entry) Get

func (e *Entry) Get(field string) (val string, ok bool)

func (*Entry) GetKeySecret

func (e *Entry) GetKeySecret() (key, secret string)

func (*Entry) String

func (e *Entry) String() string

type EnvKeyLoader

type EnvKeyLoader struct {
	Prefix  string
	Postfix string

	RequiredFields []string
	AllowPartial   bool
	// contains filtered or unexported fields
}

func NewEnvKeyLoader

func NewEnvKeyLoader(prefix, postfix string, fields ...string) *EnvKeyLoader

func (*EnvKeyLoader) Load

func (l *EnvKeyLoader) Load(envVars []string) (*Source, error)

Load loads the environment variables and returns a Source object. call Load(os.Environ())

type RandomBalancer

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

func NewRandomBalancer

func NewRandomBalancer(source *Source) *RandomBalancer

func (*RandomBalancer) GetStats

func (b *RandomBalancer) GetStats() map[int]float64

func (*RandomBalancer) Next

func (b *RandomBalancer) Next() *Entry

type RoundTripBalancer

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

func NewRoundTripBalancer

func NewRoundTripBalancer(source *Source) *RoundTripBalancer

func (*RoundTripBalancer) GetStats

func (b *RoundTripBalancer) GetStats() map[int]float64

func (*RoundTripBalancer) Next

func (b *RoundTripBalancer) Next() *Entry

func (*RoundTripBalancer) Peek

func (b *RoundTripBalancer) Peek() *Entry

func (*RoundTripBalancer) Reset

func (b *RoundTripBalancer) Reset()

type Source

type Source struct {
	Entries []Entry
}

func NewSourceFromArray

func NewSourceFromArray(data [][]string) *Source

func (*Source) Add

func (s *Source) Add(entry Entry)

func (*Source) Get

func (s *Source) Get(index int) *Entry

func (*Source) Len

func (s *Source) Len() int

Jump to

Keyboard shortcuts

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