db

package
v0.1.84 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpStore   = "store"
	OptDelete = "delete"
)
View Source
const (
	PortStore       = "store"
	PortQuery       = "query"
	PortQueryResult = "query_result"
	PortStoreAck    = "store_ack"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyValueQueryRequest

type KeyValueQueryRequest struct {
	Context KeyValueQueryRequestContext `json:"context" configurable:"true" propertyOrder:"1" title:"Context"`
	Query   string                      `json:"query,omitempty" required:"true" title:"Query" propertyOrder:"2"`
}

type KeyValueQueryRequestContext

type KeyValueQueryRequestContext any

type KeyValueQueryResult

type KeyValueQueryResult struct {
	Context  KeyValueQueryRequestContext `json:"context"`
	Document KeyValueStoreDocument       `json:"document"`
	Found    bool                        `json:"found"`
	Query    string                      `json:"query"`
}

type KeyValueStore

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

func (*KeyValueStore) GetInfo

func (k *KeyValueStore) GetInfo() module.ComponentInfo

func (*KeyValueStore) Handle

func (k *KeyValueStore) Handle(ctx context.Context, output module.Handler, port string, msg interface{}) error

func (*KeyValueStore) Instance

func (k *KeyValueStore) Instance() module.Component

func (*KeyValueStore) Ports

func (k *KeyValueStore) Ports() []module.NodePort

type KeyValueStoreDocument

type KeyValueStoreDocument map[string]interface{}

func (KeyValueStoreDocument) PrepareJSONSchema

func (k KeyValueStoreDocument) PrepareJSONSchema(schema *jsonschema.Schema) error

type KeyValueStoreRequest

type KeyValueStoreRequest struct {
	Context   KeyValueStoreRequestContext `json:"context" title:"Context" configurable:"true" propertyOrder:"1"`
	Operation string                      `json:"operation" required:"true" enum:"store,delete" enumTitles:"Store,Delete" default:"store" title:"Operation"`
	Document  KeyValueStoreDocument       `json:"document" required:"true" title:"Document" description:"Document to be stored" propertyOrder:"2"`
}

type KeyValueStoreRequestContext

type KeyValueStoreRequestContext any

type KeyValueStoreResult

type KeyValueStoreResult struct {
	Request KeyValueStoreRequest `json:"request"`
}

type KeyValueStoreSettings

type KeyValueStoreSettings struct {
	Document           KeyValueStoreDocument `` /* 255-byte string literal not displayed */
	PrimaryKey         string                `json:"primaryKey" title:"Primary key" required:"true" default:"id" propertyOrder:"2"`
	EnableStoreAckPort bool                  `` /* 169-byte string literal not displayed */
}

Jump to

Keyboard shortcuts

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