audittrail

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2020 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AuditTrailChannel chan Entry

AuditTrailChannel to receive audit trail item

Functions

func PublishAuditTrailItem

func PublishAuditTrailItem(streamName string, orderID string, status string, ruleName string, description string)

PublishAuditTrailItem creates Audit Trail entry and publishes it

Types

type ConnectionConfig

type ConnectionConfig struct {
	AccessKey  string
	SecretKey  string
	RegionName string
}

ConnectionConfig stores the local connection details

type Entry

type Entry struct {
	OrderID     string
	TimeStamp   time.Time
	Status      string
	RuleName    string
	Description string
}

Entry to record the trail of flow

type KinesisPublisher

type KinesisPublisher interface {
	Connect()
	CreateStream(streamName string) error
	Publish(streamName string, content interface{}) (bool, error)
	GetRecords(streamName string) error
	Disconnect() error
	StreamExists(streamName string) (bool, error)
	DescribeStream(streamName string) (*kinesis.DescribeStreamOutput, error)
}

KinesisPublisher interface providing basic communication methods

var KPInstance KinesisPublisher

KPInstance is an instanceof Kinesis publisher

func New

New creates a new kinesis publisher instance

func SetupKinesisPubSub

func SetupKinesisPubSub(config ConnectionConfig, streamName string) KinesisPublisher

SetupKinesisPubSub sets up connection to kinesis and creates the stream if does not exist

type WebSocketPublisher

type WebSocketPublisher interface {
	Start()
}

WebSocketPublisher to publish data to web client

func Create

func Create(port int64, stream string) WebSocketPublisher

Create a new WebSocketPublisher Instance

Jump to

Keyboard shortcuts

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