api

package
v0.0.0-...-eca08dd Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EmptyRequest  = Error("request body is empty")
	InternalError = Error("internal server error")
)

Functions

func Validate

func Validate(c *Credentials) error

Types

type Credentials

type Credentials struct {
	Email    string `json:"email" validate:"required,email"`
	Password string `json:"password" validate:"required"`
}

type Response

type Response struct {
	Status  string `json:"status"`
	Message string `json:"message,omitempty"`
	Details string `json:"details,omitempty"`
}

func Error

func Error(msg string, details ...any) Response

func Ok

func Ok(msg string) Response

Jump to

Keyboard shortcuts

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