Documentation
¶
Index ¶
Constants ¶
View Source
const ( ChildrenName = "children" ParentName = "parent" )
Variables ¶
View Source
var ( // ErrRegistrationNotFound will throw if the searched person registration cannot be found ErrRegistrationNotFound = errors.New("person registration not found") // ErrInvalidSelfRelation will throw if the attempted relationship is with oneself. ErrInvalidSelfRelation = errors.New("cannot create a relationship with oneself") // ErrDuplicateRelation will throw if the attempted relationship already exists. ErrDuplicateRelation = errors.New("relationship already exists") // ErrRelationNotFound will throw if the searched relationship cannot be found. ErrRelationNotFound = errors.New("relationship not found") // ErrIncestuousRelation will throw if the attempted relationship is incestuous. ErrIncestuousRelation = errors.New("cannot create incestuous relationship") )
View Source
var FamilyConnection = map[string]int64{
"self": 0,
"parent": 1,
"children": 1,
"sibling": 2,
"grandparent": 2,
"grandchild": 2,
"aunt_uncle": 3,
"niece_nephew": 3,
"cousin": 4,
}
Functions ¶
This section is empty.
Types ¶
type ErrorResponse ¶
type ErrorResponse struct {
ErrorMessage string `json:"error"`
}
type Family ¶
type Family struct { ID int64 `json:"id" xml:"id"` Name string `json:"name" xml:"name"` Relationship string `json:"relationship" xml:"relationship"` FamilyConnection int64 `json:"family_connection" xml:"family_connection"` Relationships []Relation `json:"relationships" xml:"relationships>relation"` }
type PersonRepository ¶
type PersonRequest ¶
type PersonUseCase ¶
type Relationship ¶
type RelationshipRepository ¶
type RelationshipUseCase ¶
Click to show internal directories.
Click to hide internal directories.