Documentation
¶
Index ¶
Constants ¶
const DefaultListFields = "ID,Name,Status"
DefaultListFields is the default fields we should show if the user has not specified.
Variables ¶
This section is empty.
Functions ¶
func GetStudyPath ¶
GetStudyPath returns the URL path to a study, agnostic of domain
func GetStudyURL ¶
GetStudyURL returns the full URL to a study using configuration
func RenderStudy ¶
RenderStudy will produce a detailed view of the selected study.
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, studies client.ListStudiesResponse, opts ListUsedOptions, w io.Writer) error
Render will render the studies in the CSV format.
type InteractiveRenderer ¶
type InteractiveRenderer struct{}
InteractiveRenderer runs the bubbles UI framework to provide a rich UI experience for the user.
func (*InteractiveRenderer) Render ¶
func (r *InteractiveRenderer) Render(client client.API, studies client.ListStudiesResponse, opts ListUsedOptions, w io.Writer) error
Render will render the list in an interactive manner.
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, studies client.ListStudiesResponse, 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, studies client.ListStudiesResponse, opts ListUsedOptions, w io.Writer) error
}
ListStrategy defines an interface to allow different strategies to render the list view.
type ListUsedOptions ¶
ListUsedOptions are the options selected by the user.
type ListView ¶
type ListView struct {
List list.Model
Studies map[string]model.Study
Study *model.Study
Client client.API
}
ListView is responsible for presenting a list view to the user.
type NonInteractiveRenderer ¶
type NonInteractiveRenderer struct{}
NonInteractiveRenderer will just output study data to the UI.
func (*NonInteractiveRenderer) Render ¶
func (r *NonInteractiveRenderer) Render(client client.API, studies client.ListStudiesResponse, opts ListUsedOptions, w io.Writer) error
Render will just display the results in a table.