Documentation ¶
Overview ¶
Package business contains the business logic
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SurveyProvider ¶
type SurveyProvider interface { // ProvideSurvey search for a survey by id and save it in the io.Reader ProvideSurvey(string) (io.Reader, error) }
SurveyProvider defines a provider of serialized survey data
type SurveyProviderMock ¶
type SurveyProviderMock struct {
// contains filtered or unexported fields
}
SurveyProviderMock mock of SurveyProvider used to testing
func (SurveyProviderMock) ProvideSurvey ¶
func (m SurveyProviderMock) ProvideSurvey(string) (io.Reader, error)
ProvideSurvey returns m.reader and m.error (the string parameter is ignored)
type SurveyTemplateProvider ¶
type SurveyTemplateProvider struct { repository.SurveyFinder *template.Template }
SurveyTemplateProvider provider of serialized survey data in html
func (SurveyTemplateProvider) ProvideSurvey ¶
func (p SurveyTemplateProvider) ProvideSurvey(surveyId string) (io.Reader, error)
ProvideSurvey search a model.Survey to then render it in a html page returned in io.Reader
Click to show internal directories.
Click to hide internal directories.