Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ConfigCmd = cli.Command{ Name: "config", Usage: "configure command line tool", Subcommands: []cli.Command{ { Name: "set", Usage: "create configuration file with given options", Flags: []cli.Flag{ asMandatory(urlFlag), asMandatory(tokenFlag), pathFlag, }, Before: configSetValidator, Action: configSetHandler, }, { Name: "show", Usage: "show contents of set configuration file", Flags: []cli.Flag{ pathFlag, }, Action: configShowHandler, }, }, }
ConfigCmd is the CLI command object for the config operation
View Source
var HeartbeatCmd = cli.Command{ Name: "heartbeat", Usage: "http healthcheck endpoint check", Action: heartbeatHandler, Hidden: true, }
HeartbeatCmd is the CLI command object for the Heartbeat operation
View Source
var LBHeartbeatCmd = cli.Command{ Name: "lbheartbeat", Usage: "http healthcheck endpoint check", Action: lbheartbeatHandler, Hidden: true, }
LBHeartbeatCmd is the CLI command object for the LBHeartbeat operation
View Source
var ReputationCmd = cli.Command{ Name: "reputation", Aliases: []string{"r"}, Usage: "reputation entry related commands", Subcommands: []cli.Command{ { Name: "list", Usage: "list all available reputation entries", Flags: []cli.Flag{ jsonFlag, }, Action: reputationListHandler, }, { Name: "get", Usage: "get the entry for a given object", Flags: []cli.Flag{ asMandatory(objectFlag), withDefault(typeFlag, "ip"), jsonFlag, }, Before: reputationGetValidator, Action: reputationGetHandler, }, { Name: "set", Usage: "update the entry for a given object", Flags: []cli.Flag{ asMandatory(objectFlag), asMandatoryInt(scoreFlag), withDefault(typeFlag, "ip"), decayAfterFlag, }, Before: reputationSetValidator, Action: reputationSetHandler, }, { Name: "clear", Usage: "delete the entry for a given object", Flags: []cli.Flag{ asMandatory(objectFlag), withDefault(typeFlag, "ip"), }, Before: reputationClearValidator, Action: reputationClearHandler, }, { Name: "batch-clear", Usage: "delete the entries for all objects in a given file", Flags: []cli.Flag{ asMandatory(payloadFlag), withDefault(typeFlag, "ip"), exitOnFailFlag, }, Before: reputationBatchClearValidator, Action: reputationBatchClearHandler, }, }, }
ReputationCmd is the CLI command object for reputation operations
View Source
var VersionCmd = cli.Command{ Name: "version", Usage: "get the version of configured iprepd server", Flags: []cli.Flag{ jsonFlag, }, Action: versionHandler, }
VersionCmd is the CLI command object for the Version operation
View Source
var ViolationCmd = cli.Command{ Name: "violation", Aliases: []string{"v"}, Usage: "violation related commands", Subcommands: []cli.Command{ { Name: "list", Usage: "list all available violations", Flags: []cli.Flag{ jsonFlag, }, Action: violationListHandler, }, { Name: "apply", Usage: "apply a violation to a single object", Flags: []cli.Flag{ asMandatory(violationFlag), asMandatory(objectFlag), withDefault(typeFlag, "ip"), suppressRecoveryFlag, }, Before: violationApplyValidator, Action: violationApplyHandler, }, { Name: "batch-apply", Description: "see https://github.com/mozilla-services/iprepd#put-violationstypeip for payload format", Usage: "batch-apply violations in a payload file", Flags: []cli.Flag{ asMandatory(payloadFlag), withDefault(payloadFmtFlag, payloadFormatJSON), asMandatoryIf(typeFlag, fmt.Sprintf("%s=%s", name(payloadFmtFlag), payloadFormatList)), asMandatoryIf(violationFlag, fmt.Sprintf("%s=%s", name(payloadFmtFlag), payloadFormatList)), }, Before: violationBatchApplyValidator, Action: violationBatchApplyHandler, }, }, }
ViolationCmd is the CLI command object for the violation operation
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.