client

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CkoRequestId = "cko-request-id"
	CkoVersion   = "cko-version"
)
View Source
const SDK_VERSION = "1.2.0"

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiClient added in v1.0.0

type ApiClient struct {
	HttpClient http.Client
	BaseUri    string
	Log        configuration.StdLogger
}

func NewApiClient added in v1.0.0

func NewApiClient(configuration *configuration.Configuration, baseUri string) *ApiClient

func (*ApiClient) Delete added in v1.0.0

func (a *ApiClient) Delete(path string, authorization *configuration.SdkAuthorization, responseMapping interface{}) error

func (*ApiClient) Get added in v1.0.0

func (a *ApiClient) Get(path string, authorization *configuration.SdkAuthorization, responseMapping interface{}) error

func (*ApiClient) Patch added in v1.0.0

func (a *ApiClient) Patch(path string, authorization *configuration.SdkAuthorization, request interface{}, responseMapping interface{}) error

func (*ApiClient) Post added in v1.0.0

func (a *ApiClient) Post(path string, authorization *configuration.SdkAuthorization, request interface{}, responseMapping interface{}, idempotencyKey *string) error

func (*ApiClient) Put added in v1.0.0

func (a *ApiClient) Put(path string, authorization *configuration.SdkAuthorization, request interface{}, responseMapping interface{}, idempotencyKey *string) error

func (*ApiClient) Upload added in v1.0.0

func (a *ApiClient) Upload(path string, authorization *configuration.SdkAuthorization, request *common.FileUploadRequest, responseMapping interface{}) error

type HttpClient added in v1.0.0

type HttpClient interface {
	Get(path string, authorization *configuration.SdkAuthorization, responseMapping interface{}) error
	Post(path string, authorization *configuration.SdkAuthorization, request interface{}, responseMapping interface{}, idempotencyKey *string) error
	Put(path string, authorization *configuration.SdkAuthorization, request interface{}, responseMapping interface{}, idempotencyKey *string) error
	Patch(path string, authorization *configuration.SdkAuthorization, request interface{}, responseMapping interface{}) error
	Delete(path string, authorization *configuration.SdkAuthorization, responseMapping interface{}) error
	Upload(path string, authorization *configuration.SdkAuthorization, request *common.FileUploadRequest, responseMapping interface{}) error
}

Jump to

Keyboard shortcuts

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