config

package
v0.0.0-...-4e49b11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Save

func Save(cfg *Config) (string, error)

Save returns (config file path, error)

Types

type Config

type Config struct {
	Theme ThemeConfig `json:"theme"`

	// Keys are the git repo path, e.g. "raymondji/git-stack-cli"
	Repositories map[string]RepoConfig `json:"repositories"`
}

func Load

func Load() (*Config, error)

type GithubConfig

type GithubConfig struct {
	PersonalAccessToken string `json:"personalAccessToken"`
}

type GitlabConfig

type GitlabConfig struct {
	PersonalAccessToken string `json:"personalAccessToken"`
}

type RepoConfig

type RepoConfig struct {
	DefaultBranch string       `json:"defaultBranch"`
	Gitlab        GitlabConfig `json:"gitlab"`
	Github        GithubConfig `json:"github"`
}

type Theme

type Theme struct {
	PrimaryColor    lipgloss.Style
	SecondaryColor  lipgloss.Style
	TertiaryColor   lipgloss.Style
	QuaternaryColor lipgloss.Style
}

func NewTheme

func NewTheme(cfg ThemeConfig) Theme

type ThemeConfig

type ThemeConfig struct {
	PrimaryColor    string `json:"primaryColor"`
	SecondaryColor  string `json:"secondaryColor"`
	TertiaryColor   string `json:"tertiaryColor"`
	QuaternaryColor string `json:"quarternaryColor"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL