wildlifenl

package module
v0.0.0-...-6b10f73 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2025 License: MPL-2.0 Imports: 25 Imported by: 0

README

wildlifenl

Project wildlifenl is the backend API for the WildlifeNL system. It caters for the storage and retrieval of all data in the WildlifeNL digital ecosystem and provides logical integrity over this ecosystem's apps and data exports. It adheres to the open/closed principle and allows other systems to interact with it in a well-defined way specified by its API end-points and schemas.

License

Given the nature of this API and it being developed in a trans-disciplinary consortium, this software uses the MPL-2.0 license, rather than any other license, for the following reasons:

  • Encourage contributions by ensuring that changes to the licensed files remain open.
  • Allow integration with proprietary software without imposing open-source requirements on an entire project.

Documentation

See the docs folder for more information.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMiddleware

func NewMiddleware(api huma.API) func(ctx huma.Context, next func(huma.Context))

func Start

func Start(config *Configuration) error

Types

type AlarmHolder

type AlarmHolder struct {
	Body *models.Alarm `json:"alarm"`
}

type AlarmsHolder

type AlarmsHolder struct {
	Body []models.Alarm `json:"alarms"`
}

type AnimalAddInput

type AnimalAddInput struct {
	Body *models.AnimalRecord `json:"animal"`
}

type AnimalHolder

type AnimalHolder struct {
	Body *models.Animal `json:"animal"`
}

type AnimalsHolder

type AnimalsHolder struct {
	Body []models.Animal `json:"animals"`
}

type AnswerAddInput

type AnswerAddInput struct {
	Input
	Body *models.AnswerRecord `json:"answer"`
}

type AnswerDeleteInput

type AnswerDeleteInput struct {
	Input
	ID string `path:"id" format:"uuid" doc:"The ID of the answer to be deleted."`
}

type AnswerHolder

type AnswerHolder struct {
	Body *models.Answer `json:"answer"`
}

type AnswersHolder

type AnswersHolder struct {
	Body []models.Answer `json:"answers"`
}

type AuthenticationInput

type AuthenticationInput struct {
	Body struct {
		DisplayNameApp string `json:"displayNameApp" doc:"The display name of the requesting app, will be used in the email message." example:"MyApp"`
		Email          string `json:"email" doc:"The email address that the authentication code should be send to." format:"email"`
	}
}

type AuthenticationRequest

type AuthenticationRequest struct {
	// contains filtered or unexported fields
}

type AuthenticationResult

type AuthenticationResult struct {
	Body string `json:"message"`
}

type AuthorizationInput

type AuthorizationInput struct {
	Body struct {
		Email string `json:"email" doc:"The email address that the authentication process was started with." format:"email"`
		Code  string `json:"code" doc:"The code as received by email." example:"123456"`
	}
}

type AuthorizationResult

type AuthorizationResult struct {
	Body *models.Credential `json:"credential"`
}

type BorneSensorDeploymentAddInput

type BorneSensorDeploymentAddInput struct {
	Body *models.BorneSensorDeploymentRecord `json:"borneSensorDeployment"`
}

type BorneSensorDeploymentHolder

type BorneSensorDeploymentHolder struct {
	Body *models.BorneSensorDeployment `json:"borneSensorDeployment"`
}

type BorneSensorDeploymentsHolder

type BorneSensorDeploymentsHolder struct {
	Body []models.BorneSensorDeployment `json:"borneSensorDeployments"`
}

type BorneSensorReadingAddInput

type BorneSensorReadingAddInput struct {
	Input
	Body *models.BorneSensorReadingRecord `json:"borneSensorReading"`
}

type BorneSensorReadingsHolder

type BorneSensorReadingsHolder struct {
	Body []models.BorneSensorReading `json:"borneSensorReadings"`
}

type Configuration

type Configuration struct {
	Version                         string
	Host                            string
	Port                            int
	RelationalDatabaseHost          string
	RelationalDatabasePort          int
	RelationalDatabaseName          string
	RelationalDatabaseUser          string
	RelationalDatabasePass          string
	RelationalDatabaseSSLmode       string
	TimeseriesDatabaseURL           string
	TimeseriesDatabaseOrganization  string
	TimeseriesDatabaseToken         string
	CacheSessionDurationMinutes     int
	CacheAuthRequestDurationMinutes int
	EmailFrom                       string
	EmailHost                       string
	EmailUser                       string
	EmailPassword                   string
	AdminEmailAddress               string
}

type ConveyanceHolder

