utils

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AWSConfig     *viper.Viper
	AWSConfigPath string
	Jeeves        *YamlConfigFile
)

Functions

func CheckAWSLogin

func CheckAWSLogin() (bool, error)

func GetSSOSessionCredentials added in v0.0.10

func GetSSOSessionCredentials(profile string) (aws.Credentials, error)

Returns the current session credentials from a valid SSO session **The client MUST be logged in via `jeeves login` before this function** **will return valid credentials**

func LoadAWSConfig added in v0.0.11

func LoadAWSConfig() error

Loads the .aws/config file into a Viper struct

func LoadJeevesConfig added in v0.0.11

func LoadJeevesConfig() error

Loads the .jeeves.yaml config file, creates it if it does not exist

Types

type AWSSSOConfig added in v0.0.10

type AWSSSOConfig struct {
	SSOSessionName string
	SSOAccountId   string
	SSORoleName    string
	SSOStartURL    string
}

type JeevesAI added in v0.0.11

type JeevesAI struct {
	// List of approved models for use with Jeeves
	ApprovedModels []string `yaml:"ApprovedModels"`
	// The currently set model to use with all Jeeves AI commands
	PreferredModel string `yaml:"PreferredModel"`
}

type JeevesConfig added in v0.0.11

type JeevesConfig struct {
	// Jeeves AI configuration
	AI JeevesAI `yaml:"AI"`
	// Jeeves SSO configuration
	SSO JeevesSSO `yaml:"SSO"`
}

type JeevesSSO added in v0.0.11

type JeevesSSO struct {
	// The start url for SSO
	Start string `yaml:"Start"`
}

type YamlConfigFile added in v0.0.11

type YamlConfigFile struct {
	ConfigSettings JeevesConfig
	// contains filtered or unexported fields
}

func (*YamlConfigFile) ReadInConfig added in v0.0.11

func (cfg *YamlConfigFile) ReadInConfig() error

func (*YamlConfigFile) SetConfigFile added in v0.0.11

func (cfg *YamlConfigFile) SetConfigFile(filepath string)

func (*YamlConfigFile) WriteConfig added in v0.0.11

func (cfg *YamlConfigFile) WriteConfig() error

Directories

Path Synopsis
pom

Jump to

Keyboard shortcuts

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