http

package
v1.19.8 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2024 License: MPL-2.0 Imports: 4 Imported by: 1

Documentation

Overview

Code generated by MockGen. DO NOT EDIT. Source: github.com/env0/terraform-provider-env0/client/http (interfaces: HttpClientInterface)

Generated by this command:

mockgen -destination=client_mock.go -package=http . HttpClientInterface

Package http is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMockFailedResponseError added in v0.2.29

func NewMockFailedResponseError(statusCode int) error

Types

type FailedResponseError added in v0.2.29

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

func (*FailedResponseError) BadRequest added in v1.4.17

func (e *FailedResponseError) BadRequest() bool

func (*FailedResponseError) Error added in v0.2.29

func (e *FailedResponseError) Error() string

func (*FailedResponseError) NotFound added in v0.2.29

func (e *FailedResponseError) NotFound() bool

type HttpClient

type HttpClient struct {
	ApiKey    string
	ApiSecret string
	Endpoint  string
	// contains filtered or unexported fields
}

func NewHttpClient

func NewHttpClient(config HttpClientConfig) (*HttpClient, error)

func (*HttpClient) Delete

func (client *HttpClient) Delete(path string, params map[string]string) error

func (*HttpClient) Get

func (client *HttpClient) Get(path string, params map[string]string, response interface{}) error

func (*HttpClient) Patch added in v0.0.6

func (client *HttpClient) Patch(path string, request interface{}, response interface{}) error

func (*HttpClient) Post

func (client *HttpClient) Post(path string, request interface{}, response interface{}) error

func (*HttpClient) Put

func (client *HttpClient) Put(path string, request interface{}, response interface{}) error

type HttpClientConfig added in v0.0.9

type HttpClientConfig struct {
	ApiKey      string
	ApiSecret   string
	ApiEndpoint string
	UserAgent   string
	RestClient  *resty.Client
}

type HttpClientInterface

type HttpClientInterface interface {
	Get(path string, params map[string]string, response interface{}) error
	Post(path string, request interface{}, response interface{}) error
	Put(path string, request interface{}, response interface{}) error
	Delete(path string, params map[string]string) error
	Patch(path string, request interface{}, response interface{}) error
}

type MockHttpClientInterface added in v0.0.4

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

MockHttpClientInterface is a mock of HttpClientInterface interface.

func NewMockHttpClientInterface added in v0.0.4

func NewMockHttpClientInterface(ctrl *gomock.Controller) *MockHttpClientInterface

NewMockHttpClientInterface creates a new mock instance.

func (*MockHttpClientInterface) Delete added in v0.0.4

func (m *MockHttpClientInterface) Delete(arg0 string, arg1 map[string]string) error

Delete mocks base method.

func (*MockHttpClientInterface) EXPECT added in v0.0.4

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockHttpClientInterface) Get added in v0.0.4

func (m *MockHttpClientInterface) Get(arg0 string, arg1 map[string]string, arg2 any) error

Get mocks base method.

func (*MockHttpClientInterface) Patch added in v0.0.6

func (m *MockHttpClientInterface) Patch(arg0 string, arg1, arg2 any) error

Patch mocks base method.

func (*MockHttpClientInterface) Post added in v0.0.4

func (m *MockHttpClientInterface) Post(arg0 string, arg1, arg2 any) error

Post mocks base method.

func (*MockHttpClientInterface) Put added in v0.0.4

func (m *MockHttpClientInterface) Put(arg0 string, arg1, arg2 any) error

Put mocks base method.

type MockHttpClientInterfaceMockRecorder added in v0.0.4

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

MockHttpClientInterfaceMockRecorder is the mock recorder for MockHttpClientInterface.

func (*MockHttpClientInterfaceMockRecorder) Delete added in v0.0.4

func (mr *MockHttpClientInterfaceMockRecorder) Delete(arg0, arg1 any) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockHttpClientInterfaceMockRecorder) Get added in v0.0.4

func (mr *MockHttpClientInterfaceMockRecorder) Get(arg0, arg1, arg2 any) *gomock.Call

Get indicates an expected call of Get.

func (*MockHttpClientInterfaceMockRecorder) Patch added in v0.0.6

func (mr *MockHttpClientInterfaceMockRecorder) Patch(arg0, arg1, arg2 any) *gomock.Call

Patch indicates an expected call of Patch.

func (*MockHttpClientInterfaceMockRecorder) Post added in v0.0.4

func (mr *MockHttpClientInterfaceMockRecorder) Post(arg0, arg1, arg2 any) *gomock.Call

Post indicates an expected call of Post.

func (*MockHttpClientInterfaceMockRecorder) Put added in v0.0.4

func (mr *MockHttpClientInterfaceMockRecorder) Put(arg0, arg1, arg2 any) *gomock.Call

Put indicates an expected call of Put.

Jump to

Keyboard shortcuts

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