Documentation ¶
Index ¶
- func GetMongoInstance() (*mongo.Client, context.Context, context.CancelFunc)
- func Setup()
- type Color
- type GetSpecificIndividuals
- type GetSpecificParties
- type Individual
- type Party
- type UpdateIndividualBirthDateInput
- type UpdateIndividualFirstNameInput
- type UpdateIndividualLastNameInput
- type UpdatePartyAbbreviationInput
- type UpdatePartyColorInput
- type UpdatePartyLeaderInput
- type UpdatePartyLogoInput
- type UpdatePartyNameInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMongoInstance ¶
Get a Mongo instance (Client, Context, Cancel)
Types ¶
type GetSpecificIndividuals ¶
type GetSpecificIndividuals struct {
Individuals []string `json:"individuals" validate:"required"`
}
Model for the get specific individuals
type GetSpecificParties ¶
type GetSpecificParties struct {
Parties []string `json:"parties" validate:"required"`
}
Model for the get specific parties
type Individual ¶
type Individual struct { Id primitive.ObjectID `json:"_id" bson:"_id"` FirstName string `json:"firstname" bson:"firstname,omitempty" validate:"required"` LastName string `json:"lastname" bson:"lastname,omitempty" validate:"required"` BirthDate string `json:"birthdate" bson:"birthdate,omitempty" validate:"required"` Image string `json:"image" bson:"image" validate:"required"` Affiliation string `json:"affiliation" bson:"affiliation"` Color Color `json:"color" bson:"color" validate:"required"` }
Model for the individual object
type Party ¶
type Party struct { Id primitive.ObjectID `json:"_id" bson:"_id,omitempty"` Name string `json:"name" bsin:"name,omitempty" validate:"required"` Abbreviation string `json:"abbreviation" bson:"abbreviation,omitempty" validate:"required"` Leader string `json:"leader" bson:"leader,omitempty" validate:"required"` Logo string `json:"logo" bson:"logo,omitempty" validate:"required"` Color Color `json:"color" bson:"color,omitempty" validate:"required"` }
Model for the party object
type UpdateIndividualBirthDateInput ¶
type UpdateIndividualBirthDateInput struct {
BirthDate string `json:"birthdate" validate:"required"`
}
Model for the update party leader input
type UpdateIndividualFirstNameInput ¶
type UpdateIndividualFirstNameInput struct {
FirstName string `json:"firstname" validate:"required"`
}
Model for the update individual ƒirstname input
type UpdateIndividualLastNameInput ¶
type UpdateIndividualLastNameInput struct {
LastName string `json:"lastname" validate:"required"`
}
Model for the update individual lastname input
type UpdatePartyAbbreviationInput ¶
type UpdatePartyAbbreviationInput struct {
Abbreviation string `json:"abbreviation" validate:"required"`
}
Model for the update party abbreviation input
type UpdatePartyColorInput ¶
type UpdatePartyColorInput struct {
Color string `json:"color" validate:"required"`
}
Model for the update party color input
type UpdatePartyLeaderInput ¶
type UpdatePartyLeaderInput struct {
Leader string `json:"leader" validate:"required"`
}
Model for the update party leader input
type UpdatePartyLogoInput ¶
type UpdatePartyLogoInput struct {
Logo string `json:"logo" validate:"required"`
}
Model for the update party logo input
type UpdatePartyNameInput ¶
type UpdatePartyNameInput struct {
Name string `json:"name" validate:"required"`
}
Model for the update party name input
Click to show internal directories.
Click to hide internal directories.