yodata

package
v0.0.0-...-df506b3 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetConfig

func SetConfig(c *yoconfig.Config)

Types

type DataService

type DataService struct {
	Db *sql.DB
}

func NewService

func NewService() (*DataService, error)

func (*DataService) GetEmailQuery

func (ds *DataService) GetEmailQuery() (query string, sqlParam string)

This function generates a query to get any birthdays for today's date sqlParam needs to be in format "DD:MM"

func (*DataService) GetEmails

func (ds *DataService) GetEmails() ([]Email, error)

This function will hit our database and return any birthdays that match today's date

type Email

type Email struct {
	FirstName      string
	LastName       string
	Nickname       string
	Email          string
	Phone          string
	Birthday       string
	Type           string
	SenderNickname string
}

Jump to

Keyboard shortcuts

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