v3

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func ArticleChanToV3Chan

func ArticleChanToV3Chan(r *http.Request, fromChan chan *data.Article) (chan *Article, error)

An optional, optimized presenter for channnel of Articles. If not defined, each item will be preseted using ArticleToV3() func.

func CatchAll

func CatchAll(r *http.Request, v interface{}) (*http.Request, interface{})

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

func ArticleSliceToV3Slice(r *http.Request, fromSlice []*data.Article) ([]*Article, error)

An optional, optimized presenter for slice of Articles. If not defined, each item will be preseted using ArticleToV3() func.

func ArticleToV3

func ArticleToV3(r *http.Request, from *data.Article) (*Article, error)

Jump to

Keyboard shortcuts

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