kv

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 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,omitempty" configurable:"true" title:"Context"`
	Query   string                      `json:"query,omitempty" required:"true" title:"Query"`
}

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.Port

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,omitempty" title:"Context" configurable:"true"`
	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"`
}

type KeyValueStoreRequestContext

type KeyValueStoreRequestContext any

type KeyValueStoreResult

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

type KeyValueStoreSettings

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

Jump to

Keyboard shortcuts

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