utils

package
v0.0.0-...-7875947 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareHashAndPassword

func CompareHashAndPassword(hash, password string) bool

func HashPassword

func HashPassword(password string) string

func RespondWithError

func RespondWithError(writer http.ResponseWriter, code int, msg string)

func RespondWithJSON

func RespondWithJSON(writer http.ResponseWriter, code int, payload interface{})

func StartScraping

func StartScraping(db *database.Queries, concurrency int, timeBetweenRequest time.Duration)

Types

type RSSFeed

type RSSFeed struct {
	Channel struct {
		Title       string    `xml:"title"`
		Link        string    `xml:"link"`
		Description string    `xml:"description"`
		Items       []RSSItem `xml:"item"`
		Language    string    `xml:"language"`
	} `xml:"channel"`
}

type RSSItem

type RSSItem struct {
	Title       string `xml:"title"`
	Link        string `xml:"link"`
	Description string `xml:"description"`
	PubDate     string `xml:"pubDate"`
}

Jump to

Keyboard shortcuts

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