handlers

package
v0.0.0-...-2327e9c Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Copyright © 2023 Codoworks Author: Dexter Codo Contact: dexter.codo@gmail.com

Copyright © 2023 Codoworks Author: Dexter Codo Contact: dexter.codo@gmail.com

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetUUIDParam

func GetUUIDParam(param string) (uuid.UUID, error)

Types

type ApiResponse

type ApiResponse struct {
	Code    string      `json:"code"`
	Message string      `json:"message"`
	Errors  []string    `json:"errors"`
	Payload interface{} `json:"payload"`
}

func Accepted

func Accepted() *ApiResponse

func BuildResponse

func BuildResponse(code string, message string, errors []string, payload interface{}) *ApiResponse

func Deleted

func Deleted() *ApiResponse

func Success

func Success(payload interface{}) *ApiResponse

func ValidationErrors

func ValidationErrors(errs error) *ApiResponse

type FieldValidationError

type FieldValidationError struct {
	Namespace string      `json:"namespace"`
	Field     string      `json:"field"`
	Error     string      `json:"error"`
	Kind      string      `json:"kind"`
	Value     interface{} `json:"value"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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