api

package
v0.0.0-...-82bd6ae Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package api provides the web interface

Package api provides the web interface

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewResponseWriter

func NewResponseWriter(w http.ResponseWriter) *responseWriter

func Run

func Run()

Types

type Config

type Config struct{}

Config describes all application members

func (*Config) LogViaGRPC

func (app *Config) LogViaGRPC(w http.ResponseWriter, r *http.Request)

LogViaGRPC takes a JSON payload and logs it via gRPC

func (*Config) Routes

func (app *Config) Routes() http.Handler

Routes is the api entrypoint

type JSONPayload

type JSONPayload struct {
	Name string `json:"name"`
	Data string `json:"data"`
}

JSONPayload is the type for json posted to this api

Jump to

Keyboard shortcuts

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