Documentation
¶
Index ¶
- type ExportService
- type FileHandler
- func (f *FileHandler) AppendKeyToContent(content, key, value string) string
- func (f *FileHandler) EnsureDirectory(path string) error
- func (f *FileHandler) FileExists(path string) bool
- func (f *FileHandler) FindKeyInContent(content, key string) (int, bool)
- func (f *FileHandler) ReadFile(path string) (string, error)
- func (f *FileHandler) UpdateKeyInContent(content, key, value string, keyIndex int) string
- func (f *FileHandler) WriteFile(path, content string) error
- type GitHandler
- func (g *GitHandler) AddToGitignore(gitRoot, filePath string) error
- func (g *GitHandler) FindGitRoot(startPath string) (string, bool)
- func (g *GitHandler) IsFileIgnored(gitignoreContent, filePath, gitRoot string) bool
- func (g *GitHandler) ReadFile(path string) (string, error)
- func (g *GitHandler) ReadGitignore(gitRoot string) (string, error)
- func (g *GitHandler) WriteFile(path, content string) error
- type PromptHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExportService ¶
type ExportService struct {
// contains filtered or unexported fields
}
func NewExportService ¶
func NewExportService(forceOverride bool) *ExportService
func (*ExportService) ExportSecret ¶
func (e *ExportService) ExportSecret(key, value, filePath string) error
type FileHandler ¶
type FileHandler struct{}
func NewFileHandler ¶
func NewFileHandler() *FileHandler
func (*FileHandler) AppendKeyToContent ¶
func (f *FileHandler) AppendKeyToContent(content, key, value string) string
func (*FileHandler) EnsureDirectory ¶
func (f *FileHandler) EnsureDirectory(path string) error
func (*FileHandler) FileExists ¶
func (f *FileHandler) FileExists(path string) bool
func (*FileHandler) FindKeyInContent ¶
func (f *FileHandler) FindKeyInContent(content, key string) (int, bool)
func (*FileHandler) UpdateKeyInContent ¶
func (f *FileHandler) UpdateKeyInContent(content, key, value string, keyIndex int) string
func (*FileHandler) WriteFile ¶
func (f *FileHandler) WriteFile(path, content string) error
type GitHandler ¶
type GitHandler struct{}
func NewGitHandler ¶
func NewGitHandler() *GitHandler
func (*GitHandler) AddToGitignore ¶
func (g *GitHandler) AddToGitignore(gitRoot, filePath string) error
func (*GitHandler) FindGitRoot ¶
func (g *GitHandler) FindGitRoot(startPath string) (string, bool)
func (*GitHandler) IsFileIgnored ¶
func (g *GitHandler) IsFileIgnored(gitignoreContent, filePath, gitRoot string) bool
func (*GitHandler) ReadGitignore ¶
func (g *GitHandler) ReadGitignore(gitRoot string) (string, error)
func (*GitHandler) WriteFile ¶
func (g *GitHandler) WriteFile(path, content string) error
type PromptHandler ¶
type PromptHandler struct{}
func NewPromptHandler ¶
func NewPromptHandler() *PromptHandler
func (*PromptHandler) ConfirmGitignore ¶
func (p *PromptHandler) ConfirmGitignore(filePath string) bool
func (*PromptHandler) ConfirmOverwrite ¶
func (p *PromptHandler) ConfirmOverwrite(key string) bool
Click to show internal directories.
Click to hide internal directories.