Documentation ¶
Overview ¶
Package relationship provides tools for dealing with relationships between various entities
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllowedIn ¶
func AllowedIn(r Relationship, set []Relationship) (bool, error)
AllowedIn checks to see if a given relationship is compatible with the given set of relationships
func InSlice ¶
func InSlice(r Relationship, relationships []Relationship) bool
InSlice checks to see if a relationship is present in a set of relationships
func IsCompatible ¶
func IsCompatible(r1 Relationship, r2 Relationship) (bool, error)
IsCompatible checks to see if the two relationships are compatible
Types ¶
type Relationship ¶
type Relationship struct { Origin string `json:"origin"` Target string `json:"target"` Descriptor string `json:"descriptor"` Type string `json:"type"` }
Relationship is a unidirectional relationship between entities
func GetInverse ¶
func GetInverse(r Relationship) (Relationship, error)
GetInverse gets an inverse relationship for a given relationship
func (Relationship) Describe ¶
func (r Relationship) Describe() string
Describe returns a string version of the relationship
Click to show internal directories.
Click to hide internal directories.