server

package
v0.0.0-...-7328bb5 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

package server contains the server abstractions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleRootDecoy

func HandleRootDecoy(c echo.Context) error

func NewEchoServer

func NewEchoServer(c *config.Config) *echo.Echo

NewEchoServer returns a configured Echo server.

Types

type Handler

type Handler struct {
	Collector model.GeolocatingCollector
	Submitter model.Submitter
}

Handler holds methods to handle the different server endpoints.

func (*Handler) CreateReport

func (h *Handler) CreateReport(ctx echo.Context) error

CreateReport creates a new report from client submission.

type Response

type Response struct {
	OK      bool   `json:"ok"`
	Message string `json:"msg"`
}

Response is the result returned by the server.

Jump to

Keyboard shortcuts

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