native

package
v2.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2017 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContentBodyParser

type ContentBodyParser interface {
	// contains filtered or unexported methods
}

ContentBodyParser parses the body of native content

func NewContentBodyParser

func NewContentBodyParser(uuidJSONPaths []string) ContentBodyParser

NewContentBodyParser returns a new instace of a ContentBodyParser

type NativeMessage

type NativeMessage struct {
	// contains filtered or unexported fields
}

NativeMessage is the message accepted by the native writer

func NewNativeMessage

func NewNativeMessage(contentBody string, timestamp string, transactionID string) (NativeMessage, error)

NewNativeMessage returns a new instance of a NativeMessage

func (*NativeMessage) AddHashHeader

func (msg *NativeMessage) AddHashHeader(hash string)

AddHashHeader adds the hash of the native content as a header

type Writer

type Writer interface {
	GetCollectionByOriginID(originID string) (string, error)
	WriteToCollection(msg NativeMessage, collection string) error
	ConnectivityCheck() (string, error)
}

Writer provides the functionalities to write in the native store

func NewWriter

func NewWriter(address string, collectionsOriginIdsMap map[string]string, hostHeader string, parser ContentBodyParser) Writer

NewWriter returns a new instance of a native writer

Jump to

Keyboard shortcuts

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