v2

package
v0.0.0-...-63ef111 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: AGPL-3.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CustomRequestDecoder

func CustomRequestDecoder(r *http.Request) goahttp.Decoder

CustomRequestDecoder overrides the RequestDecoder provided by goahttp package It returns always a json.NewDecoder for legacy reasons: The web editor sends always request to the agent setting "Content-Type: text/plain" even when it should set "Content-Type: application/json". This breaks the parsing with: "can't decode text/plain to *server.InstallRequestBody" error message. This was working before the bump to goa v3 only because a "text/plain" decoder was not implemented and it was fallbacking to the json decoder. (https://github.com/goadesign/goa/pull/2310)

func Server

func Server(directory string, index *index.Resource) http.Handler

Server is the actual server

Types

type LogAdapter

type LogAdapter struct {
	*logrus.Logger
}

LogAdapter is the adapter for the logger

func (LogAdapter) Log

func (a LogAdapter) Log(keyvals ...interface{}) error

Log is the log function

Directories

Path Synopsis
Package pkgs implements the functions from github.com/arduino-create-agent/gen/indexes and github.com/arduino-create-agent/gen/tools.
Package pkgs implements the functions from github.com/arduino-create-agent/gen/indexes and github.com/arduino-create-agent/gen/tools.

Jump to

Keyboard shortcuts

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