lib

package
v0.0.0-...-748ae4c Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2022 License: GPL-3.0 Imports: 14 Imported by: 0

README

Here we put all the codebase we want ot use as library or general SDK.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Checksum

func Checksum(algorithm string, data []byte) (checksum string, err error)

Checksum returns the checksum of some data, using a specified algorithm. It only returns an error when an invalid algorithm is used. The valid ones are SHA256

func DecodePayload

func DecodePayload(payload []byte) interface{}

func GetFilesByExt

func GetFilesByExt(root, ext string) []string

GetFilesByExt search recursively into the given root path, to seek the files that match the specified file extension

- root [string] ~ Root path to search in on

- ext [string] ~ File extension to look for

func GetFilesByName

func GetFilesByName(root, fileNeme string) []string

GetFilesByName search recursively into the given root path, to seek the files that match the specified file filename

- root [string] ~ Root path to search in on

- fileNeme [string] ~ File name to look for

func MkAccessToken

func MkAccessToken(data *dto.AccessTokenData, sigKey []byte, TkAge uint8) ([]byte, error)

MkAccessToken create a signed JTW token with the specified data. This could be used for authentication purpose by a middleware

func SendSingleMessage

func SendSingleMessage(to, subject, message string) error

func SendToRecipients

func SendToRecipients(recipients []dto.User, subject, message string) error

func UniqueStrings

func UniqueStrings(input []string) []string

Types

This section is empty.

Jump to

Keyboard shortcuts

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