config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create() error

func GetAWSProfile

func GetAWSProfile(cmd *cobra.Command) (string, error)

func GetProfile

func GetProfile(cmd *cobra.Command) (string, error)

func GetRepositories

func GetRepositories(profile string) ([]string, error)

func IsGovCloud

func IsGovCloud(cmd *cobra.Command, profile string) bool

func ProfileLookup

func ProfileLookup(profile string) error

func Read

func Read() error

Read config file cprl.yaml

Types

type CodeCommitConfig

type CodeCommitConfig struct {
	*Config
	AuthorARN  string
	Repository string
	PRStatus   types.PullRequestStatusEnum
}

func NewCodeCommitConfig

func NewCodeCommitConfig(cmd *cobra.Command) (*CodeCommitConfig, error)

type Config

type Config struct {
	Profile    string
	AWSProfile string
}

func NewConfig

func NewConfig(cmd *cobra.Command) (*Config, error)

func (*Config) InteractivelyAssignProfile

func (c *Config) InteractivelyAssignProfile(profiles []string) error

func (*Config) SetAWSProfile

func (c *Config) SetAWSProfile(cmd *cobra.Command) error

func (*Config) SetProfile

func (c *Config) SetProfile(cmd *cobra.Command) error

type ConfigFile

type ConfigFile struct {
	Default ProfileBody `yaml:"default"`
}

type ConsoleConfig

type ConsoleConfig struct {
	*Config
	Interactive bool
	IsGovCloud  bool
}

func NewConsoleConfig

func NewConsoleConfig(cmd *cobra.Command) (*ConsoleConfig, error)

type CredentialsConfig

type CredentialsConfig struct {
	*Config
	RoleARN       string
	SessionName   string
	OutputProfile string
	OutputStyle   string
	IsJSON        bool
	Interactive   bool
}

func NewCredentialsConfig

func NewCredentialsConfig(cmd *cobra.Command) (*CredentialsConfig, error)

type ProfileBody

type ProfileBody struct {
	Config   ProfileConfig   `yaml:"config"`
	Services ProfileServices `yaml:"services"`
}

type ProfileConfig

type ProfileConfig struct {
	AWSProfile string `yaml:"aws-profile"`
}

type ProfileServices

type ProfileServices struct {
	Console    ProfileServicesConsole    `yaml:"console"`
	CodeCommit ProfileServicesCodeCommit `yaml:"codecommit"`
}

type ProfileServicesCodeCommit

type ProfileServicesCodeCommit struct {
	Repositories []string `yaml:"repositories"`
}

type ProfileServicesConsole

type ProfileServicesConsole struct {
	GovCloud bool `yaml:"gov-cloud"`
}

Jump to

Keyboard shortcuts

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