api

package
v0.0.0-...-557396d Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	DB *gorm.DB
}

API is the wrapper for interaction with the Team Survey

func (API) GetStats

func (a API) GetStats(s survey.Survey) (stats.CalculatedResult, error)

GetStats will return survey stats

func (API) GetSurvey

func (a API) GetSurvey(id uint) (survey.Survey, error)

GetSurvey get a survey

func (API) GetSurveyByName

func (a API) GetSurveyByName(name string) (survey.Survey, error)

GetSurveyByName get a survey by name

func (API) GetSurveyByNameAndShareCode

func (a API) GetSurveyByNameAndShareCode(name string, shareCode string) (survey.Survey, error)

GetSurveyByNameAndShareCode get a survey by name and share code

func (API) SaveSurvey

func (a API) SaveSurvey(s survey.Survey) (survey.Survey, error)

SaveSurvey will save a new Survey if it doesn't exist

Jump to

Keyboard shortcuts

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