apihandler

package
v0.1.38 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Overview

apiintegrations/apihandler/apihandler.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIHandler

type APIHandler interface {
	ConstructAPIResourceEndpoint(endpointPath string, log logger.Logger) string
	ConstructAPIAuthEndpoint(endpointPath string, log logger.Logger) string
	MarshalRequest(body interface{}, method string, endpoint string, log logger.Logger) ([]byte, error)
	MarshalMultipartRequest(fields map[string]string, files map[string]string, log logger.Logger) ([]byte, string, error)
	GetContentTypeHeader(method string, log logger.Logger) string
	GetAcceptHeader() string
	GetDefaultBaseDomain() string
	GetOAuthTokenEndpoint() string
	GetOAuthTokenScope() string
	GetBearerTokenEndpoint() string
	GetTokenRefreshEndpoint() string
	GetTokenInvalidateEndpoint() string
	GetAPIBearerTokenAuthenticationSupportStatus() bool
	GetAPIOAuthAuthenticationSupportStatus() bool
	GetAPIOAuthWithCertAuthenticationSupportStatus() bool
	GetAPIRequestHeaders(endpoint string) map[string]string // Provides standard headers required for making API requests.
}

APIHandler is an interface for encoding, decoding, and implenting contexual api functions for different API implementations. It encapsulates behavior for encoding and decoding requests and responses.

func LoadAPIHandler

func LoadAPIHandler(apiType, instanceName, tenantID, tenantName string, log logger.Logger) (APIHandler, error)

LoadAPIHandler loads the appropriate API handler based on the API type.

Jump to

Keyboard shortcuts

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