usermap

package
v0.0.0-...-c01f1ba Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2022 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 UserMap

type UserMap map[string]*server.User

func NewMap

func NewMap() UserMap

func (UserMap) AddUser

func (u UserMap) AddUser(name, cipher, password, port string) error

func (UserMap) DeleteUser

func (u UserMap) DeleteUser(name string)

func (UserMap) Exists

func (u UserMap) Exists(name string) bool

func (UserMap) GetAll

func (u UserMap) GetAll(executor func(name string, traffic uint64, usedtime int64))

func (UserMap) GetUser

func (u UserMap) GetUser(name string) (uint64, int64)

func (UserMap) GetUserTraffic

func (u UserMap) GetUserTraffic(name string) uint64

func (UserMap) GetUserUsedTime

func (u UserMap) GetUserUsedTime(name string) int64

func (UserMap) ResetAll

func (u UserMap) ResetAll()

func (UserMap) ResetUser

func (u UserMap) ResetUser(name string)

func (UserMap) ResetUserTime

func (u UserMap) ResetUserTime(name string)

func (UserMap) ResetUserTraffic

func (u UserMap) ResetUserTraffic(name string)

func (UserMap) SetUser

func (u UserMap) SetUser(name string, traffic uint64, time int64)

Jump to

Keyboard shortcuts

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