Documentation ¶
Overview ¶
Package cmd provides the gcetcbendorsement CLI command abstractions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // RootCmd is the canonical root cobra command for the gcetcbendorsement CLI. RootCmd *cobra.Command )
Functions ¶
Types ¶
type Backend ¶
type Backend struct { Provider extract.LeveledQuoteProvider Getter verify.HTTPSGetter MakeEfiVariableReader func(mountpath string) exel.VariableReader Now time.Time IO IO }
Backend provides implementations for quote creation, internet access, and the current time.
type IO ¶
type IO interface { // Create creates or opens and truncates a file at the given path, or returns an error. The // writer comes with a cleanup function instead of being a WriteCloser to allow for the created // writer to not close if needed. Create(path string) (gcetcbendorsement.TerminalWriter, func(), error) // ReadFile reads the entire contents of a file at the given path, or returns an error. ReadFile(path string) ([]byte, error) }
IO provides the functionality to produce output as commands.
type OSIO ¶
type OSIO struct{}
OSIO implements the IO interface with the os library.
func (OSIO) Create ¶
func (OSIO) Create(path string) (gcetcbendorsement.TerminalWriter, func(), error)
Create truncates an existing file at the given path, or creates a new file. If successful, returns a writer to the file and a cleanup function for the writer. Otherwise returns an error.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.