cmd

package
v0.0.0-...-6e99127 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 31 Imported by: 0

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

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

Types

type EvidenceInfo

type EvidenceInfo struct {
	Caption     string `json:"caption"`
	Description string `json:"description"`
}

Jump to

Keyboard shortcuts

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