utils

package
v0.0.0-...-3c29c6b Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Cache caches all scraped data

View Source
var ErrorLogger *log.Logger

ErrorLogger hosts the logger that logs errors

View Source
var InfoLogger *log.Logger

InfoLogger hosts the logger that logs info

View Source
var LogDirectory = "logs"

LogDirectory is the name of the Logging dump location

View Source
var RequestLogger *log.Logger

RequestLogger hosts the logger that logs requests

View Source
var WarningLogger *log.Logger

WarningLogger hosts the logger that logs warnings

Functions

func FormatAnime

func FormatAnime(anime models.Anime) models.AnimeEx

FormatAnime returns a proper Anime object

func LoadCache

func LoadCache() bool

LoadCache loads the cache files

func LoadEnvVars

func LoadEnvVars()

LoadEnvVars loads the environment variables

func Log

func Log(input interface{}, logType int)

Log handles logging

func ReturnResponse

func ReturnResponse(w http.ResponseWriter, r *http.Request, data interface{}, err *models.Error, status int)

ReturnResponse returns the response object

func SaveCache

func SaveCache(cache models.Cache)

SaveCache saves the data

Types

This section is empty.

Jump to

Keyboard shortcuts

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