common

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClaimsFromToken

func ClaimsFromToken(claim jwt.Claims, token string, key []byte) error

ClaimsFromToken parses the claims from the token

func GetToken

func GetToken(c *gin.Context) (string, error)

GetToken gets the token from the headers

func ParamS added in v0.0.5

func ParamS(param string, c *gin.Context) string

ParamS sanitize the param

func QueryS added in v0.0.5

func QueryS(param string, c *gin.Context) string

QueryS sanitize the param

func Sanitize added in v0.0.5

func Sanitize(param string) string

Sanitize removes all path separators

func SignClaims

func SignClaims(claims jwt.Claims, key []byte) (string, error)

SignClaims signs the claims i.e. creates a token

Types

type EntryType added in v0.0.12

type EntryType string
const (
	DocumentType   EntryType = "DocumentType"
	CollectionType EntryType = "CollectionType"
)

type SyncVersion added in v0.0.12

type SyncVersion int
const (
	Sync10 SyncVersion = 10
	Sync15 SyncVersion = 15
)

Jump to

Keyboard shortcuts

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