Documentation ¶
Index ¶
Constants ¶
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 ¶
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.