Help us shape the future of Go! Take the 2026 Go Developer Survey

common

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2025 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllPipelineCompleter added in v0.0.3

func AllPipelineCompleter(con *repl.Console) carapace.Action

func ArtifactCompleter added in v0.0.3

func ArtifactCompleter(con *repl.Console) carapace.Action

func ArtifactFormatCompleter added in v0.1.1

func ArtifactFormatCompleter() carapace.Action

func ArtifactNameCompleter added in v0.0.3

func ArtifactNameCompleter(con *repl.Console) carapace.Action

func Bind

func Bind(desc string, persistent bool, cmd *cobra.Command, flags func(f *pflag.FlagSet))

Bind is a convenience function to bind flags to a command, through newly created pflag.Flagset type. This function can be called any number of times for any command. desc - An optional name for the flag set (can be empty, but might end up useful). persistent - If true, the flags bound will apply to all subcommands of this command. cmd - The pointer to the command the flags should be bound to. flags - A function using this flag set as parameter, for you to register flags.

func BindArgCompletions

func BindArgCompletions(cmd *cobra.Command, anyAction *carapace.Action, actions ...carapace.Action)

func BindFlag

func BindFlag(cmd *cobra.Command, customSet ...func(f *pflag.FlagSet))

func BindFlagCompletions

func BindFlagCompletions(cmd *cobra.Command, bind func(comp carapace.ActionMap))

