Versions in this module Expand all Collapse all v0 v0.1.0 Dec 25, 2022 Changes in this version + type AlbumFormSession struct + func NewCreateAlbumForm(actionsPort CreateAlbumPort, terminalPort PrintReadTerminalPort) *AlbumFormSession + func (a *AlbumFormSession) AlbumForm(owner string, record Record) (bool, error) + type BackupSuggestionPort interface + BackupSuggestion func(record *SuggestionRecord, existing *ExistingRecord, ...) error + type CreateAlbumPort interface + Create func(createRequest RecordCreation) error + type DeleteAlbumPort interface + DeleteAlbum func(folderName string) error + type DeleteSession struct + func NewDeleteAlbumForm(actionPort DeleteAlbumPort, terminalPort PrintReadTerminalPort) *DeleteSession + func (s *DeleteSession) DeleteAlbum(record Record) (bool, error) + type EditDateSession struct + func NewEditAlbumDateForm(actionPort UpdateAlbumPort, terminalPort PrintReadTerminalPort) *EditDateSession + func (s *EditDateSession) EditAlbumDates(record Record) error + type ExistingRecord struct + ActivePeriods []Period + Count int + End time.Time + FolderName string + Name string + Start time.Time + type ExistingRecordRepositoryPort interface + FindExistingRecords func() ([]*ExistingRecord, error) + type FormFmtAdapter struct + func (f FormFmtAdapter) Print(question string) + func (f FormFmtAdapter) ReadAnswer() (string, error) + type FormUseCase struct + TerminalPort PrintReadTerminalPort + func NewSimpleForm() *FormUseCase + func (f *FormUseCase) ReadBool(label string, notation string) (bool, bool) + func (f *FormUseCase) ReadDate(label string, defaultValue time.Time) (time.Time, bool) + func (f *FormUseCase) ReadString(label string, defaultValue string) (string, bool) + type InteractiveActionsPort interface + type InteractiveRendererPort interface + Height func() int + Render func(state *InteractiveViewState) error + TakeOverScreen func() + type InteractiveSession struct + func NewInteractiveSession(actions InteractiveActionsPort, ...) *InteractiveSession + func (i *InteractiveSession) BackupSelected() + func (i *InteractiveSession) CreateFromSelectedSuggestion(owner string) + func (i *InteractiveSession) CreateNew(owner string) + func (i *InteractiveSession) DeleteSelectedAlbum() + func (i *InteractiveSession) EditSelectedAlbumDates() + func (i *InteractiveSession) EditSelectedAlbumName() + func (i *InteractiveSession) HasError() bool + func (i *InteractiveSession) MoveDown() + func (i *InteractiveSession) MoveUp() + func (i *InteractiveSession) NextPage() + func (i *InteractiveSession) PreviousPage() + func (i *InteractiveSession) Refresh() + func (i *InteractiveSession) Start() error + type InteractiveViewState struct + Actions []string + type NoopRepository struct + func (r NoopRepository) Count() int + func (r NoopRepository) FindSuggestionRecords() []*SuggestionRecord + func (r NoopRepository) Rejects() int + type Period struct + End time.Time + Start time.Time + type PrintReadTerminalPort interface + Print func(question string) + ReadAnswer func() (string, error) + type Record struct + Count int + End time.Time + FolderName string + Indent int + Name string + ParentExistingRecord *ExistingRecord + Start time.Time + Suggestion bool + SuggestionRecord *SuggestionRecord + TotalCount int + type RecordCreation struct + End time.Time + FolderName string + Name string + Owner string + Start time.Time + type RecordsState struct + FirstElement int + PageSize int + Records []*Record + Rejected int + Selected int + type RenameAlbumPort interface + RenameAlbum func(folderName, newName string, renameFolder bool) error + type RenameSession struct + func NewRenameAlbumForm(actionPort RenameAlbumPort, terminalPort PrintReadTerminalPort) *RenameSession + func (s *RenameSession) EditAlbumName(record Record) error + type StaticSession struct + func NewSimpleSession(existingRepository ExistingRecordRepositoryPort, ...) *StaticSession + func (s *StaticSession) Render() error + type SuggestionRecord struct + Distribution map[string]int + End time.Time + FolderName string + Name string + Original interface{} + Start time.Time + type SuggestionRecordRepositoryPort interface + Count func() int + FindSuggestionRecords func() []*SuggestionRecord + Rejects func() int + func NewNoopRepository() SuggestionRecordRepositoryPort + type UpdateAlbumPort interface + UpdateAlbum func(folderName string, start, end time.Time) error + type UserInputPort interface + StartListening func()