Documentation ¶
Index ¶
- Constants
- Variables
- func ProviderAuthSchema() map[string]*schema.Schema
- func ProviderConfigureContext(_ context.Context, d *schema.ResourceData) (interface{}, diag.Diagnostics)
- func ProviderConfigureContextWithDefaultTransportForTesting(_ context.Context, d *schema.ResourceData) (interface{}, diag.Diagnostics)
- type AgentTokenInfo
- type TanzuContext
Constants ¶
View Source
const ( ServerEndpointEnvVar = "TMC_ENDPOINT" // TMC SaaS env variables. VMWCloudEndpointEnvVar = "VMW_CLOUD_ENDPOINT" VMWCloudAPITokenEnvVar = "VMW_CLOUD_API_TOKEN" // TMC self managed env variables. OIDCIssuerEndpointEnvVar = "OIDC_ISSUER" TmcSMUsernameEnvVar = "TMC_SM_USERNAME" TmcSMPasswordEnvVar = "TMC_SM_PASSWORD" // Proxy config values. InsecureAllowUnverifiedSSLEnvVar = "INSECURE_ALLOW_UNVERIFIED_SSL" ClientAuthCertFileEnvVar = "CLIENT_AUTH_CERT_FILE" ClientAuthKeyFileEnvVar = "CLIENT_AUTH_KEY_FILE" CAFileEnvVar = "CA_FILE" ClientAuthCertEnvVar = "CLIENT_AUTH_CERT" ClientAuthKeyEnvVar = "CLIENT_AUTH_KEY" CACertEnvVar = "CA_CERT" )
Variables ¶
View Source
var RefreshUserAuthContext = func(config *TanzuContext, refreshCondition func(error) bool, err error) {
if refreshCondition(err) {
if config.IsSelfManaged() {
refreshSMUserAuthCtx(config)
return
}
refreshSaaSUserAuthCtx(config)
}
}
Functions ¶
func ProviderAuthSchema ¶
func ProviderConfigureContext ¶
func ProviderConfigureContext(_ context.Context, d *schema.ResourceData) (interface{}, diag.Diagnostics)
func ProviderConfigureContextWithDefaultTransportForTesting ¶ added in v1.1.4
func ProviderConfigureContextWithDefaultTransportForTesting(_ context.Context, d *schema.ResourceData) (interface{}, diag.Diagnostics)
The default transport is needed for mocking. The http mocking library used in testing can only intercept calls if they're made with the default transport.
Types ¶
type AgentTokenInfo ¶
type AgentTokenInfo struct {
AccessToken string `json:"access_token"`
}
type TanzuContext ¶
type TanzuContext struct { SelfManaged bool ServerEndpoint string SMUsername string Token string // selfmanaged password is stored here VMWCloudEndPoint string // selfmanaged odic issuer is stored here TMCConnection *client.TanzuMissionControl TLSConfig *proxy.TLSConfig }
func (*TanzuContext) IsSelfManaged ¶ added in v1.2.0
func (cfg *TanzuContext) IsSelfManaged() bool
func (*TanzuContext) Setup ¶
func (cfg *TanzuContext) Setup() (err error)
func (*TanzuContext) SetupWithDefaultTransportForTesting ¶ added in v1.1.4
func (cfg *TanzuContext) SetupWithDefaultTransportForTesting() (err error)
The default transport is needed for mocking. The http mocking library used in testing can only intercept calls if they're made with the default transport.
Click to show internal directories.
Click to hide internal directories.