BindFlagCompletions is a convenience function for binding completers to flags requiring arguments. (It wraps a few steps to be used through the *carapace.Carapace type so you don't have to bother). cmd - The target command/subcommand which flags to be completed. bind - A function using a map "flag-name":carapace.Action for you to bind completions to the flag.

See https://rsteube.github.io/carapace/ for a complete documentation of carapace completions.

func BuildResourceCompleter added in v0.1.1

func BuildResourceCompleter(con *repl.Console) carapace.Action

func BuildTargetCompleter added in v0.0.3

func BuildTargetCompleter(con *repl.Console) carapace.Action

func BuildTypeCompleter added in v0.1.0

func BuildTypeCompleter(con *repl.Console) carapace.Action

func CLRFlagSet added in v0.0.3

func CLRFlagSet(f *pflag.FlagSet)

func CertNameCompleter added in v0.1.1

func CertNameCompleter(con *repl.Console) carapace.Action

func CertTypeCompleter added in v0.1.1

func CertTypeCompleter() carapace.Action

func EncryptionFlagSet added in v0.0.3

func EncryptionFlagSet(f *pflag.FlagSet)

func ExecuteFlagSet

func ExecuteFlagSet(f *pflag.FlagSet)

func ExternalMalCompleter added in v0.1.1

func ExternalMalCompleter(con *repl.Console) carapace.Action

func GenerateFlagSet added in v0.0.3

func GenerateFlagSet(f *pflag.FlagSet)

func GithubFlagSet added in v0.1.0

func GithubFlagSet(f *pflag.FlagSet)

func HttpPipelineCompleter added in v0.1.1

func HttpPipelineCompleter(con *repl.Console) carapace.Action

func ImportSet added in v0.1.1

func ImportSet(f *pflag.FlagSet)

func ListenerIDCompleter

func ListenerIDCompleter(con *repl.Console) carapace.Action

func ListenerPipelineNameCompleter added in v0.0.3

func ListenerPipelineNameCompleter(con *repl.Console, cmd *cobra.Command) carapace.Action

func MalCompleter added in v0.1.1

func MalCompleter(con *repl.Console) carapace.Action

func MalHttpFlagset added in v0.0.3

func MalHttpFlagset(f *pflag.FlagSet)

func ModuleArtifactsCompleter added in v0.1.1

func ModuleArtifactsCompleter(con *repl.Console) carapace.Action

func ModulesCompleter added in v0.1.0

func ModulesCompleter() carapace.Action

func NewCompletions

func NewCompletions(cmd *cobra.Command) *carapace.Carapace

NewCompletions registers the command to the application completion engine and returns you a type through which you can register all sorts of completions for this command, from flag arguments, positional ones, per index or remaining, etc.

See https://rsteube.github.io/carapace/ for a complete documentation of carapace completions.

func OpsecConfirm added in v0.1.0

func OpsecConfirm(cmd *cobra.Command) error

func ParseBinaryDataFlags added in v0.1.0

func ParseBinaryDataFlags(cmd *cobra.Command) (string, string, bool, uint32)

func ParseBinaryFlags added in v0.0.3

func ParseBinaryFlags(cmd *cobra.Command) (string, []string, bool, uint32)

func ParseCLRFlags added in v0.0.3

func ParseCLRFlags(cmd *cobra.Command) map[string]string

func ParseEncryptionFlags added in v0.0.3

func ParseEncryptionFlags(cmd *cobra.Command) (string, []*clientpb.Encryption)

func ParseFullBinaryDataFlags added in v0.1.0

func ParseFullBinaryDataFlags(cmd *cobra.Command) (string, string, bool, uint32, string, string)

func ParseFullBinaryFlags added in v0.0.3

func ParseFullBinaryFlags(cmd *cobra.Command) (string, []string, bool, uint32, string, string)

func ParseGenerateFlags added in v0.0.3

func ParseGenerateFlags(cmd *cobra.Command) *clientpb.BuildConfig

func ParseGithubFlags added in v0.1.0

func ParseGithubFlags(cmd *cobra.Command) *clientpb.GithubWorkflowConfig

func ParseImportCertFlags added in v0.1.1

func ParseImportCertFlags(cmd *cobra.Command) (*clientpb.TLS, error)

func ParsePipelineFlags added in v0.0.3

func ParsePipelineFlags(cmd *cobra.Command) (string, string, string, uint32)

func ParseProfileFlags added in v0.0.3

func ParseProfileFlags(cmd *cobra.Command) (string, string)

func ParseSacrificeFlags added in v0.0.3

func ParseSacrificeFlags(cmd *cobra.Command) *implantpb.SacrificeProcess

func ParseSelfSignFlags added in v0.1.1

func ParseSelfSignFlags(cmd *cobra.Command) *clientpb.CertificateSubject

ParseSelfSignFlags parses the self-signed certificate related flags from the command and returns a CertificateSubject proto message.

func ParseTLSFlags added in v0.0.3

func ParseTLSFlags(cmd *cobra.Command) (*clientpb.TLS, string, error)

func PipelineCompleter added in v0.1.1

func PipelineCompleter(con *repl.Console, use string) carapace.Action

func PipelineFlagSet

func PipelineFlagSet(f *pflag.FlagSet)

func ProfileCompleter added in v0.0.3

func ProfileCompleter(con *repl.Console) carapace.Action

func ProfileSet added in v0.0.3

func ProfileSet(f *pflag.FlagSet)

func ProxyFlagSet added in v0.1.0

func ProxyFlagSet(f *pflag.FlagSet)

func Register added in v0.1.0

func Register(con *repl.Console)

func RemAgentCompleter added in v0.1.0

func RemAgentCompleter(con *repl.Console) carapace.Action

func RemPipelineCompleter added in v0.1.0

func RemPipelineCompleter(con *repl.Console) carapace.Action

func ResourceCompleter added in v0.0.3

func ResourceCompleter(con *repl.Console) carapace.Action

func RestrictTargets

func RestrictTargets(filters ...string) map[string]string

RestrictTargets generates a cobra annotation map with a single console.CommandHiddenFilter key to a comma-separated list of filters to use in order to expose/hide commands based on requirements. Ex: cmd.Annotations = RestrictTargets("windows") will only show the command if the target is Windows. Ex: cmd.Annotations = RestrictTargets("windows", "beacon") show the command if target is a beacon on Windows.

func SacrificeFlagSet

func SacrificeFlagSet(f *pflag.FlagSet)

func SelfSignedFlagSet added in v0.1.1

func SelfSignedFlagSet(f *pflag.FlagSet)

func ServiceErrorControlCompleter added in v0.1.0

func ServiceErrorControlCompleter() carapace.Action

func ServiceStartTypeCompleter added in v0.1.0

func ServiceStartTypeCompleter() carapace.Action

func SessionAddonCompleter added in v0.0.3

func SessionAddonCompleter(con *repl.Console) carapace.Action

func SessionIDCompleter

func SessionIDCompleter(con *repl.Console) carapace.Action

func SessionModuleCompleter added in v0.0.3

func SessionModuleCompleter(con *repl.Console) carapace.Action

func SessionTaskCompleter added in v0.0.3

func SessionTaskCompleter(con *repl.Console) carapace.Action

func SetFlagSetGroup added in v0.1.0

func SetFlagSetGroup(flagSet *pflag.FlagSet, name string)

func SyncCompleter added in v0.1.0

func SyncCompleter(con *repl.Console) carapace.Action

func TaskTriggerTypeCompleter added in v0.1.0

func TaskTriggerTypeCompleter() carapace.Action

func TlsCertFlagSet

func TlsCertFlagSet(f *pflag.FlagSet)

func WebContentCompleter added in v0.1.0

func WebContentCompleter(con *repl.Console) carapace.Action

func WebsiteCompleter added in v0.1.0

func WebsiteCompleter(con *repl.Console) carapace.Action

Types

This section is empty.

Jump to

Keyboard shortcuts

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