utils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChooseProduct

func ChooseProduct(trendingNames []string, trendingNamesMap map[string]string)

func MakeReq

func MakeReq(jsonData map[string]string) []byte

func Readtoken

func Readtoken() string

func ViewProduct

func ViewProduct(args []string)

Types

type PostJSON

type PostJSON struct {
	Data struct {
		Post struct {
			Name          string  `json:"name"`
			Description   string  `json:"description"`
			ID            string  `json:"id"`
			Tagline       string  `json:"tagline"`
			Website       string  `json:"website"`
			ReviewRatings float64 `json:"reviewsRating"`
			Makers        []struct {
				Name            string `json:"name"`
				TwitterUsername string `json:"twitterUsername"`
				Headline        string `json:"headline"`
				WebsiteURL      string `json:"websiteUrl"`
			} `json:"makers"`
			ProductLinks []struct {
				URL  string `json:"url"`
				Type string `json:"type"`
			} `json:"productLinks"`
			Topics struct {
				Edges []struct {
					Node struct {
						Name string `json:"name"`
					} `json:"node"`
				} `json:"edges"`
			} `json:"topics"`
		} `json:"post"`
	} `json:"data"`
}

Jump to

Keyboard shortcuts

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