Documentation ¶
Index ¶
- Constants
- func GetClientListNames(clients ClientList) []string
- func GetSupportedClientTypes() []string
- func InitConfigDir(cfgDir string) (string, error)
- func InitConfigDirWithViper() (string, error)
- func SyncGetConfigDir() string
- func SyncInitConfigDir(cfgDir string)
- func SyncInitConfigDirErr() error
- type A0deployConfig
- type API
- type Auth0Config
- type Client
- type ClientConfig
- type ClientList
- type Tenant
- type TenantConfig
- func (a *TenantConfig) GetTenantAPINames(tenantAPIs []API) []string
- func (t *TenantConfig) GetTenantConfig(tenantName string) *Tenant
- func (a *TenantConfig) GetTenantListNames() []string
- func (a *TenantConfig) GetTenantProfileList() *TenantProfileList
- func (a *TenantConfig) SaveTenantConfig() error
- func (a *TenantConfig) SetTenant(profileName string, profile *Tenant)
- type TenantProfile
- type TenantProfileList
Constants ¶
const ( KeyRootCmdConfigDir = "configdir" TenantConfigFile = "tenant-config.yaml" Auth0DeployConfigFile = "a0deploy-config.json" ClientConfigFile = "client-config.yaml" FlagRootCmdConfigDir = "config-dir" DescRootCmdConfigDir = "directory of spsauth0 configuration files." DefaultRootCmdConfigDir = "~/.spsauth0" KeyCmdTenantName = "tenant_name" )
Variables ¶
This section is empty.
Functions ¶
func GetClientListNames ¶
func GetClientListNames(clients ClientList) []string
func GetSupportedClientTypes ¶
func GetSupportedClientTypes() []string
func InitConfigDir ¶
InitConfigDir ensures the spsauth0 config dir has been created
func InitConfigDirWithViper ¶
InitConfigDirWithViper ensures the spsauth0 config dir has been created and uses viper to load the path to the spsauth0 dir
func SyncGetConfigDir ¶
func SyncGetConfigDir() string
SyncGetConfigDir gets the config dir synchronously, if loaded.
func SyncInitConfigDir ¶
func SyncInitConfigDir(cfgDir string)
SyncInitConfigDir initializes the config directory for spsauth0
func SyncInitConfigDirErr ¶
func SyncInitConfigDirErr() error
SyncInitConfigDirErr reports if there was an error initializing the config dir, or if initialization has not yet occurred.
Types ¶
type A0deployConfig ¶
type A0deployConfig struct {
// contains filtered or unexported fields
}
TenantConfig represents auth0 Tenants that spsauth0 stores
func LoadA0DeployConfigWithViper ¶
func LoadA0DeployConfigWithViper() (*A0deployConfig, error)
LoadTenantConfigWithViper sets the path to aws cred config using the viper config (i.e. --configdir) and then ensures the AWS config file exists and loads it.
func LoadA0deployConfig ¶
func LoadA0deployConfig(cfgFile string) (*A0deployConfig, error)
func (*A0deployConfig) GetA0deployConfig ¶
func (a0 *A0deployConfig) GetA0deployConfig(tenantName string) *Auth0Config
GetTenantConfig returns the tenantConfig for the specified name or nil if the tenant does not exist or config has not been loaded.
func (*A0deployConfig) SetA0deployConfig ¶
func (a0 *A0deployConfig) SetA0deployConfig(profileName string, profile *Auth0Config)
SetAWSProfile sets the profile in the local cache and the store
type Auth0Config ¶
type Client ¶
type Client struct { ClientId string ClientSecret string ClientName string ClientType string TenantName string Token string Audience string }
Rename this vales to not have the type client in them.
type ClientConfig ¶
type ClientConfig struct {
// contains filtered or unexported fields
}
func LoadClientConfig ¶
func LoadClientConfig(cfgFile string) (*ClientConfig, error)
LoadClientConfig ensures the tenant config file exists and then loads it. Once loaded, it can be set and written to multiple times within the process. If changes are made directly to the file, though, they will likely be overwritten while the process is running
func LoadClientConfigWithViper ¶
func LoadClientConfigWithViper() (*ClientConfig, error)
LoadClientConfigWithViper sets the path to aws cred config using the viper config (i.e. --configdir) and then ensures the AWS config file exists and loads it.
func (*ClientConfig) GetClientConfig ¶
func (c *ClientConfig) GetClientConfig(clientName string) *Client
GetTenantConfig returns the tenantConfig for the specified name or nil if the tenant does not exist or config has not been loaded.
func (*ClientConfig) GetClientList ¶
func (c *ClientConfig) GetClientList(tenantName string) *ClientList
GetTenantProfileList returns a list of all AWSProfilesItems in the config store, or nil if there was an error loading the config.
func (*ClientConfig) SaveClientConfig ¶
func (c *ClientConfig) SaveClientConfig() error
SaveTenantConfig writes the config back to disk, capturing any profile and session changes
func (*ClientConfig) SetClient ¶
func (c *ClientConfig) SetClient(client *Client)
SetAWSProfile sets the profile in the local cache and the store
type ClientList ¶
type ClientList []*Client
type Tenant ¶
type Tenant struct {
Tenant TenantProfile
}
Remove this struct. No reason to have this be a wrapper around TenantProfile
type TenantConfig ¶
type TenantConfig struct {
// contains filtered or unexported fields
}
TenantConfig represents auth0 Tenants that spsauth0 stores
func LoadTenantConfig ¶
func LoadTenantConfig(cfgFile string) (*TenantConfig, error)
LoadTenantConfig ensures the tenant config file exists and then loads it. Once loaded, it can be set and written to multiple times within the process. If changes are made directly to the file, though, they will likely be overwritten while the process is running
func LoadTenantConfigWithViper ¶
func LoadTenantConfigWithViper() (*TenantConfig, error)
LoadTenantConfigWithViper sets the path to aws cred config using the viper config (i.e. --configdir) and then ensures the AWS config file exists and loads it.
func (*TenantConfig) GetTenantAPINames ¶
func (a *TenantConfig) GetTenantAPINames(tenantAPIs []API) []string
func (*TenantConfig) GetTenantConfig ¶
func (t *TenantConfig) GetTenantConfig(tenantName string) *Tenant
GetTenantConfig returns the tenantConfig for the specified name or nil if the tenant does not exist or config has not been loaded.
func (*TenantConfig) GetTenantListNames ¶
func (a *TenantConfig) GetTenantListNames() []string
func (*TenantConfig) GetTenantProfileList ¶
func (a *TenantConfig) GetTenantProfileList() *TenantProfileList
GetTenantProfileList returns a list of all AWSProfilesItems in the config store, or nil if there was an error loading the config.
func (*TenantConfig) SaveTenantConfig ¶
func (a *TenantConfig) SaveTenantConfig() error
SaveTenantConfig writes the config back to disk, capturing any profile and session changes
func (*TenantConfig) SetTenant ¶
func (a *TenantConfig) SetTenant(profileName string, profile *Tenant)
SetAWSProfile sets the profile in the local cache and the store
type TenantProfile ¶
type TenantProfileList ¶
type TenantProfileList []*TenantProfile