utils

package
v0.0.0-...-dc8ef24 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2021 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package utils provides utilities for other packages

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateID

func CreateID() string

CreateID creates a random ID

func CreatePasswordHashAndSalt

func CreatePasswordHashAndSalt(password string) (hash, salt []byte)

CreatePasswordHashAndSalt for a given password

func NewAPIKey

func NewAPIKey(secret string, keyType models.APIKeyType, userID string) (models.APIKey, error)

func NewKeyPair

func NewKeyPair(secret, userID string) (models.APIKeyPair, error)

func ParseJWTClaims

func ParseJWTClaims(secret, signingMethod, token string) (jwt.MapClaims, error)

func PullFeed

func PullFeed(url, etag string) (models.Feed, []models.Entry, error)

PullFeed and return all entries for that feed. If getting the subscription source or parsing the response fails, this function will error.

func VerifyPasswordHash

func VerifyPasswordHash(password string, pwHash, pwSalt []byte) bool

VerifyPasswordHash with a given salt

Types

This section is empty.

Jump to

Keyboard shortcuts

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