app

package
v0.0.0-...-2109d14 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

Functions

func ErrorResponse

func ErrorResponse(c *gin.Context, status int, err error)

func Initialize

func Initialize(db *gorm.DB)

func Scrape

func Scrape(endpoint string) (*goquery.Document, error)

func SuccessResponse

func SuccessResponse(c *gin.Context, data interface{})

func TargetUrl

func TargetUrl(endpoint string) string

Types

type Device

type Device struct {
	Name  string      `json:"name"`
	Slug  string      `json:"slug"`
	Image DeviceImage `json:"image"`
}

type DeviceImage

type DeviceImage struct {
	Src string `json:"src"`
	Alt string `json:"alt"`
}

type Page

type Page struct {
	Page uint   `json:"page"`
	Link string `json:"link"`
}

type Pages

type Pages []*Page

func (Pages) Len

func (p Pages) Len() int

func (Pages) Less

func (p Pages) Less(i, j int) bool

func (Pages) Swap

func (p Pages) Swap(i, j int)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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