versia-go/internal/validators/validator.go

17 lines
292 B
Go
Raw Permalink Normal View History

2024-08-11 03:51:22 +02:00
package validators
import (
"context"
"github.com/gofiber/fiber/v2"
"net/http"
)
type BodyValidator interface {
Validate(v any) error
}
type RequestValidator interface {
Validate(ctx context.Context, r *http.Request) error
ValidateFiberCtx(ctx context.Context, c *fiber.Ctx) error
}