flags

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

********************************************************************

  • Copyright (c) Intel Corporation 2021
  • SPDX-License-Identifier: Apache-2.0 *********************************************************************

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TLSModesToString

func TLSModesToString() string

Types

type AmtInfoFlags

type AmtInfoFlags struct {
	Ver      bool
	Bld      bool
	Sku      bool
	UUID     bool
	Mode     bool
	DNS      bool
	Cert     bool
	UserCert bool
	Ras      bool
	Lan      bool
	Hostname bool
	OpState  bool
}

type ConfigTLSInfo

type ConfigTLSInfo struct {
	TLSMode        TLSMode
	DelayInSeconds int
	EAAddress      string
	EAUsername     string
	EAPassword     string
}

type Flags

type Flags struct {
	URL            string
	DNS            string
	Hostname       string
	Proxy          string
	Command        string
	SubCommand     string
	Profile        string
	LMSAddress     string
	LMSPort        string
	SkipCertCheck  bool
	Verbose        bool
	Force          bool
	JsonOutput     bool
	RandomPassword bool
	Local          bool
	StaticPassword string
	Password       string
	NewPassword    string
	LogLevel       string
	Token          string
	TenantID       string
	UseCCM         bool
	UseACM         bool
	EchoPass       bool

	UUID          string
	LocalConfig   config.Config
	LocalConfigV2 configv2.Configuration

	IpConfiguration    IPConfiguration
	HostnameInfo       HostnameInfo
	AMTTimeoutDuration time.Duration
	FriendlyName       string
	AmtInfo            AmtInfoFlags
	SkipIPRenew        bool
	SambaService       smb.ServiceInterface
	MEBxPassword       string
	ConfigTLSInfo      ConfigTLSInfo

	UserConsent string
	KVM         bool
	SOL         bool
	IDER        bool
	// contains filtered or unexported fields
}

Flags holds data received from the command line

func NewFlags

func NewFlags(args []string, pr utils.PasswordReader) *Flags

func (*Flags) DetermineTLSMode

func (f *Flags) DetermineTLSMode(mutualAuth, enabled, allowNonTLS bool) string

func (*Flags) NewConfigureFlagSet

func (f *Flags) NewConfigureFlagSet(subCommand string) *flag.FlagSet

func (*Flags) ParseFlags

func (f *Flags) ParseFlags() error

ParseFlags is used for understanding the command line flags

func (*Flags) PromptUserInput

func (f *Flags) PromptUserInput(prompt string, value *string) error

func (*Flags) ReadNewPasswordTo

func (f *Flags) ReadNewPasswordTo(saveLocation *string, promptPhrase string) error

func (*Flags) ReadPasswordFromUser

func (f *Flags) ReadPasswordFromUser() error

func (*Flags) ValidateConfigV2

func (f *Flags) ValidateConfigV2() error

type HostnameInfo

type HostnameInfo struct {
	DnsSuffixOS string `json:"dnsSuffixOS"`
	Hostname    string `json:"hostname"`
}

type IPConfiguration

type IPConfiguration struct {
	DHCP         bool   `json:"dhcp"`
	Static       bool   `json:"static"`
	IpSync       bool   `json:"ipsync"`
	IpAddress    string `json:"ipAddress"`
	Netmask      string `json:"netmask"`
	Gateway      string `json:"gateway"`
	PrimaryDns   string `json:"primaryDns"`
	SecondaryDns string `json:"secondaryDns"`
}

type NetEnumerator

type NetEnumerator struct {
	Interfaces     func() ([]net.Interface, error)
	InterfaceAddrs func(*net.Interface) ([]net.Addr, error)
}

A NetEnumerator enumerates local IP addresses.

type TLSMode

type TLSMode int
const (
	TLSModeServer TLSMode = iota
	TLSModeServerAndNonTLS
	TLSModeMutual
	TLSModeMutualAndNonTLS
	TLSModeDisabled
)

func ParseTLSMode

func ParseTLSMode(s string) (TLSMode, error)

func (TLSMode) String

func (m TLSMode) String() string

Jump to

Keyboard shortcuts

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