handlers

package
v1.0.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Authorization = "Authorization"
	ContentType   = "Content-Type"
)
View Source
const (
	ApplicationJson = "application/json"
)

Variables

This section is empty.

Functions

func SendResponse

func SendResponse(c *fiber.Ctx, marshaledResponse []byte, statusCode int) error

func ValidateRequest

func ValidateRequest(request any) *er.WdbError

Types

type Client

type Client interface {
	Hello(c *fiber.Ctx) error

	// Database Handlers
	CreateDatabase(c *fiber.Ctx) error
	FetchDatabase(c *fiber.Ctx) error
	DeleteDatabase(c *fiber.Ctx) error

	// Collection Handlers
	CreateCollection(c *fiber.Ctx) error
	FetchCollection(c *fiber.Ctx) error
	DeleteCollection(c *fiber.Ctx) error

	// Data Handlers
	AddData(c *fiber.Ctx) error
	ReadData(c *fiber.Ctx) error
	DeleteData(c *fiber.Ctx) error
	UpdateData(c *fiber.Ctx) error

	// Role Handlers
	CreateRole(c *fiber.Ctx) error
	ListRoles(c *fiber.Ctx) error

	// User Handlers
	CreateUser(c *fiber.Ctx) error
	GrantRoles(c *fiber.Ctx) error
	LoginUser(c *fiber.Ctx) error
}

func NewHandlers

func NewHandlers(client w.Client) Client

Jump to

Keyboard shortcuts

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