web

package
v0.0.0-...-028e29d Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const IssuesURL = "https://api.github.com/search/issues"

Variables

This section is empty.

Functions

func GetGif

func GetGif(w http.ResponseWriter, r *http.Request)

GetGif will response a gif

func PrintRequest

func PrintRequest(w http.ResponseWriter, r *http.Request)

PrintRequest will response request info

Types

type Hello

type Hello struct{}

Hello is a web handle struct

func (Hello) ServeHTTP

func (h Hello) ServeHTTP(
	w http.ResponseWriter,
	r *http.Request)

type Issue

type Issue struct {
	Number    int
	HTMLURL   string `json:"html_url"`
	Title     string
	State     string
	User      *User
	CreatedAt time.Time `json:"created_at"`
	Body      string    // in Markdown format
}

type IssuesSearchResult

type IssuesSearchResult struct {
	TotalCount int `json:"total_count"`
	Items      []*Issue
}

func SearchIssues

func SearchIssues(terms []string) (*IssuesSearchResult, error)

SearchIssues queries the GitHub issue tracker.

type String

type String string

String is a string web handle

func (String) ServeHTTP

func (str String) ServeHTTP(
	w http.ResponseWriter,
	r *http.Request)

type Struct

type Struct struct {
	Greeting string
	Punct    string
	Who      string
}

Struct is a struct web handle

func (Struct) ServeHTTP

func (str Struct) ServeHTTP(
	w http.ResponseWriter,
	r *http.Request)

type User

type User struct {
	Login   string
	HTMLURL string `json:"html_url"`
}

Jump to

Keyboard shortcuts

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