parser

package
v0.0.0-...-3f59448 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2016 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package parser contains utilities for parsing and encoding MDS/SSM messages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseMessageWithParams

func ParseMessageWithParams(log log.T, payload string) (parsedMessage messageContracts.SendCommandPayload, err error)

ParseMessageWithParams parses an MDS message and replaces the parameters where needed.

func PrepareReplyPayload

func PrepareReplyPayload(pluginID string, runtimeStatuses map[string]*contracts.PluginRuntimeStatus, dateTime time.Time, agentInfo contracts.AgentInfo) (payload messageContracts.SendReplyPayload)

PrepareReplyPayload creates the payload object for SendReply based on plugin outputs.

func PrepareReplyPayloadToUpdateDocumentStatus

func PrepareReplyPayloadToUpdateDocumentStatus(agentInfo contracts.AgentInfo, documentStatus contracts.ResultStatus, documentTraceOutput string) (payload messageContracts.SendReplyPayload)

PrepareReplyPayloadToUpdateDocumentStatus creates the payload object for SendReply based on document status change.

func PrepareRuntimeStatuses

func PrepareRuntimeStatuses(log log.T, pluginOutputs map[string]*contracts.PluginResult) (runtimeStatuses map[string]*contracts.PluginRuntimeStatus)

PrepareRuntimeStatuses creates runtime statuses from plugin outputs. contracts.PluginResult and contracts.PluginRuntimeStatus are mostly same. however they are decoupled on purpose so that we can do any special handling / serializing when sending response to server side.

func ReplacePluginParameters

func ReplacePluginParameters(input map[string]*contracts.PluginConfig, params map[string]interface{}, logger log.T) (result map[string]*contracts.PluginConfig)

ReplacePluginParameters replaces parameters with their values, within the plugin Properties.

Types

This section is empty.

Jump to

Keyboard shortcuts

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