versia-go/internal/validators/validator.go
2024-08-13 01:18:14 +02:00

17 lines
292 B
Go

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
}