type ConveyanceHolder struct {
	Body *models.Conveyance `json:"conveyance"`
}

type ConveyancesHolder

type ConveyancesHolder struct {
	Body []models.Conveyance `json:"conveyances"`
}

type DetectionAddInput

type DetectionAddInput struct {
	Body models.DetectionRecord `json:"detection"`
}

type DetectionHolder

type DetectionHolder struct {
	Body *models.Detection `json:"detection"`
}

type DetectionsHolder

type DetectionsHolder struct {
	Body []models.Detection `json:"detections"`
}

type ExperimentDeleteInput

type ExperimentDeleteInput struct {
	Input
	ID string `path:"id" format:"uuid" doc:"The ID of the experiment to be deleted."`
}

type ExperimentEndInput

type ExperimentEndInput struct {
	Input
	ID string `path:"id" format:"uuid" doc:"The ID of the experiment to be ended."`
}

type ExperimentHolder

type ExperimentHolder struct {
	Body *models.Experiment `json:"experiment"`
}

type ExperimentNewInput

type ExperimentNewInput struct {
	Input
	Body *models.ExperimentRecord `json:"experiment"`
}

type ExperimentUpdateInput

type ExperimentUpdateInput struct {
	Input
	ID   string                   `path:"id" format:"uuid" doc:"The ID of the experiment to be updated."`
	Body *models.ExperimentRecord `json:"experiment"`
}

type ExperimentsHolder

type ExperimentsHolder struct {
	Body []models.Experiment `json:"experiments"`
}

type Input

type Input struct {
	// contains filtered or unexported fields
}

func (*Input) Resolve

func (m *Input) Resolve(ctx huma.Context) []error

type InteractionAddInput

type InteractionAddInput struct {
	Input
	Body *models.InteractionRecord `json:"interaction"`
}

type InteractionHolder

type InteractionHolder struct {
	Body *models.Interaction `json:"interaction"`
}

type InteractionQueryInput

type InteractionQueryInput struct {
	Latitude  float64   `` /* 151-byte string literal not displayed */
	Longitude float64   `` /* 155-byte string literal not displayed */
	Radius    int       `` /* 127-byte string literal not displayed */
	Before    time.Time `query:"moment_before" doc:"The moment in time before which the interaction happened."`
	After     time.Time `query:"moment_after" doc:"The moment in time after which the interaction happened."`
}

type InteractionTypeHolder

type InteractionTypeHolder struct {
	Body *models.InteractionType `json:"interactionType"`
}

type InteractionTypeUpdateInput

type InteractionTypeUpdateInput struct {
	ID   int                     `path:"id" doc:"The ID of the interaction type to be updated."`
	Body *models.InteractionType `json:"interactionType"`
}

type InteractionTypesHolder

type InteractionTypesHolder struct {
	Body []models.InteractionType `json:"interactionTypes"`
}

type InteractionsHolder

type InteractionsHolder struct {
	Body []models.Interaction `json:"interactions"`
}

type LivingLabAddInput

type LivingLabAddInput struct {
	Input
	Body *models.LivingLab `json:"livinglab"`
}

type LivingLabHolder

type LivingLabHolder struct {
	Body *models.LivingLab `json:"livinglab"`
}

type LivingLabsHolder

type LivingLabsHolder struct {
	Body []models.LivingLab `json:"livinglabs"`
}

type Mailer

type Mailer struct {
	// contains filtered or unexported fields
}

func (*Mailer) Ping

func (e *Mailer) Ping() error

func (*Mailer) SendCode

func (e *Mailer) SendCode(appName, displayName, email, code string) error

type MessageAddInput

type MessageAddInput struct {
	Input
	Body *models.MessageRecord `json:"message"`
}

type MessageDeleteInput

type MessageDeleteInput struct {
	Input
	ID string `path:"id" format:"uuid" doc:"The ID of the message to be deleted."`
}

type MessageHolder

type MessageHolder struct {
	Body *models.Message `json:"message"`
}

type MessagesHolder

type MessagesHolder struct {
	Body []models.Message `json:"messages"`
}

type Operations

type Operations struct {
	Endpoint string
}

type ProfileHolder

type ProfileHolder struct {
	Body *models.Profile `json:"profile"`
}

type ProfileNewHolder

type ProfileNewHolder struct {
	Input
	Body *models.ProfileRecord `json:"profile"`
}

type ProfileUpdateHolder

type ProfileUpdateHolder struct {
	Input
	Body *models.ProfileRecord `json:"profile"`
}

type ProfilesHolder

