users

package
v0.0.0-...-7072be7 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Source

type Source interface {
	// StartAfter positions this Source to begin iterating alphabetically after this user. If this user sorts (case
	// insensitively) outside of the first or last user, the first user is returned.
	StartAfter(user string)
	NextUser() string
	Contains(user string) bool
}

Source represents a source of usernames for rotation.

type StaticSource

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

StaticSource is a base implementation of static list of usernames.

func NewStaticSource

func NewStaticSource(users ...string) *StaticSource

NewStaticSource creates a StaticSource of all lower-cased and sorted from the specified users.

func (*StaticSource) Contains

func (ss *StaticSource) Contains(user string) bool

func (*StaticSource) NextUser

func (ss *StaticSource) NextUser() string

func (*StaticSource) StartAfter

func (ss *StaticSource) StartAfter(user string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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