docparser

package
v0.0.0-...-a9ed6da Latest Latest
Warning

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

Go to latest
Published: May 7, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package docparser contains methods for parsing and encoding any type of document, i.e. association document, MDS/SSM messages, offline service documents, etc.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitializeDocState

func InitializeDocState(log log.T,
	documentType contracts.DocumentType,
	docContent *contracts.DocumentContent,
	docInfo contracts.DocumentInfo,
	parserInfo DocumentParserInfo,
	params map[string]interface{}) (docState contracts.DocumentState, err error)

InitializeDocState is a method to obtain the state of the document. This method calls into ParseDocument to obtain the InstancePluginInformation

func ParseDocument

func ParseDocument(log log.T,
	docContent *contracts.DocumentContent,
	parserInfo DocumentParserInfo,
	params map[string]interface{}) (pluginsInfo []contracts.PluginState, err error)

ParseDocument is a method used to parse documents that are not received by any service (MDS or State manager)

func ParseDocumentNameAndVersion

func ParseDocumentNameAndVersion(name string) (docName, docVersion string)

ParseDocumentNameAndVersion parses the name and version from the document name

func ParseParameters

func ParseParameters(log log.T, params map[string][]*string, paramsDef map[string]*contracts.Parameter) map[string]interface{}

ParseParameters is a method to parse the ssm parameters into a string map interface

Types

type DocumentParserInfo

type DocumentParserInfo struct {
	OrchestrationDir  string
	S3Bucket          string
	S3Prefix          string
	MessageId         string
	DocumentId        string
	DefaultWorkingDir string
}

DocumentParserInfo represents the parsed information from the request

Jump to

Keyboard shortcuts

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