helpers

package
v0.0.0-...-ea178e4 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateJwtToken

func CreateJwtToken(id string) (*string, error)

func GetConfig

func GetConfig(ctx context.Context) config.AppConfig

func HandleError

func HandleError(err error)

func HashAndSalt

func HashAndSalt(pass []byte) string

func ParseTemplate

func ParseTemplate(templateFileName string, data interface{}) (*string, error)

func ParseToken

func ParseToken(authHeader string) (jwt.MapClaims, error)

func SendEmail

func SendEmail(email string, subject string, template string, templateData interface{}) error

func SliceContains

func SliceContains[K comparable](s []K, e K) bool

func TimeNow

func TimeNow() *time.Time

Types

type Mail

type Mail struct {
	Sender  string
	To      []string
	Subject string
	Body    string
}

func (*Mail) BuildMessage

func (m *Mail) BuildMessage() string

Jump to

Keyboard shortcuts

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