update code header format
This commit is contained in:
@@ -1,18 +1,19 @@
|
||||
package heartwood
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/neo4j/neo4j-go-driver/v6/neo4j"
|
||||
)
|
||||
|
||||
// ========================================
|
||||
// ----------------------------------------------------------------------------
|
||||
// Schema Match Keys
|
||||
// ========================================
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
func NewSimpleMatchKeys() *SimpleMatchKeys {
|
||||
return &SimpleMatchKeys{
|
||||
Keys: map[string][]string{
|
||||
"User": {"pubkey"},
|
||||
"Relay": {"url"},
|
||||
"Event": {"id"},
|
||||
"Tag": {"name", "value"},
|
||||
"ReplacementKey": {"pubkey", "kind"},
|
||||
@@ -20,9 +21,9 @@ func NewSimpleMatchKeys() *SimpleMatchKeys {
|
||||
}
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// ----------------------------------------------------------------------------
|
||||
// Node Constructors
|
||||
// ========================================
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
func NewUserNode(pubkey string) *Node {
|
||||
return NewNode("User", Properties{"pubkey": pubkey})
|
||||
@@ -49,9 +50,9 @@ func NewReplacementKeyNode(pubkey string, kind int) *Node {
|
||||
})
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// ----------------------------------------------------------------------------
|
||||
// Relationship Constructors
|
||||
// ========================================
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
func NewSignedRel(
|
||||
start *Node, end *Node, props Properties) *Relationship {
|
||||
@@ -102,9 +103,9 @@ func NewReferencesReplacementKeyRel(
|
||||
"REFERENCES", "Tag", "ReplacementKey", start, end, props)
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// ----------------------------------------------------------------------------
|
||||
// Relationship Constructor Helpers
|
||||
// ========================================
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
func validateNodeLabel(node *Node, role string, expectedLabel string) {
|
||||
if !node.Labels.Contains(expectedLabel) {
|
||||
|
||||
Reference in New Issue
Block a user