operations

package
v0.0.0-...-e864942 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteHandlers

Common operation types.

type DeleteOperation

Common operation implementations.

type HTTPHandlers

type HTTPHandlers[RequestType any, ResponseType any] struct {
	BuildRequest  func(context.Context, RequestType) (*http.Request, error)
	ParseResponse func(context.Context, RequestType, *common.JSONHTTPResponse) (ResponseType, error)
	ErrorHandler  func(*http.Response, []byte) error
}

HTTPHandlers contains operation-specific HTTP handlers for building and parsing HTTP requests and responses.

type HTTPOperation

type HTTPOperation[RequestType any, ResponseType any] struct {
	// contains filtered or unexported fields
}

HTTPOperation provides a generic implementation for HTTP-based operations like read, write, delete, etc.

func NewHTTPOperation

func NewHTTPOperation[RequestType any, ResponseType any](
	client common.AuthenticatedHTTPClient,
	handlers HTTPHandlers[RequestType, ResponseType],
) *HTTPOperation[RequestType, ResponseType]

func (*HTTPOperation[RequestType, ResponseType]) ExecuteRequest

func (op *HTTPOperation[RequestType, ResponseType]) ExecuteRequest(
	ctx context.Context,
	params RequestType,
) (ResponseType, error)

nolint:ireturn

type ListObjectMetadataHandlers

type ListObjectMetadataHandlers = HTTPHandlers[[]string, *common.ListObjectMetadataResult]

Common operation types.

type ListObjectMetadataOperation

type ListObjectMetadataOperation = HTTPOperation[[]string, *common.ListObjectMetadataResult]

Common operation implementations.

type ReadHandlers

Common operation types.

type ReadOperation

type ReadOperation = HTTPOperation[common.ReadParams, *common.ReadResult]

Common operation implementations.

type WriteHandlers

Common operation types.

type WriteOperation

Common operation implementations.

Jump to

Keyboard shortcuts

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