auth

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2021 License: LGPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

Package client is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(httpClient HttpClient, url, certFingerprint, privateKey, appId, clientId, tenantId string) *Client

func (Client) Token

func (a Client) Token(ctx context.Context) (string, time.Duration, error)

type HttpClient

type HttpClient interface {
	Get(url string, v ...interface{}) (HttpReponse, error)
	Post(url string, v ...interface{}) (HttpReponse, error)
	Put(url string, v ...interface{}) (HttpReponse, error)
	Delete(url string, v ...interface{}) (HttpReponse, error)
}

type HttpReponse

type HttpReponse interface {
	Request() *http.Request
	Response() *http.Response
	Bytes() []byte
	ToBytes() ([]byte, error)
	ToJSON(v interface{}) error
}

type MockHttpClient

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

MockHttpClient is a mock of HttpClient interface.

func NewMockHttpClient

func NewMockHttpClient(ctrl *gomock.Controller) *MockHttpClient

NewMockHttpClient creates a new mock instance.

func (*MockHttpClient) Delete

func (m *MockHttpClient) Delete(url string, v ...interface{}) (HttpReponse, error)

Delete mocks base method.

func (*MockHttpClient) EXPECT

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

func (*MockHttpClient) Get

func (m *MockHttpClient) Get(url string, v ...interface{}) (HttpReponse, error)

Get mocks base method.

func (*MockHttpClient) Post

func (m *MockHttpClient) Post(url string, v ...interface{}) (HttpReponse, error)

Post mocks base method.

func (*MockHttpClient) Put

func (m *MockHttpClient) Put(url string, v ...interface{}) (HttpReponse, error)

Put mocks base method.

type MockHttpClientMockRecorder

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

MockHttpClientMockRecorder is the mock recorder for MockHttpClient.

func (*MockHttpClientMockRecorder) Delete

func (mr *MockHttpClientMockRecorder) Delete(url interface{}, v ...interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockHttpClientMockRecorder) Get

func (mr *MockHttpClientMockRecorder) Get(url interface{}, v ...interface{}) *gomock.Call

Get indicates an expected call of Get.

func (*MockHttpClientMockRecorder) Post

func (mr *MockHttpClientMockRecorder) Post(url interface{}, v ...interface{}) *gomock.Call

Post indicates an expected call of Post.

func (*MockHttpClientMockRecorder) Put

func (mr *MockHttpClientMockRecorder) Put(url interface{}, v ...interface{}) *gomock.Call

Put indicates an expected call of Put.

type MockHttpReponse

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

MockHttpReponse is a mock of HttpReponse interface.

func NewMockHttpReponse

func NewMockHttpReponse(ctrl *gomock.Controller) *MockHttpReponse

NewMockHttpReponse creates a new mock instance.

func (*MockHttpReponse) Bytes

func (m *MockHttpReponse) Bytes() []byte

Bytes mocks base method.

func (*MockHttpReponse) EXPECT

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

func (*MockHttpReponse) Request

func (m *MockHttpReponse) Request() *http.Request

Request mocks base method.

func (*MockHttpReponse) Response

func (m *MockHttpReponse) Response() *http.Response

Response mocks base method.

func (*MockHttpReponse) ToBytes

func (m *MockHttpReponse) ToBytes() ([]byte, error)

ToBytes mocks base method.

func (*MockHttpReponse) ToJSON

func (m *MockHttpReponse) ToJSON(v interface{}) error

ToJSON mocks base method.

type MockHttpReponseMockRecorder

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

MockHttpReponseMockRecorder is the mock recorder for MockHttpReponse.

func (*MockHttpReponseMockRecorder) Bytes

Bytes indicates an expected call of Bytes.

func (*MockHttpReponseMockRecorder) Request

func (mr *MockHttpReponseMockRecorder) Request() *gomock.Call

Request indicates an expected call of Request.

func (*MockHttpReponseMockRecorder) Response

func (mr *MockHttpReponseMockRecorder) Response() *gomock.Call

Response indicates an expected call of Response.

func (*MockHttpReponseMockRecorder) ToBytes

func (mr *MockHttpReponseMockRecorder) ToBytes() *gomock.Call

ToBytes indicates an expected call of ToBytes.

func (*MockHttpReponseMockRecorder) ToJSON

func (mr *MockHttpReponseMockRecorder) ToJSON(v interface{}) *gomock.Call

ToJSON indicates an expected call of ToJSON.

Jump to

Keyboard shortcuts

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