models

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Actor

type Actor struct {
	Person
	Characters []*Character
}

type Character

type Character struct {
	gogm.Relationship `gogm:"reltype:ACTED_IN"`

	Roles          []string
	Name           string
	NumberOfScenes int64
	Actor          *Actor `gogm:"startNode"`
	Movie          *Movie `gogm:"endNode"`
}

type Director

type Director struct {
	Person
	Movies []*Movie
}

type InvalidID

type InvalidID struct {
	TestNodeEntity
	TestId *string `gogm:"id,name:IDs"`
}

type Movie

type Movie struct {
	gogm.Node `gogm:"label:FILM,label:PICTURE"`

	Title    string
	Released int64
	Tagline  string

	Characters []*Character `gogm:"direction:INCOMING"`
	Directors  []*Director  `gogm:"direction:INCOMING"`
}

func (*Movie) AddCharacter

func (m *Movie) AddCharacter(c *Character)

type Node0

type Node0 struct {
	TestNodeEntity
	Name             string
	ByteProp         []byte
	MapProps         map[string]int
	AliasedMapProps1 map[string]*string `gogm:"name:aliasedMapProp"`
	InvalidIDMapProp map[int]int
	MapToInterfaces  map[string]interface{}
	N1               *Node1
}

(node0)-->(node1)-->(node2)<--(node3)-->(node4)

type Node1

type Node1 struct {
	TestNodeEntity
	N0   *Node0 `gogm:"direction:<-"`
	N2   *Node2
	Name string
}

type Node10

type Node10 struct {
	TestNodeEntity
	//ZeroTime     time.Time
	NilTime1     *time.Time
	ZeroDuration neo4j.Duration

	Time  time.Time
	Time1 *time.Time

	Duration  neo4j.Duration
	Duration1 *neo4j.Duration
}

type Node1Prime added in v0.1.3

type Node1Prime struct {
	TestNodeEntity `gogm:"label:Node1,label:TestNodeEntity"`
	N0             *Node0 `gogm:"direction:<-"`
	N2             *Node2
	Name           string
}

type Node2

type Node2 struct {
	TestNodeEntity
	N1   *Node1 `gogm:"direction:<-"`
	N3   *Node3 `gogm:"direction:<-"`
	Name string
}

type Node3

type Node3 struct {
	TestNodeEntity
	N2   *Node2
	N4   *Node4
	Name string
}

type Node4

type Node4 struct {
	TestNodeEntity
	N3   *Node3   `gogm:"direction:<-"`
	N5s  []*Node5 `gogm:"direction:<-"`
	R1   *SimpleRelationship
	R2s  []*SimpleRelationship2
	Name string
}

type Node5

type Node6

type Node6 struct {
	TestNodeEntity
	N7   *Node7 `gogm:"reltype:REL1"`
	N8   *Node8 `gogm:"reltype:REL1"`
	Name string
}

type Node7

type Node7 struct {
	TestNodeEntity
	N6   *Node6 `gogm:"reltype:REL1,direction:<-"`
	Name string
}

type Node8

type Node8 struct {
	TestNodeEntity
	N6   *Node6 `gogm:"reltype:REL1,direction:<-"`
	Name string
}

type Node9

type Node9 struct {
	TestNodeEntity
	Name   string `gogm:"unique"`
	TestId string `gogm:"id,name:IDs"`
}

type Person

type Person struct {
	TestNodeEntity
	Name    string
	Born    int64
	Follows []*Person `gogm:"reltype:FOLLOWS,direction:->"`
	Tags    []string  `gogm:"label"`
}

type Person2

type Person2 struct {
	TestNodeEntity
	Name    string
	Born    int64
	Follows []*Person2 `gogm:"reltype:FOLLOWS,direction:--"`
	Tags    []string   `gogm:"label"`
}

type SimpleNode

type SimpleNode struct {
	TestNodeEntity
	Prop1 string
}

type SimpleRelationship

type SimpleRelationship struct {
	TestRelationshipEntity
	N5     *Node5 `gogm:"startNode"`
	N4     *Node4 `gogm:"endNode"`
	Name   string
	TestID string `gogm:"id"`
}

type SimpleRelationship2

type SimpleRelationship2 struct {
	TestRelationshipEntity
	N5   *Node5 `gogm:"startNode"`
	N4   *Node4 `gogm:"endNode"`
	Name string
}

type SimpleRelationshipPrime added in v0.1.3

type SimpleRelationshipPrime struct {
	TestRelationshipEntity `gogm:"reltype:SIMPLERELATIONSHIP"`
	N5                     *Node5 `gogm:"startNode"`
	N4                     *Node4 `gogm:"endNode"`
	Name                   string
}

type SimpleRelationshipSameNode added in v1.0.0

type SimpleRelationshipSameNode struct {
	TestRelationshipEntity
	N51  *Node5 `gogm:"startNode"`
	N52  *Node5 `gogm:"endNode"`
	Name string
}

type TestEntity

type TestEntity struct {
	CreatedAt int64
	LoadedAt  int64
	UpdatedAt int64
	DeletedAt int64
}

func (*TestEntity) ClearMetaTimestamps

func (n *TestEntity) ClearMetaTimestamps()

func (*TestEntity) SetCreatedTime

func (n *TestEntity) SetCreatedTime(time int64)

func (*TestEntity) SetDeletedTime

func (n *TestEntity) SetDeletedTime(time int64)

func (*TestEntity) SetLoadedTime

func (n *TestEntity) SetLoadedTime(time int64)

func (*TestEntity) SetUpdatedTime

func (n *TestEntity) SetUpdatedTime(time int64)

type TestEventListener

type TestEventListener struct{}

func (*TestEventListener) OnPostDelete

func (e *TestEventListener) OnPostDelete(event gogm.Event)

func (*TestEventListener) OnPostLoad

func (e *TestEventListener) OnPostLoad(event gogm.Event)

func (*TestEventListener) OnPostSave

func (e *TestEventListener) OnPostSave(event gogm.Event)

func (*TestEventListener) OnPreDelete

func (e *TestEventListener) OnPreDelete(event gogm.Event)

func (*TestEventListener) OnPreSave

func (e *TestEventListener) OnPreSave(event gogm.Event)

type TestNodeEntity

type TestNodeEntity struct {
	gogm.Node
	TestEntity
}

type TestObject

type TestObject interface {
	SetCreatedTime(int64)
	SetLoadedTime(int64)
	SetUpdatedTime(int64)
	SetDeletedTime(int64)
	ClearMetaTimestamps()
}

type TestRelationshipEntity

type TestRelationshipEntity struct {
	gogm.Relationship
	TestEntity
}

Jump to

Keyboard shortcuts

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