helpers

package
v1.0.0-develop.3 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2018 License: GPL-3.0 Imports: 10 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UserBlacklist = map[string]int{}/* 521 elements not displayed */

UserBlacklist copyright by Martin Sandström see license https://github.com/marteinn/The-Big-Username-Blacklist/blob/master/LICENSE

Functions

func CheckHash

func CheckHash(password, dbPassword string) bool

func IsLocalHandle

func IsLocalHandle(handle string) bool

func PageOffset

func PageOffset(page uint) uint

func ParseHost

func ParseHost(handle string) (string, error)

func ParseMentions

func ParseMentions(text string) [][]string

Will contain following parts

Index Match
0 @{ganggo@localhost; ganggo@localhost}
1 ganggo@localhost
2 ganggo
3 localhost

func ParseTags

func ParseTags(text string) [][]string

func ParseUsername

func ParseUsername(handle string) (string, error)

func ParseWebfingerHandle

func ParseWebfingerHandle(handle string) (string, error)

func Token

func Token() (string, error)

func Uuid

func Uuid() (string, error)

func UuidFromSalt

func UuidFromSalt(salt string) string

Types

type AppLogWrapper

type AppLogWrapper struct {
	Name string
}

func (AppLogWrapper) Print

func (wrap AppLogWrapper) Print(v ...interface{})

func (AppLogWrapper) Println

func (wrap AppLogWrapper) Println(v ...interface{})

type SentryLogHandler

type SentryLogHandler struct{}

SentryLogHandler will intercept logging and send all errors with a log level greater then info to the specified DSN

func (SentryLogHandler) Log

func (handler SentryLogHandler) Log(record *log15.Record) error

Jump to

Keyboard shortcuts

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