mongodbtarget

package
v0.0.0-...-1cc6e83 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package mongodbtarget implements an adapter that connects to a MongoDB database and allows a user to insert, query, and update documents via cloudevents.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnvAccessorCtor

func EnvAccessorCtor() pkgadapter.EnvConfigAccessor

EnvAccessorCtor for configuration parameters

func NewTarget

NewTarget returns the adapter implementation.

Types

type InsertPayload

type InsertPayload struct {
	Database   string            `json:"database"`
	Collection string            `json:"collection"`
	StrValue   string            `json:"strValue"`
	MapStrVal  map[string]string `json:"mapStrVal"`
}

InsertPayload defines the expected data structure found at the event payload

type QueryPayload

type QueryPayload struct {
	Database   string `json:"database"`
	Collection string `json:"collection"`
	Key        string `json:"key"`
	Value      string `json:"value"`
}

QueryPayload defines the expected data found at the "io.triggermesh.mongodb.query" payload

type QueryResponse

type QueryResponse struct {
	Collection map[string]string `json:"collection"`
}

type UpdatePayload

type UpdatePayload struct {
	Database    string `json:"database"`
	Collection  string `json:"collection"`
	SearchKey   string `json:"searchKey"`
	SearchValue string `json:"searchValue"`
	UpdateKey   string `json:"updateKey"`
	UpdateValue string `json:"updateValue"`
}

Jump to

Keyboard shortcuts

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