app

package
v0.0.0-...-2f38b72 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFormNotFound = errors.New("form not found")
)

Functions

This section is empty.

Types

type App

type App struct {
	// contains filtered or unexported fields
}

func New

func New(formService *form.Service, responseService *response.Service) *App

func (*App) CreateNewForm

func (a *App) CreateNewForm(ctx context.Context, params form.CreateFormParams) (form.Form, []form.Question, error)

func (*App) GetForm

func (a *App) GetForm(ctx context.Context, id uuid.UUID) (form.Form, error)

func (*App) GetQuestions

func (a *App) GetQuestions(ctx context.Context, params form.GetQuestionsParams) ([]form.Question, error)

func (*App) ListForms

func (a *App) ListForms(ctx context.Context, params form.ListFormsParams) ([]form.Form, error)

func (*App) SubmitResponse

func (a *App) SubmitResponse(ctx context.Context, formId uuid.UUID, resp map[string][]string) error

func (*App) TemplateForm

func (a *App) TemplateForm(ctx context.Context, id uuid.UUID) ([]byte, error)

func (*App) UpdateForm

func (a *App) UpdateForm(ctx context.Context, params form.UpdateFormParams) (form.Form, []form.Question, error)

type TestDB

type TestDB struct {
	Pool *pgxpool.Pool
	// contains filtered or unexported fields
}

func SetupTestPostgresql

func SetupTestPostgresql(dbName string, schema string) (testdb *TestDB, err error)

func (*TestDB) Reset

func (t *TestDB) Reset() error

func (*TestDB) Shutdown

func (t *TestDB) Shutdown() error

Jump to

Keyboard shortcuts

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