config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Profile      string            `yaml:"profile"`
	RepoMappings map[string]string `yaml:"repoMappings"`
}

Config holds application configuration loaded from file.

func Load

func Load(path string) (*Config, error)

Load searches for a configuration file and returns the parsed Config. Search order:

  1. explicit path (if non-empty)
  2. .ccpr.yaml in current directory
  3. ~/.config/ccpr/config.yaml

func (*Config) ResolveProfile

func (c *Config) ResolveProfile(flagProfile string) string

ResolveProfile returns the AWS profile to use. Priority: flagProfile > config file > AWS_PROFILE env > "default".

func (*Config) ResolveRepoPath

func (c *Config) ResolveRepoPath(repoName string) (string, error)

ResolveRepoPath returns the local filesystem path for a CodeCommit repository name. Returns an error if no mapping is configured for the given name.

Jump to

Keyboard shortcuts

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