requestBody

package
v0.0.0-...-2d2cc06 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

package requestBody contains types, generics, and functions related to working with http request bodies

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeBody

func MakeBody[B Body](r *http.Request) (B, []byte, error)

func MakeReadCloser

func MakeReadCloser(data []byte) io.ReadCloser

Types

type Body

type Body interface {
	SigninBody | ReqBody
}

type ReqBody

type ReqBody struct {
	Username string
}

type SigninBody

type SigninBody struct {
	Username string
	Password string
}

Jump to

Keyboard shortcuts

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