needsauth

package
v0.0.0-...-d36189b Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Always

func Always() sdk.NeedsAuthentication

Always returns a NeedsAuthentication rule to always require authentication.

func ForCommand

func ForCommand(command ...string) sdk.NeedsAuthentication

ForCommand returns a NeedsAuthentication rule to require authentication for certain (sub)command, e.g. ["account"] or ["account", "list"].

func IfAll

IfAll returns a NeedsAuthentication that opts in to the authentication requirement only if all the specified rules opt in to the authentication requirement.

func IfAny

IfAny returns a NeedsAuthentication rule that only opts in to the authentication requirement if at least one specified rule opts in to the authentication requirement.

func NotForExactArgs

func NotForExactArgs(argsToSkip ...string) sdk.NeedsAuthentication

NotForExactArgs returns a NeedsAuthentication rule to opt out of authentication when the command-line args are an exact match with the passed in args.

func NotForHelp

func NotForHelp() sdk.NeedsAuthentication

func NotForHelpOrVersion

func NotForHelpOrVersion() sdk.NeedsAuthentication

func NotForVersion

func NotForVersion() sdk.NeedsAuthentication

func NotWhenContainsArgs

func NotWhenContainsArgs(argsSequence ...string) sdk.NeedsAuthentication

NotWhenContainsArgs returns a NeedsAuthentication rule to not require authentication when the exact sequence of argsToSkip is present somewhere in the command-line args.

func NotWithoutArgs

func NotWithoutArgs() sdk.NeedsAuthentication

Types

This section is empty.

Jump to

Keyboard shortcuts

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