util

package
v74.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractJWT

func ExtractJWT(authHeader string) string

func GetTokenExp

func GetTokenExp(tokenString string) time.Time

func IsTokenUsable

func IsTokenUsable(tokenString string) bool

verify token is valid, and also exp and nbf on token

func MakeWsURL

func MakeWsURL(url string) string

MakeWsURL converts http:// to ws://

func Min

func Min(a, b int) int

Min returns minimum of two ints

Types

type Logger

type Logger interface {
	Printf(format string, a ...interface{})
	Print(a ...interface{})
}

Logger is used by Session and Client to write logs

type NilLogger

type NilLogger struct{}

NilLogger implements Logger and discards all writes

func (*NilLogger) Print

func (n *NilLogger) Print(a ...interface{})

Print discards writes

func (*NilLogger) Printf

func (n *NilLogger) Printf(format string, a ...interface{})

Printf discards writes

Jump to

Keyboard shortcuts

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