api

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package api defines the API V1 implementation for tenant-api.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidUUID is returned when a UUID is invalid
	ErrInvalidUUID = errors.New("invalid UUID")

	// ErrUUIDNotFound is returned when a UUID is not found in the path
	ErrUUIDNotFound = errors.New("UUID not found in path")

	// ErrTenantNameMissing is returned when the Tenant Name is not defined.
	ErrTenantNameMissing = errors.New("tenant name is missing")
)

Functions

This section is empty.

Types

type PaginationParams

type PaginationParams struct {
	Limit   int    `json:"limit,omitempty"`
	Page    int    `json:"page,omitempty"`
	Cursor  string `json:"cursor,omitempty"`
	Preload bool   `json:"preload,omitempty"`
	OrderBy string `json:"orderby,omitempty"`
}

PaginationParams allow you to paginate the results

type Router

type Router struct {
	// contains filtered or unexported fields
}

Router provides a router for the API

func NewRouter

func NewRouter(db *sql.DB, l *zap.Logger, ps *pubsub.Client) *Router

NewRouter creates a new APIv1 router.

func (*Router) Routes

func (r *Router) Routes(e *echo.Echo)

Routes will add the routes for this API version to a router group

Jump to

Keyboard shortcuts

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