Documentation ¶
Index ¶
- func CanMarshal(obj interface{}) bool
- func ConfigureLogging(logLevel string, logCaller bool)
- func ConfigureTerraformProviderLogging(logLevel string, logCaller bool)
- func GetEnv(key, fallback string) string
- func GetTestdataLocation() (string, error)
- func JSONBytesEqual(a, b []byte) (bool, error)
- func LoadTestConfig(t *testing.T, file string) string
- func LoadTestTemplateConfig(t *testing.T, file string, variables map[string]string) string
- func NewLoggingRoundTripper(ctx context.Context, next http.RoundTripper, logger Logger) http.RoundTripper
- func ResourceToBool(d *schema.ResourceData, name string) bool
- func ResourceToFloat(d *schema.ResourceData, name string) float64
- func ResourceToInt(d *schema.ResourceData, name string) int
- func ResourceToInterfaceMap(d *schema.ResourceData, name string) map[string]interface{}
- func ResourceToString(d *schema.ResourceData, name string) string
- func ResourceToStringArray(d *schema.ResourceData, name string) []string
- func ResourceToStringMap(d *schema.ResourceData, name string) map[string]string
- type Logger
- type LoggingRoundTripper
- type TerraformLogger
- func (t TerraformLogger) Debugf(ctx context.Context, msg string, additionalFields ...interface{})
- func (t TerraformLogger) Errorf(ctx context.Context, msg string, additionalFields ...interface{})
- func (t TerraformLogger) Infof(ctx context.Context, msg string, additionalFields ...interface{})
- func (t TerraformLogger) Tracef(ctx context.Context, msg string, additionalFields ...interface{})
- func (t TerraformLogger) Warnf(ctx context.Context, msg string, additionalFields ...interface{})
- type ZerologLogger
- func (t ZerologLogger) Debugf(ctx context.Context, msg string, additionalFields ...interface{})
- func (t ZerologLogger) Errorf(ctx context.Context, msg string, additionalFields ...interface{})
- func (t ZerologLogger) Infof(ctx context.Context, msg string, additionalFields ...interface{})
- func (t ZerologLogger) Tracef(ctx context.Context, msg string, additionalFields ...interface{})
- func (t ZerologLogger) Warnf(ctx context.Context, msg string, additionalFields ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanMarshal ¶
func CanMarshal(obj interface{}) bool
CanMarshal returns if an object implements the json.Marshaler interface and thus can be marshaled
func ConfigureLogging ¶
func ConfigureTerraformProviderLogging ¶
ConfigureTerraformProviderLogging configures zerolog according to the format expected by terraform according to https://www.terraform.io/docs/extend/debugging.html#log-based-debugging
func GetTestdataLocation ¶
func JSONBytesEqual ¶
func LoadTestTemplateConfig ¶
func NewLoggingRoundTripper ¶
func NewLoggingRoundTripper(ctx context.Context, next http.RoundTripper, logger Logger) http.RoundTripper
func ResourceToBool ¶
func ResourceToBool(d *schema.ResourceData, name string) bool
func ResourceToFloat ¶
func ResourceToFloat(d *schema.ResourceData, name string) float64
func ResourceToInt ¶
func ResourceToInt(d *schema.ResourceData, name string) int
func ResourceToInterfaceMap ¶
func ResourceToInterfaceMap(d *schema.ResourceData, name string) map[string]interface{}
func ResourceToString ¶
func ResourceToString(d *schema.ResourceData, name string) string
func ResourceToStringArray ¶
func ResourceToStringArray(d *schema.ResourceData, name string) []string
func ResourceToStringMap ¶
func ResourceToStringMap(d *schema.ResourceData, name string) map[string]string
Types ¶
type Logger ¶ added in v1.0.1
type Logger interface { Tracef(ctx context.Context, msg string, additionalFields ...interface{}) Debugf(ctx context.Context, msg string, additionalFields ...interface{}) Warnf(ctx context.Context, msg string, additionalFields ...interface{}) Errorf(ctx context.Context, msg string, additionalFields ...interface{}) Infof(ctx context.Context, msg string, additionalFields ...interface{}) }
type LoggingRoundTripper ¶
type LoggingRoundTripper struct {
// contains filtered or unexported fields
}
type TerraformLogger ¶ added in v1.0.1
type TerraformLogger struct { }
func NewTerraformLogger ¶ added in v1.0.1
func NewTerraformLogger() TerraformLogger
func (TerraformLogger) Debugf ¶ added in v1.0.1
func (t TerraformLogger) Debugf(ctx context.Context, msg string, additionalFields ...interface{})
func (TerraformLogger) Errorf ¶ added in v1.0.1
func (t TerraformLogger) Errorf(ctx context.Context, msg string, additionalFields ...interface{})
func (TerraformLogger) Infof ¶ added in v1.0.1
func (t TerraformLogger) Infof(ctx context.Context, msg string, additionalFields ...interface{})
type ZerologLogger ¶ added in v1.0.1
type ZerologLogger struct { }
func NewZerologLogger ¶ added in v1.0.1
func NewZerologLogger() ZerologLogger
func (ZerologLogger) Debugf ¶ added in v1.0.1
func (t ZerologLogger) Debugf(ctx context.Context, msg string, additionalFields ...interface{})
func (ZerologLogger) Errorf ¶ added in v1.0.1
func (t ZerologLogger) Errorf(ctx context.Context, msg string, additionalFields ...interface{})
func (ZerologLogger) Infof ¶ added in v1.0.1
func (t ZerologLogger) Infof(ctx context.Context, msg string, additionalFields ...interface{})
Click to show internal directories.
Click to hide internal directories.