Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetStatePath ¶
GetStatePath determines the appropriate location for the state file. The state file is stored in .datarobot/cli directory within the current repository.
func HasCompletedDotenvSetup ¶
func HasCompletedDotenvSetup() bool
HasCompletedDotenvSetup checks if dotenv setup has been completed in the past. If force-interactive flag is set, this always returns false to force re-execution.
func Save ¶
Save writes the state file to the appropriate location. Creates parent directories if they don't exist. Note: Consider using Update() instead, which automatically sets CLIVersion.
func UpdateAfterDotenvSetup ¶
func UpdateAfterDotenvSetup() error
UpdateAfterDotenvSetup updates the state file after a successful `dr dotenv setup` run.
func UpdateAfterSuccessfulRun ¶
func UpdateAfterSuccessfulRun() error
UpdateAfterSuccessfulRun creates or updates the state file after a successful `dr start` run.
func UpdateAfterTemplatesSetup ¶ added in v0.2.9
func UpdateAfterTemplatesSetup() error
UpdateAfterTemplatesSetup updates the state file after a successful `dr templates setup` run.
Types ¶
type State ¶
type State struct {
// CLIVersion is the version of the CLI used for the successful run
CLIVersion string `yaml:"cli_version"`
// LastStart is an ISO8601-compliant timestamp of the last successful `dr start` run
LastStart time.Time `yaml:"last_start"`
// LastTemplatesSetup is an ISO8601-compliant timestamp of the last successful `dr templates setup` run
LastTemplatesSetup *time.Time `yaml:"last_templates_setup,omitempty"`
// LastDotenvSetup is an ISO8601-compliant timestamp of the last successful `dr dotenv setup` run
LastDotenvSetup *time.Time `yaml:"last_dotenv_setup,omitempty"`
}
State represents the current state of CLI interactions with a repository.