submission

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultListFields = "ParticipantID,StartedAt,TimeTaken,StudyCode,Status"

DefaultListFields is the default fields we should show if the user has not specified.

Variables

This section is empty.

Functions

This section is empty.

Types

type CsvRenderer

type CsvRenderer struct{}

CsvRenderer will render the output in a CSV format.

func (*CsvRenderer) Render

func (r *CsvRenderer) Render(client client.API, opts ListUsedOptions, w io.Writer) error

Render will render the studies in the CSV format.

type ListRenderer

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

ListRenderer defines an interface to allow different strategies to render the list view.

func (*ListRenderer) Render

func (r *ListRenderer) Render(client client.API, opts ListUsedOptions, w io.Writer) error

Render will use the render strategy to render the studies.

func (*ListRenderer) SetStrategy

func (r *ListRenderer) SetStrategy(s ListStrategy)

SetStrategy allows you to set the renderer strategy for the list view.

type ListStrategy

type ListStrategy interface {
	Render(client client.API, opts ListUsedOptions, w io.Writer) error
}

ListStrategy defines an interface to allow different strategies to render the list view.

type ListUsedOptions

type ListUsedOptions struct {
	StudyID        string
	Status         string
	Csv            bool
	NonInteractive bool
	Fields         string
}

ListUsedOptions are the options selected by the user.

type NonInteractiveRenderer

type NonInteractiveRenderer struct{}

NonInteractiveRenderer will just output submission data to the UI.

func (*NonInteractiveRenderer) Render

func (r *NonInteractiveRenderer) Render(client client.API, opts ListUsedOptions, w io.Writer) error

Render will just display the results in a table.

Jump to

Keyboard shortcuts

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