pkg

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AppName   string
	Version   string
	BuildTime string
	GitCommit string
	GoVersion string
)
View Source
var (
	Opts struct {
		Addr    string `short:"a" long:"addr" default:":80" env:"ADDR" description:"Addr to listen on for HTTP server"`
		Version bool   `short:"v" long:"version" description:"Show version info"`
		Robot   Robot  `group:"DingTalk Robot Options" namespace:"robot" env-namespace:"ROBOT" `
	}
)

Functions

func ParseArg

func ParseArg()

func PrintVersion

func PrintVersion()

PrintVersion Print out version information

Types

type LimiterServer

type LimiterServer struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewLimiterServer

func NewLimiterServer(i time.Duration, c int) *LimiterServer

func (*LimiterServer) IsAvailable

func (limiter *LimiterServer) IsAvailable() bool

type Robot

type Robot struct {
	Token     string   `short:"t" long:"token" env:"TOKEN" description:"DingTalk robot access token" required:"true"`
	Secret    string   `short:"s" long:"secret" env:"SECRET" description:"DingTalk robot secret"`
	AtMobiles []string `short:"m" long:"at-mobiles" env:"AT_MOBILES" env-delim:"," description:"The mobile of the person will be at"`
	IsAtAll   bool     `short:"e" long:"at-all" env:"AT_ALL" description:"Whether at everyone"`
}

Jump to

Keyboard shortcuts

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