business

package
v0.0.0-...-3dd14bf Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

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

Jump to

Keyboard shortcuts

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