chi: github.com/go-chi/chi/_examples/versions/presenter/v3 Index | Files

package v3

import "github.com/go-chi/chi/_examples/versions/presenter/v3"

Index

Package Files

article.go

type Article Uses

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 NewArticleResponse Uses

func NewArticleResponse(article *data.Article) *Article

func (*Article) Render Uses

func (a *Article) Render(w http.ResponseWriter, r *http.Request) error

Package v3 imports 4 packages (graph) and is imported by 2 packages. Updated 2019-12-16. Refresh now. Tools for package owners.