Documentation ¶
Index ¶
- func Checksum(algorithm string, data []byte) (checksum string, err error)
- func DecodePayload(payload []byte) interface{}
- func GetFilesByExt(root, ext string) []string
- func GetFilesByName(root, fileNeme string) []string
- func MkAccessToken(data *dto.AccessTokenData, sigKey []byte, TkAge uint8) ([]byte, error)
- func SendSingleMessage(to, subject, message string) error
- func SendToRecipients(recipients []dto.User, subject, message string) error
- func UniqueStrings(input []string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Checksum ¶
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 ¶
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 ¶
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 ¶
MkAccessToken create a signed JTW token with the specified data. This could be used for authentication purpose by a middleware
func SendSingleMessage ¶
func UniqueStrings ¶
Types ¶
This section is empty.