auth

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2022 License: LGPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

Package auth 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 added in v1.2.0

type HTTPClient interface {
	NewRequest() HTTPRequest
}

type HTTPRequest added in v1.2.0

type HTTPRequest interface {
	SetFormData(data map[string]string) HTTPRequest
	SetResult(result interface{}) HTTPRequest
	SetError(error interface{}) HTTPRequest
	SetHeaders(hdrs map[string]string) HTTPRequest
	Get(url string) (HTTPResponse, error)
	Post(url string) (HTTPResponse, error)
	Put(url string) (HTTPResponse, error)
	SetContext(ctx context.Context) HTTPRequest
	DisableTrace() HTTPRequest
	EnableTrace() HTTPRequest
}

type HTTPResponse added in v1.2.0

type HTTPResponse interface {
	IsSuccess() bool
	IsError() bool
	Result() interface{}
	Error() interface{}
	UnmarshalJson(v interface{}) error
	Bytes() []byte
	String() string
	ToString() (string, error)
	ToBytes() ([]byte, error)
	GetStatus() string
	GetStatusCode() int
	GetHeader(key string) string
	GetHeaderValues(key string) []string
}

type MockHTTPClient added in v1.2.0

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

MockHTTPClient is a mock of HTTPClient interface.

func NewMockHTTPClient added in v1.2.0

func NewMockHTTPClient(ctrl *gomock.Controller) *MockHTTPClient

NewMockHTTPClient creates a new mock instance.

func (*MockHTTPClient) EXPECT added in v1.2.0

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

func (*MockHTTPClient) NewRequest added in v1.2.0

func (m *MockHTTPClient) NewRequest() HTTPRequest

NewRequest mocks base method.

type MockHTTPClientMockRecorder added in v1.2.0

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

MockHTTPClientMockRecorder is the mock recorder for MockHTTPClient.

func (*MockHTTPClientMockRecorder) NewRequest added in v1.2.0

func (mr *MockHTTPClientMockRecorder) NewRequest() *gomock.Call

NewRequest indicates an expected call of NewRequest.

type MockHTTPRequest added in v1.2.0

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

MockHTTPRequest is a mock of HTTPRequest interface.

func NewMockHTTPRequest added in v1.2.0

func NewMockHTTPRequest(ctrl *gomock.Controller) *MockHTTPRequest

NewMockHTTPRequest creates a new mock instance.

func (*MockHTTPRequest) DisableTrace added in v1.2.0

func (m *MockHTTPRequest) DisableTrace() HTTPRequest

DisableTrace mocks base method.

func (*MockHTTPRequest) EXPECT added in v1.2.0

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

func (*MockHTTPRequest) EnableTrace added in v1.2.0

func (m *MockHTTPRequest) EnableTrace() HTTPRequest

EnableTrace mocks base method.

func (*MockHTTPRequest) Get added in v1.2.0

func (m *MockHTTPRequest) Get(url string) (HTTPResponse, error)

Get mocks base method.

func (*MockHTTPRequest) Post added in v1.2.0

func (m *MockHTTPRequest) Post(url string) (HTTPResponse, error)

Post mocks base method.

func (*MockHTTPRequest) Put added in v1.2.0

func (m *MockHTTPRequest) Put(url string) (HTTPResponse, error)

Put mocks base method.

func (*MockHTTPRequest) SetContext added in v1.2.0

func (m *MockHTTPRequest) SetContext(ctx context.Context) HTTPRequest

SetContext mocks base method.

func (*MockHTTPRequest) SetError added in v1.2.0

func (m *MockHTTPRequest) SetError(error interface{}) HTTPRequest

SetError mocks base method.

func (*MockHTTPRequest) SetFormData added in v1.2.0

func (m *MockHTTPRequest) SetFormData(data map[string]string) HTTPRequest

SetFormData mocks base method.

func (*MockHTTPRequest) SetHeaders added in v1.2.0

func (m *MockHTTPRequest) SetHeaders(hdrs map[string]string) HTTPRequest

SetHeaders mocks base method.

func (*MockHTTPRequest) SetResult added in v1.2.0

func (m *MockHTTPRequest) SetResult(result interface{}) HTTPRequest

SetResult mocks base method.

type MockHTTPRequestMockRecorder added in v1.2.0

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

MockHTTPRequestMockRecorder is the mock recorder for MockHTTPRequest.

func (*MockHTTPRequestMockRecorder) DisableTrace added in v1.2.0

func (mr *MockHTTPRequestMockRecorder) DisableTrace() *gomock.Call

DisableTrace indicates an expected call of DisableTrace.

func (*MockHTTPRequestMockRecorder) EnableTrace added in v1.2.0

func (mr *MockHTTPRequestMockRecorder) EnableTrace() *gomock.Call

EnableTrace indicates an expected call of EnableTrace.

func (*MockHTTPRequestMockRecorder) Get added in v1.2.0

func (mr *MockHTTPRequestMockRecorder) Get(url interface{}) *gomock.Call

Get indicates an expected call of Get.

func (*MockHTTPRequestMockRecorder) Post added in v1.2.0

func (mr *MockHTTPRequestMockRecorder) Post(url interface{}) *gomock.Call

Post indicates an expected call of Post.

func (*MockHTTPRequestMockRecorder) Put added in v1.2.0

func (mr *MockHTTPRequestMockRecorder) Put(url interface{}) *gomock.Call

Put indicates an expected call of Put.

func (*MockHTTPRequestMockRecorder) SetContext added in v1.2.0

func (mr *MockHTTPRequestMockRecorder) SetContext(ctx interface{}) *gomock.Call

SetContext indicates an expected call of SetContext.

func (*MockHTTPRequestMockRecorder) SetError added in v1.2.0

