Deprecated: Please upgrade to the latest major version: go get github.com/go-chi/chi/v5
package v3
import "github.com/go-chi/chi/_examples/versions/presenter/v3"
Index ¶
- Variables
- func ArticleChanToV3Chan(r *http.Request, fromChan chan *data.Article) (chan *Article, error)
- func CatchAll(r *http.Request, v interface{}) (*http.Request, interface{})
- type Article
Variables ¶
var Presenter = render.NewPresenter(CatchAll, ArticleToV3, ArticleChanToV3Chan, ArticleSliceToV3Slice)
Functions ¶
func ArticleChanToV3Chan ¶
An optional, optimized presenter for channnel of Articles. If not defined, each item will be preseted using ArticleToV3() func.
func CatchAll ¶
Types ¶
type Article ¶
type Article struct { *data.Article `json:",inline" xml:",inline"` // Additional fields. URL string `json:"url" xml:"url"` ViewsCount int64 `json:"views_count" xml:"views_count"` APIVersion string `json:"api_version" xml:"api_version"` // Omitted fields. // Show custom_data explicitly for auth'd users only. CustomDataForAuthUsers interface{} `json:"custom_data,omitempty" xml:"custom_data,omitempty"` }
Article presented in API version 2.
func ArticleSliceToV3Slice ¶
An optional, optimized presenter for slice of Articles. If not defined, each item will be preseted using ArticleToV3() func.
func ArticleToV3 ¶
Source Files ¶
- Version
- v2.0.0+incompatible
- Published
- Jan 6, 2017
- Platform
- js/wasm
- Imports
- 8 packages
- Last checked
- 5 days ago –
Tools for package owners.