service

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2019 License: NCSA Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddUserToMailList

func AddUserToMailList(id string, decision *models.DecisionHistory) error

Adds user with specified id to an appropriate mail list, based on their current decision. If the mail list doesn't exist, a new one is created, containing the user.

func AssignValueType

func AssignValueType(key, value string) (interface{}, error)

func GetDecision

func GetDecision(id string) (*models.DecisionHistory, error)

Returns the decision associated with the given user id

func GetFilteredDecisions

func GetFilteredDecisions(parameters map[string][]string) (*models.FilteredDecisions, error)

Returns decisions based on a filter

func GetMailListFromDecision added in v0.3.0

func GetMailListFromDecision(decision *models.DecisionHistory) (string, error)

Gets the mailing list to add and remove from, based on a decision.

func GetStats

func GetStats() (map[string]interface{}, error)

Returns all decision stats

func HasDecision

func HasDecision(id string) (bool, error)

Checks if a decision with the provided id exists.

func Initialize added in v0.3.0

func Initialize() error

func RemoveUserFromMailList added in v0.3.0

func RemoveUserFromMailList(id string, decision *models.DecisionHistory) error

Removes user from appropriate mail list, based on decision.

func UpdateDecision

func UpdateDecision(id string, decision models.Decision) error

Updates the decision associated with the given user id If a decision doesn't exist it will be created

Types

This section is empty.

Jump to

Keyboard shortcuts

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