type ProfilesHolder struct {
	Body []models.Profile `json:"profiles"`
}

type QuestionAddInput

type QuestionAddInput struct {
	Input
	Body *models.QuestionRecord `json:"question"`
}

type QuestionDeleteInput

type QuestionDeleteInput struct {
	Input
	ID string `path:"id" format:"uuid" doc:"The ID of the question to be deleted."`
}

type QuestionHolder

type QuestionHolder struct {
	Body *models.Question `json:"question"`
}

type QuestionnaireAddInput

type QuestionnaireAddInput struct {
	Input
	Body *models.QuestionnaireRecord `json:"questionnaire"`
}

type QuestionnaireDeleteInput

type QuestionnaireDeleteInput struct {
	Input
	ID string `path:"id" format:"uuid" doc:"The ID of the questionnaire to be deleted."`
}

type QuestionnaireHolder

type QuestionnaireHolder struct {
	Body *models.Questionnaire `json:"questionnaire"`
}

type QuestionnaireUpdateInput

type QuestionnaireUpdateInput struct {
	Input
	ID   string                      `path:"id" format:"uuid" doc:"The ID of the questionnaire to be updated."`
	Body *models.QuestionnaireRecord `json:"questionnaire"`
}

type QuestionnairesHolder

type QuestionnairesHolder struct {
	Body []models.Questionnaire `json:"questionnaires"`
}

type QuestionsHolder

type QuestionsHolder struct {
	Body []models.Question `json:"questions"`
}

type ResponseAddInput

type ResponseAddInput struct {
	Input
	Body *models.ResponseRecord `json:"response"`
}

type ResponseHolder

type ResponseHolder struct {
	Body *models.Response `json:"response"`
}

type ResponsesHolder

type ResponsesHolder struct {
	Body []models.Response `json:"responses"`
}

type RoleForUserUpdateInput

type RoleForUserUpdateInput struct {
	Body *struct {
		UserID string `json:"userID" format:"uuid" doc:"The ID of the user"`
		RoleID int    `json:"roleID" minimum:"1" doc:"The ID of the role"`
	}
}

type RolesHolder

type RolesHolder struct {
	Body []models.Role `json:"roles"`
}

type ServeMux

type ServeMux struct {
	*http.ServeMux
}

func NewServeMux

func NewServeMux() *ServeMux

func (*ServeMux) ServeHTTP

func (c *ServeMux) ServeHTTP(w http.ResponseWriter, r *http.Request)

type SpecieSHolder

type SpecieSHolder struct {
	Body []models.Species `json:"species"`
}

type SpeciesForZoneUpdateInput

type SpeciesForZoneUpdateInput struct {
	Input
	Body *struct {
		ZoneID    string `json:"zoneID" format:"uuid" doc:"The ID of the zone"`
		SpeciesID string `json:"speciesID" format:"uuid" doc:"The ID of the species"`
	}
}

type SpeciesHolder

type SpeciesHolder struct {
	Body *models.Species `json:"species"`
}

type SpeciesUpdateInput

type SpeciesUpdateInput struct {
	Input
	ID   string          `path:"id" format:"uuid" doc:"The ID of the species to be updated."`
	Body *models.Species `json:"species"`
}

type TrackingReadingAddInput

type TrackingReadingAddInput struct {
	Input
	Body *models.TrackingReadingRecord `json:"trackingReading"`
}

type TrackingReadingHolder

type TrackingReadingHolder struct {
	Body *models.TrackingReading `json:"trackingReading"`
}

type TrackingReadingsHolder

type TrackingReadingsHolder struct {
	Body []models.TrackingReading `json:"trackingReadings"`
}

type UserHolder

type UserHolder struct {
	Body *models.User `json:"user"`
}

type UserNewHolder

type UserNewHolder struct {
	Input
	Body *models.UserCreatedByAdmin `json:"user"`
}

type UsersHolder

type UsersHolder struct {
	Body []models.User `json:"users"`
}

type VicinityHolder

type VicinityHolder struct {
	Body *models.Vicinity `json:"vicinity"`
}

type ZoneAddInput

type ZoneAddInput struct {
	Input
	Body *models.ZoneRecord `json:"zone"`
}

type ZoneDeactivateInput

type ZoneDeactivateInput struct {
	Input
	ID string `path:"id" doc:"The ID of this zone." format:"uuid"`
}

type ZoneHolder

type ZoneHolder struct {
	Body *models.Zone `json:"zone"`
}

type ZonesHolder

type ZonesHolder struct {
	Body []models.Zone `json:"zones"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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