handler

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Article

type Article struct {
	UUID        string     `json:"uuid,omitempty"`
	Title       string     `json:"title,omitempty"`
	Description string     `json:"description,omitempty"`
	Keywords    string     `json:"keywords,omitempty"`
	Snippet     string     `json:"snippet,omitempty"`
	Url         string     `json:"url,omitempty"`
	ImageUrl    string     `json:"image_url,omitempty"`
	PublishedAt string     `json:"published_at,omitempty"`
	Source      string     `json:"source,omitempty"`
	Categories  []string   `json:"categories,omitempty"`
	Language    string     `json:"language,omitempty"`
	Locale      string     `json:"locale,omitempty"`
	Similar     []*Article `json:"similar,omitempty"`
}

type Headlines

type Headlines struct {
	Data map[string][]*Article `json:"data"`
}

type News

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

func New

func New(apiKey string) *News

func (*News) Headlines

func (n *News) Headlines(ctx context.Context, req *pb.HeadlinesRequest, rsp *pb.HeadlinesResponse) error

Jump to

Keyboard shortcuts

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