httpEntity

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EntityMessage

type EntityMessage[T any] struct {
	Code   string `json:"code"`
	ErrMsg string `json:"error_msg,omitempty"`
	Body   T      `json:"body,omitempty"`
}

func Empty

func Empty[T any]() *EntityMessage[T]

func Error

func Error[T any](code string, err error) *EntityMessage[T]

func Success

func Success[T any](body T) *EntityMessage[T]

Jump to

Keyboard shortcuts

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