clients

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const GTWDebugHeader = "X-GoTestWAF-Test"

Variables

This section is empty.

Functions

This section is empty.

Types

type GRPCClient

type GRPCClient interface {
	// CheckAvailability checks availability of endpoint which is able to
	// process gRPC protocol messages.
	CheckAvailability(ctx context.Context) (bool, error)

	// IsAvailable returns status of endpoint availability.
	IsAvailable() bool

	// SendPayload sends a payload to the specified target URL.
	SendPayload(ctx context.Context, payloadInfo *payload.PayloadInfo) (types.Response, error)

	// Close closes underlying connection.
	Close() error
}

GRPCClient is an interface that defines methods for sending payloads by gRPC protocol.

type GraphQLClient added in v0.5.1

type GraphQLClient interface {
	// CheckAvailability checks availability of endpoint which is able to
	// process GraphQL protocol messages.
	CheckAvailability(ctx context.Context) (bool, error)

	// IsAvailable returns status of endpoint availability.
	IsAvailable() bool

	// SendPayload sends a payload to the specified target URL.
	SendPayload(ctx context.Context, payloadInfo *payload.PayloadInfo) (types.Response, error)
}

GraphQLClient is an interface that defines methods for sending GraphQL payloads by HTTP protocol.

type HTTPClient

type HTTPClient interface {
	// SendPayload sends a payload to the specified target URL.
	SendPayload(ctx context.Context, targetURL string, payloadInfo *payload.PayloadInfo) (types.Response, error)

	// SendRequest sends a prepared custom request to the specified target URL.
	SendRequest(ctx context.Context, req types.Request) (types.Response, error)
}

HTTPClient is an interface that defines methods for sending HTTP requests and payloads.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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