service

package
v0.0.0-...-d9fbcb9 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2019 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

use redis as cache

Index

Constants

View Source
const (
	Expire1min  = 60
	Expire10min = 600
	Expire30min = 1800
)
View Source
const Cookies10days = 864000

Variables

View Source
var Cache *redis.Client

Functions

func EmailConfirm

func EmailConfirm(id uint, appointment model.Appointment, action string)

func SendMail

func SendMail(sender string, from string, to []string, subject string, contentType string, body string)

general function to send email

func SetCookie

func SetCookie(c *gin.Context, key, value string, expire int)

func SetCookies

func SetCookies(c *gin.Context, fields map[string]string, expire int)

func Start

func Start()

start service

Types

type EmailData

type EmailData struct {
	FirstName string
	Date      string
	Price     string
	Comment   string
	Action    string
}

Jump to

Keyboard shortcuts

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