func (mr *MockHTTPRequestMockRecorder) SetError(error interface{}) *gomock.Call

SetError indicates an expected call of SetError.

func (*MockHTTPRequestMockRecorder) SetFormData added in v1.2.0

func (mr *MockHTTPRequestMockRecorder) SetFormData(data interface{}) *gomock.Call

SetFormData indicates an expected call of SetFormData.

func (*MockHTTPRequestMockRecorder) SetHeaders added in v1.2.0

func (mr *MockHTTPRequestMockRecorder) SetHeaders(hdrs interface{}) *gomock.Call

SetHeaders indicates an expected call of SetHeaders.

func (*MockHTTPRequestMockRecorder) SetResult added in v1.2.0

func (mr *MockHTTPRequestMockRecorder) SetResult(result interface{}) *gomock.Call

SetResult indicates an expected call of SetResult.

type MockHTTPResponse added in v1.2.0

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

MockHTTPResponse is a mock of HTTPResponse interface.

func NewMockHTTPResponse added in v1.2.0

func NewMockHTTPResponse(ctrl *gomock.Controller) *MockHTTPResponse

NewMockHTTPResponse creates a new mock instance.

func (*MockHTTPResponse) Bytes added in v1.2.0

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

Bytes mocks base method.

func (*MockHTTPResponse) EXPECT added in v1.2.0

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

func (*MockHTTPResponse) Error added in v1.2.0

func (m *MockHTTPResponse) Error() interface{}

Error mocks base method.

func (*MockHTTPResponse) GetHeader added in v1.2.0

func (m *MockHTTPResponse) GetHeader(key string) string

GetHeader mocks base method.

func (*MockHTTPResponse) GetHeaderValues added in v1.2.0

func (m *MockHTTPResponse) GetHeaderValues(key string) []string

GetHeaderValues mocks base method.

func (*MockHTTPResponse) GetStatus added in v1.2.0

func (m *MockHTTPResponse) GetStatus() string

GetStatus mocks base method.

func (*MockHTTPResponse) GetStatusCode added in v1.2.0

func (m *MockHTTPResponse) GetStatusCode() int

GetStatusCode mocks base method.

func (*MockHTTPResponse) IsError added in v1.2.0

func (m *MockHTTPResponse) IsError() bool

IsError mocks base method.

func (*MockHTTPResponse) IsSuccess added in v1.2.0

func (m *MockHTTPResponse) IsSuccess() bool

IsSuccess mocks base method.

func (*MockHTTPResponse) Result added in v1.2.0

func (m *MockHTTPResponse) Result() interface{}

Result mocks base method.

func (*MockHTTPResponse) String added in v1.2.0

func (m *MockHTTPResponse) String() string

String mocks base method.

func (*MockHTTPResponse) ToBytes added in v1.2.0

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

ToBytes mocks base method.

func (*MockHTTPResponse) ToString added in v1.2.0

func (m *MockHTTPResponse) ToString() (string, error)

ToString mocks base method.

func (*MockHTTPResponse) UnmarshalJson added in v1.2.0

func (m *MockHTTPResponse) UnmarshalJson(v interface{}) error

UnmarshalJson mocks base method.

type MockHTTPResponseMockRecorder added in v1.2.0

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

MockHTTPResponseMockRecorder is the mock recorder for MockHTTPResponse.

func (*MockHTTPResponseMockRecorder) Bytes added in v1.2.0

Bytes indicates an expected call of Bytes.

func (*MockHTTPResponseMockRecorder) Error added in v1.2.0

Error indicates an expected call of Error.

func (*MockHTTPResponseMockRecorder) GetHeader added in v1.2.0

func (mr *MockHTTPResponseMockRecorder) GetHeader(key interface{}) *gomock.Call

GetHeader indicates an expected call of GetHeader.

func (*MockHTTPResponseMockRecorder) GetHeaderValues added in v1.2.0

func (mr *MockHTTPResponseMockRecorder) GetHeaderValues(key interface{}) *gomock.Call

GetHeaderValues indicates an expected call of GetHeaderValues.

func (*MockHTTPResponseMockRecorder) GetStatus added in v1.2.0

func (mr *MockHTTPResponseMockRecorder) GetStatus() *gomock.Call

GetStatus indicates an expected call of GetStatus.

func (*MockHTTPResponseMockRecorder) GetStatusCode added in v1.2.0

func (mr *MockHTTPResponseMockRecorder) GetStatusCode() *gomock.Call

GetStatusCode indicates an expected call of GetStatusCode.

func (*MockHTTPResponseMockRecorder) IsError added in v1.2.0

func (mr *MockHTTPResponseMockRecorder) IsError() *gomock.Call

IsError indicates an expected call of IsError.

func (*MockHTTPResponseMockRecorder) IsSuccess added in v1.2.0

func (mr *MockHTTPResponseMockRecorder) IsSuccess() *gomock.Call

IsSuccess indicates an expected call of IsSuccess.

func (*MockHTTPResponseMockRecorder) Result added in v1.2.0

Result indicates an expected call of Result.

func (*MockHTTPResponseMockRecorder) String added in v1.2.0

String indicates an expected call of String.

func (*MockHTTPResponseMockRecorder) ToBytes added in v1.2.0

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

ToBytes indicates an expected call of ToBytes.

func (*MockHTTPResponseMockRecorder) ToString added in v1.2.0

func (mr *MockHTTPResponseMockRecorder) ToString() *gomock.Call

ToString indicates an expected call of ToString.

func (*MockHTTPResponseMockRecorder) UnmarshalJson added in v1.2.0

func (mr *MockHTTPResponseMockRecorder) UnmarshalJson(v interface{}) *gomock.Call

UnmarshalJson indicates an expected call of UnmarshalJson.

Jump to

Keyboard shortcuts

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