package data

import "github.com/go-chi/chi/v5/_examples/versions/data"

Index

Variables

var (
	ErrUnauthorized = errors.New("Unauthorized")
	ErrForbidden    = errors.New("Forbidden")
	ErrNotFound     = errors.New("Resource not found")
)

Functions

func PresentError

func PresentError(r *http.Request, err error) (*http.Request, interface{})

Types

type Article

type Article struct {
	ID                     int      `db:"id" json:"id" xml:"id"`
	Title                  string   `db:"title" json:"title" xml:"title"`
	Data                   []string `db:"data,stringarray" json:"data" xml:"data"`
	CustomDataForAuthUsers string   `db:"custom_data" json:"-" xml:"-"`
}

Article is runtime object, that's not meant to be sent via REST.

Source Files

article.go errors.go

Version
v5.1.0
Published
Jun 28, 2024
Platform
linux/amd64
Imports
3 packages
Last checked
2 hours ago

Tools for package owners.