test

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 12, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SystemRoles = []string{"Admin", "Member", "Collaborator", "Manager"}
)

Functions

func GetUniqueTime

func GetUniqueTime() time.Time

func NewTestClient

func NewTestClient(response *http.Response, err error) *client.PandaDocClient

Helper function to create a test client with custom transport.

func ReadFile

func ReadFile(fileName string) string

Types

type MockRoundTripper

type MockRoundTripper struct {
	Response *http.Response
	Err      error
	// contains filtered or unexported fields
}

func (*MockRoundTripper) RoundTrip

func (m *MockRoundTripper) RoundTrip(req *http.Request) (*http.Response, error)

func (*MockRoundTripper) SetRoundTrip

func (m *MockRoundTripper) SetRoundTrip(roundTrip func(*http.Request) (*http.Response, error))

type TestRoundTripper

type TestRoundTripper struct {
	// contains filtered or unexported fields
}

Custom RoundTripper for testing.

func (*TestRoundTripper) RoundTrip

func (t *TestRoundTripper) RoundTrip(*http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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