-
Notifications
You must be signed in to change notification settings - Fork 10
/
transport_assoc_entity.go
41 lines (32 loc) · 1.15 KB
/
transport_assoc_entity.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package bifrost_entitygraph
import (
"github.com/aperturerobotics/entitygraph/entity"
el "github.com/aperturerobotics/entitygraph/link"
)
// TransportAssocEntityTypeName is the entitygraph type name for a Bifrost transport
const TransportAssocEntityTypeName = "bifrost/transport/assoc"
// TransportAssocEntity is a entity implementation backed by a transport.
type TransportAssocEntity struct {
entityID string
edgeFrom, edgeTo entity.Ref
}
// GetEntityID returns the entity identifier.
func (l *TransportAssocEntity) GetEntityID() string {
return l.entityID
}
// GetEntityTypeName returns the entity type name.
func (l *TransportAssocEntity) GetEntityTypeName() string {
return TransportAssocEntityTypeName
}
// GetEdgeFrom returns the reference to the entity this link starts at.
func (l *TransportAssocEntity) GetEdgeFrom() entity.Ref {
return l.edgeFrom
}
// GetEdgeTo returns the reference to the entity this link ends at.
func (l *TransportAssocEntity) GetEdgeTo() entity.Ref {
return l.edgeTo
}
// _ is a type assertion
var _ entity.Entity = ((*TransportAssocEntity)(nil))
// _ is a type assertion
var _ el.Link = ((*TransportAssocEntity)(nil))