user

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2020 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exec

func Exec(config *Config) error

Exec 处理命令

Types

type Config

type Config struct {
	Cmd *flag.FlagSet

	List bool // 打印用户列表
	Add  bool // 添加用户
	Upd  bool // 更新用户
	Del  bool // 删除用户

	Config string // 配置文件

	Username      string // 用户名
	Password      string // 密码
	Expired       string // 有效期,格式: yyyy-MM-dd HH:mm:ss
	MaxRate       int    // 最大速率,单位KB
	MaxConnection int    // 最大连接数
}

Config 用户配置结构

func (*Config) Usage

func (c *Config) Usage()

Usage 帮助信息

func (*Config) Validate

func (c *Config) Validate() bool

Validate 检查配置参数是否有效

Jump to

Keyboard shortcuts

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