github.com/15mga/kiwi@v0.0.2-0.20240324021231-b95d5c3ac751/graph/marshall.go (about)

     1  package graph
     2  
     3  import (
     4  	"fmt"
     5  	"github.com/15mga/kiwi/util"
     6  )
     7  
     8  func LinkName(outNode, outPoint, inNode, inPoint string) string {
     9  	return fmt.Sprintf("%s:%s->%s:%s", outNode, outPoint, inNode, inPoint)
    10  }
    11  
    12  type IGraphMarshaller interface {
    13  	Marshall(g IGraph) []byte
    14  }
    15  
    16  type IGraphUnMarshaller interface {
    17  	Unmarshall(bytes []byte, g IGraph) *util.Err
    18  }
    19  
    20  type IGraphMarshall interface {
    21  	IGraphMarshaller
    22  	IGraphUnMarshaller
    23  }