tx

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OBJECTS_TYPELINK         = "__objects"
	TYPES_TYPELINK           = "__types"
	TYPE_TYPELINK            = "__type"
	OBJECT_TYPELINK          = "__object"
	OBJECT_2_OBJECT_TYPELINK = "obj"
	BUILT_IN_TYPES           = "types"
	BUILT_IN_OBJECTS         = "objects"
	BUILT_IN_ROOT            = "root"
	BUILT_IN_GROUP           = "group"
	BUILT_IN_NAV             = "nav"
	GROUP_TYPELINK           = "group"
)

Variables

This section is empty.

Functions

func Begin

payload:{
	"clone": "min" | "full" | "with_types", optional, default: full
	"types": map[string]beginTxType, only with "clone":"with_types"
}

func Commit

func Commit(_ sfplugins.StatefunExecutor, contextProcessor *sfplugins.StatefunContextProcessor)
payload:{
	"debug": bool, optional, default: "false"
	"mode": "merge" | "replace", optional, default: "merge"
}

exec on transaction

func CreateObject

func CreateObject(_ sfplugins.StatefunExecutor, contextProcessor *sfplugins.StatefunContextProcessor)
{
	"id": string,
	"origin_type": string,
	"body": json
}

create objects -> object link

create type -> object link

create object -> type link

func CreateObjectsLink(_ sfplugins.StatefunExecutor, contextProcessor *sfplugins.StatefunContextProcessor)
{
	"from": string,
	"to": string,
	"body": json
}

create object -> object link

func CreateType

func CreateType(_ sfplugins.StatefunExecutor, contextProcessor *sfplugins.StatefunContextProcessor)
{
	"id": string,
	"body": json
}

create types -> type link

func CreateTypesLink(_ sfplugins.StatefunExecutor, contextProcessor *sfplugins.StatefunContextProcessor)
{
	"from": string,
	"to": string,
	"object_link_type": string
	"body": json
}

create type -> type link

func DeleteObject

func DeleteObject(_ sfplugins.StatefunExecutor, contextProcessor *sfplugins.StatefunContextProcessor)
{
	"id":string
}

TODO: mark for delete all link from/in object

func DeleteObjectsLink(_ sfplugins.StatefunExecutor, contextProcessor *sfplugins.StatefunContextProcessor)
{
	"from": string,
	"to": string,
}

func DeleteType

func DeleteType(_ sfplugins.StatefunExecutor, contextProcessor *sfplugins.StatefunContextProcessor)
{
	"id": string
}
func DeleteTypesLink(_ sfplugins.StatefunExecutor, contextProcessor *sfplugins.StatefunContextProcessor)
{
	"from": string,
	"to": string,
}

func Push

payload:{
	"debug": bool, optional, default: "false"
	"mode": "merge" | "replace", optional, default: "merge"
}

func RegisterAllFunctionTypes

func RegisterAllFunctionTypes(runtime *statefun.Runtime)

func UpdateObject

func UpdateObject(_ sfplugins.StatefunExecutor, contextProcessor *sfplugins.StatefunContextProcessor)
{
	"id": string,
	"body": json
	"mode": "merge" | "replace", optional, default: "merge"
}

clone object from main graph if not exists

update object body

func UpdateObjectsLink(_ sfplugins.StatefunExecutor, contextProcessor *sfplugins.StatefunContextProcessor)
{
	"from": string,
	"to": string,
	"body": json, optional
}

func UpdateType

func UpdateType(_ sfplugins.StatefunExecutor, contextProcessor *sfplugins.StatefunContextProcessor)
{
	"id": string,
	"body": json
}

clone type from main graph if not exists

update type body

func UpdateTypesLink(_ sfplugins.StatefunExecutor, contextProcessor *sfplugins.StatefunContextProcessor)
{
	"from": string,
	"to": string,
	"object_link_type": string, optional
	"body": json, optional
}

Types

This section is empty.

Jump to

Keyboard shortcuts

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