multidag

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: May 9, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attributes

type Attributes struct {
	Attributes map[string]string
}

func (*Attributes) EncodeAsJson

func (a *Attributes) EncodeAsJson() ([]byte, error)

type Endpoints

type Endpoints struct {
	Single map[string]SingleEndpoint `json:"single"`
	Multi  map[string]MultiEndpoint  `json:"multi"`
}

func (*Endpoints) EncodeAsJson

func (e *Endpoints) EncodeAsJson() ([]byte, error)

type MultiEndpoint

type MultiEndpoint struct {
	TotalCount      int             `json:"totalCount"`
	VertexSelection VertexSelection `json:"vertexSelection"`
}

type SingleEndpoint

type SingleEndpoint struct {
	OtherVertex string `json:"otherVertex"`
	Otherlabel  string `json:"otherLabel"`
}

type Vertex

type Vertex interface {
	GetAttributes() jsonstuff.Jsonable
	GetInEndpoints() jsonstuff.Jsonable
	GetOutEndpoints() jsonstuff.Jsonable
	AddAttribute(name string, val string)
	AddSingleInpoint(name string, sourceType string, sourceIndex int64, otherEndLabel string)
	AddMultiInpoint(name string, sourceType string, totalCount int64, selectionIndices []int64)
	AddSingleOutpoint(name string, targetType string, targetIndex int64, otherEndLabel string)
	AddMultiOutpoint(name string, targetType string, totalCount int64, selectionIndices []int64)
}

func NewConcreteVertex

func NewConcreteVertex() Vertex

type VertexSelection

type VertexSelection struct {
	FirstIndex    int      `json:"firstIndex"`
	OtherVertices []string `json:"otherVertices"`
}

Jump to

Keyboard shortcuts

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