Documentation ¶
Overview ¶
This file is subject to the terms and conditions defined in file 'LICENSE.txt', which is part of this source code package.
Package cmd provides a CLI framework that implements the contract between Trustero service and a receptor_v1.Receptor. The framework allows the Receptor developer to focus on collecting evidences and avoid having to deal with RPC and CLI plumbing.
Index ¶
- func Execute(r receptor_sdk.Receptor)
- func ExtractMetaData(row interface{}, reportStruct *receptor_v1.Struct) (entityIdFieldName string, rowFieldNames []string, err error)
- func GetParsedReceptorType() (parsedName string)
- func RowToStructRow(row interface{}, entityIdFieldName string, rowFieldNames []string) (reportRow *receptor_v1.Row)
- type EvidenceInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Execute ¶
func Execute(r receptor_sdk.Receptor)
Execute is the entry point into the CLI framework. Receptor author implements the receptor_sdk.Receptor interface and the CLI framework takes care of the rest.
func ExtractMetaData ¶
func ExtractMetaData(row interface{}, reportStruct *receptor_v1.Struct) (entityIdFieldName string, rowFieldNames []string, err error)
ExtractMetaData Extracts tag information from struct
func GetParsedReceptorType ¶
func GetParsedReceptorType() (parsedName string)
GetParsedReceptorType returns a normalized receptor type string. A receptor type string only includes letters, numbers, "-", and "_". All other characters will be converted to "_".
func RowToStructRow ¶
func RowToStructRow(row interface{}, entityIdFieldName string, rowFieldNames []string) (reportRow *receptor_v1.Row)
RowToStructRow Builds structured row of evidence