api

package
v0.0.0-...-c4a8052 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2025 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiResponse

type ApiResponse struct {
	Message string      `json:"message"`
	Code    int         `json:"code"`
	Data    interface{} `json:"data"`
}

func (*ApiResponse) Error

func (e *ApiResponse) Error() string

type ApiResult

type ApiResult struct {
	fiber.Ctx
}

func Result

func Result(c fiber.Ctx) ApiResult

func (ApiResult) Err

func (c ApiResult) Err(code int, message string) error

func (ApiResult) Err400

func (c ApiResult) Err400(message string) error

func (ApiResult) Err500

func (c ApiResult) Err500() error

func (ApiResult) Ok

func (c ApiResult) Ok(data any) error

func (ApiResult) Or

func (c ApiResult) Or(data any, err error) error

Jump to

Keyboard shortcuts

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