Documentation
¶
Index ¶
- func DownloadArchive(repo string, commitHash string) (string, error)
- func ExtractArchive(archivePath string, destination string) error
- func LoadSourceCmd(source string, destination string) tea.Cmd
- func RemoveOldTemplates(templatesPath string) error
- func ShowProgress(sourceLoaderModelState SourceLoaderModelState) bool
- func ShowSpinner(sourceLoaderModelState SourceLoaderModelState) bool
- type SourceLoaderActiveSubModel
- type SourceLoaderFinishedMsg
- type SourceLoaderIncrementProgressMsg
- type SourceLoaderModel
- type SourceLoaderModelState
- type SourceLoaderResetProgressMsg
- type SourceLoaderSetModelStateMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractArchive ¶
func RemoveOldTemplates ¶
func ShowProgress ¶
func ShowProgress(sourceLoaderModelState SourceLoaderModelState) bool
func ShowSpinner ¶
func ShowSpinner(sourceLoaderModelState SourceLoaderModelState) bool
Types ¶
type SourceLoaderActiveSubModel ¶
type SourceLoaderActiveSubModel string
const ( SourceLoaderActiveSubModelSpinner SourceLoaderActiveSubModel = "Spinner" SourceLoaderActiveSubModelProgress SourceLoaderActiveSubModel = "Progress" )
func GetActiveSubModel ¶
func GetActiveSubModel(sourceLoaderModelState SourceLoaderModelState) SourceLoaderActiveSubModel
type SourceLoaderFinishedMsg ¶
type SourceLoaderIncrementProgressMsg ¶
type SourceLoaderIncrementProgressMsg struct {
Increment float64
}
type SourceLoaderModel ¶
type SourceLoaderModel struct {
CurrentState SourceLoaderModelState
Source string
Destination string
ScfConfig *scfconfig.ScfConfig
Content string
Spinner spinner.Model
Progress progress.Model
ProgressWidth int
}
func NewSourceLoaderModel ¶
func NewSourceLoaderModel(source string, destination string) *SourceLoaderModel
func (SourceLoaderModel) Init ¶
func (m SourceLoaderModel) Init() tea.Cmd
func (SourceLoaderModel) View ¶
func (m SourceLoaderModel) View() string
type SourceLoaderModelState ¶
type SourceLoaderModelState string
const ( SourceLoaderModelStateLoading SourceLoaderModelState = "Loading..." SourceLoaderModelStateDownloadingArchive SourceLoaderModelState = "Downloading Template..." SourceLoaderModelStateExtractingArchive SourceLoaderModelState = "Extracting Template..." SourceLoaderModelStateLoadingPrompts SourceLoaderModelState = "Loading Prompts..." SourceLoaderModelStateFinished SourceLoaderModelState = "Finished" )
type SourceLoaderResetProgressMsg ¶
type SourceLoaderResetProgressMsg struct{}
type SourceLoaderSetModelStateMsg ¶
type SourceLoaderSetModelStateMsg struct {
State SourceLoaderModelState
}
Click to show internal directories.
Click to hide internal directories.