redis

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRedisAuth added in v0.4.5

func NewRedisAuth(ctx context.Context, config *conf.GlobalConfig) (stat.Authenticator, error)

Types

type RedisAuthenticator added in v0.4.5

type RedisAuthenticator struct {
	stat.Authenticator
	// contains filtered or unexported fields
}

func (*RedisAuthenticator) AddUser added in v0.4.5

func (a *RedisAuthenticator) AddUser(hash string) error

func (*RedisAuthenticator) AuthUser added in v0.4.5

func (a *RedisAuthenticator) AuthUser(hash string) (bool, stat.User)

func (*RedisAuthenticator) DelUser added in v0.4.5

func (a *RedisAuthenticator) DelUser(hash string) error

func (*RedisAuthenticator) ListUsers added in v0.4.5

func (a *RedisAuthenticator) ListUsers() []stat.User

type RedisUser added in v0.4.12

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

func (*RedisUser) AddIP added in v0.4.12

func (m *RedisUser) AddIP(string) bool

func (*RedisUser) AddTraffic added in v0.4.12

func (m *RedisUser) AddTraffic(sent, recv int)

func (*RedisUser) Close added in v0.4.12

func (m *RedisUser) Close() error

func (*RedisUser) DelIP added in v0.4.12

func (m *RedisUser) DelIP(string) bool

func (*RedisUser) GetAndResetTraffic added in v0.4.12

func (m *RedisUser) GetAndResetTraffic() (uint64, uint64)

func (*RedisUser) GetIP added in v0.5.0

func (u *RedisUser) GetIP() int

func (*RedisUser) GetIPLimit added in v0.4.12

func (m *RedisUser) GetIPLimit() int

func (*RedisUser) GetSpeed added in v0.4.12

func (m *RedisUser) GetSpeed() (uint64, uint64)

func (*RedisUser) GetSpeedLimit added in v0.4.12

func (m *RedisUser) GetSpeedLimit() (send, recv int)

func (*RedisUser) GetTraffic added in v0.4.12

func (m *RedisUser) GetTraffic() (uint64, uint64)

func (*RedisUser) Hash added in v0.4.12

func (m *RedisUser) Hash() string

func (*RedisUser) ResetTraffic added in v0.4.12

func (m *RedisUser) ResetTraffic()

func (*RedisUser) SetIPLimit added in v0.4.12

func (m *RedisUser) SetIPLimit(int)

func (*RedisUser) SetSpeedLimit added in v0.4.12

func (m *RedisUser) SetSpeedLimit(send, recv int)

Jump to

Keyboard shortcuts

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