util

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2024 License: MIT Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NullString

func NullString(value string) types.String

NullString converts a string to a null or non-null types.String depending on if it's empty.

func ReplaceIfInt64Diff

func ReplaceIfInt64Diff() planmodifier.Int64

func ReplaceIfStringDiff

func ReplaceIfStringDiff() planmodifier.String

func TestDiagnostic

func TestDiagnostic(diagnostic *diag.Diagnostics, additional diag.Diagnostics) bool

TestDiagnostic appends additional diagnostic to given diagnostic and checks if there's any error.

func TestDiagnostics

func TestDiagnostics(diagnostic *diag.Diagnostics, additional ...diag.Diagnostics) bool

TestDiagnostics appends multiple additional diagnostics to given diagnostic and checks if there's any error.

func TestError

func TestError(diagnostic *diag.Diagnostics, err error, message string) bool

TestError checks if there's error and appends the error to the diagnostic.

Types

type RecordingHttpPayloadTransport

type RecordingHttpPayloadTransport struct {
	Transport transport.PayloadTransport
}

RecordingHttpPayloadTransport struct implementing the PayloadTransport interface.

func (*RecordingHttpPayloadTransport) Send

Send method for the RecordingHttpPayloadTransport struct. This sends the request and writes the response to a file.

func (*RecordingHttpPayloadTransport) SendWithExpectedStatus

func (r *RecordingHttpPayloadTransport) SendWithExpectedStatus(request *transport.PayloadRequest, expectedStatus ...int) (*transport.PayloadResponse, error)

SendWithExpectedStatus method sends the request and expects a certain status. The response is written to a file.

Jump to

Keyboard shortcuts

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