entity

package
v0.0.0-...-e211119 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2024 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Edge

type Edge struct {
	ID         string                 `json:"id"`
	From       string                 `json:"from"`
	To         string                 `json:"to"`
	Attributes map[string]interface{} `json:"attributes"`
}

Edge is a JSON format for edges

type IncomingTranslation

type IncomingTranslation struct {
	Translation string
	MetaData    interface{}
}

IncomingTranslation contains the translated query and some possible metadata,

the metadata should have a clearly defined type for each usecase.
Each usecase should be responsible for unmarshalling to their own type
This really is a usecase for generics, but Go doesn't have them yet.

type Node

type Node struct {
	ID         string                 `json:"id"`
	Attributes map[string]interface{} `json:"attributes"`
}

Node is a JSON format for nodes

type ResultFormat

type ResultFormat map[string][]interface{}

ResultFormat is a format for the result, the interface{} can be either an edge or a node

Jump to

Keyboard shortcuts

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