keyshare

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUserNotFound = errors.New("Could not find specified user")

Functions

func ParseEmailTemplates

func ParseEmailTemplates(files, subjects map[string]string, defaultLanguage string) (map[string]*template.Template, error)

Types

type DB

type DB struct {
	*sql.DB
}

func (*DB) ExecCount

func (db *DB) ExecCount(query string, args ...interface{}) (int64, error)

func (*DB) ExecUser

func (db *DB) ExecUser(query string, args ...interface{}) error

func (*DB) QueryIterate

func (db *DB) QueryIterate(query string, f func(rows *sql.Rows) error, args ...interface{}) error

func (*DB) QueryScan

func (db *DB) QueryScan(query string, results []interface{}, args ...interface{}) error

func (*DB) QueryUser

func (db *DB) QueryUser(query string, results []interface{}, args ...interface{}) error

type EmailConfiguration

type EmailConfiguration struct {
	EmailServer     string `json:"email_server" mapstructure:"email_server"`
	EmailFrom       string `json:"email_from" mapstructure:"email_from"`
	DefaultLanguage string `json:"default_language" mapstructure:"default_language"`
	EmailAuth       smtp.Auth
}

func (EmailConfiguration) SendEmail

func (conf EmailConfiguration) SendEmail(
	templates map[string]*template.Template,
	subjects map[string]string,
	templateData map[string]string,
	emails []string,
	lang string,
) error

func (EmailConfiguration) TranslateString

func (conf EmailConfiguration) TranslateString(strings map[string]string, lang string) string

func (EmailConfiguration) VerifyEmailServer

func (conf EmailConfiguration) VerifyEmailServer() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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