auth

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2023 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

type HTTPClient interface {
	NewRequest() HTTPRequest
}

type HTTPRequest

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

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

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) EXPECT

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

func (*MockHTTPClient) NewRequest

func (m *MockHTTPClient) NewRequest() HTTPRequest

NewRequest mocks base method.

type MockHTTPClientMockRecorder

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

MockHTTPClientMockRecorder is the mock recorder for MockHTTPClient.

func (*MockHTTPClientMockRecorder) NewRequest

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

NewRequest indicates an expected call of NewRequest.

type MockHTTPRequest

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

MockHTTPRequest is a mock of HTTPRequest interface.

func NewMockHTTPRequest

func NewMockHTTPRequest(ctrl *gomock.Controller) *MockHTTPRequest

NewMockHTTPRequest creates a new mock instance.

func (*MockHTTPRequest) DisableTrace

func (m *MockHTTPRequest) DisableTrace() HTTPRequest

DisableTrace mocks base method.

func (*MockHTTPRequest) EXPECT

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

func (*MockHTTPRequest) EnableTrace

func (m *MockHTTPRequest) EnableTrace() HTTPRequest

EnableTrace mocks base method.

func (*MockHTTPRequest) Get

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

Get mocks base method.

func (*MockHTTPRequest) Post

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

Post mocks base method.

func (*MockHTTPRequest) Put

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

Put mocks base method.

func (*MockHTTPRequest) SetContext

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

SetContext mocks base method.

func (*MockHTTPRequest) SetError

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

SetError mocks base method.

func (*MockHTTPRequest) SetFormData

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

SetFormData mocks base method.

func (*MockHTTPRequest) SetHeaders

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

SetHeaders mocks base method.

func (*MockHTTPRequest) SetResult

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

SetResult mocks base method.

type MockHTTPRequestMockRecorder

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

MockHTTPRequestMockRecorder is the mock recorder for MockHTTPRequest.

func (*MockHTTPRequestMockRecorder) DisableTrace

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

DisableTrace indicates an expected call of DisableTrace.

func (*MockHTTPRequestMockRecorder) EnableTrace

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

EnableTrace indicates an expected call of EnableTrace.

func (*MockHTTPRequestMockRecorder) Get

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

Get indicates an expected call of Get.

func (*MockHTTPRequestMockRecorder) Post

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

Post indicates an expected call of Post.

func (*MockHTTPRequestMockRecorder) Put

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

Put indicates an expected call of Put.

func (*MockHTTPRequestMockRecorder) SetContext

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

SetContext indicates an expected call of SetContext.

func (*MockHTTPRequestMockRecorder) SetError

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

SetError indicates an expected call of SetError.

func (*MockHTTPRequestMockRecorder) SetFormData

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

SetFormData indicates an expected call of SetFormData.

func (*MockHTTPRequestMockRecorder) SetHeaders

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

SetHeaders indicates an expected call of SetHeaders.

func (*MockHTTPRequestMockRecorder) SetResult

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

SetResult indicates an expected call of SetResult.

type MockHTTPResponse

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

MockHTTPResponse is a mock of HTTPResponse interface.

func NewMockHTTPResponse

func NewMockHTTPResponse(ctrl *gomock.Controller) *MockHTTPResponse

NewMockHTTPResponse creates a new mock instance.

func (*MockHTTPResponse) Bytes

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

Bytes mocks base method.

func (*MockHTTPResponse) EXPECT

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

func (*MockHTTPResponse) Error

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

Error mocks base method.

func (*MockHTTPResponse) GetHeader

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

GetHeader mocks base method.

func (*MockHTTPResponse) GetHeaderValues

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

GetHeaderValues mocks base method.

func (*MockHTTPResponse) GetStatus

func (m *MockHTTPResponse) GetStatus() string

GetStatus mocks base method.

func (*MockHTTPResponse) GetStatusCode

func (m *MockHTTPResponse) GetStatusCode() int

GetStatusCode mocks base method.

func (*MockHTTPResponse) IsError

func (m *MockHTTPResponse) IsError() bool

IsError mocks base method.

func (*MockHTTPResponse) IsSuccess

func (m *MockHTTPResponse) IsSuccess() bool

IsSuccess mocks base method.

func (*MockHTTPResponse) Result

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

Result mocks base method.

func (*MockHTTPResponse) String

func (m *MockHTTPResponse) String() string

String mocks base method.

func (*MockHTTPResponse) ToBytes

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

ToBytes mocks base method.

func (*MockHTTPResponse) ToString

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

ToString mocks base method.

func (*MockHTTPResponse) UnmarshalJson

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

UnmarshalJson mocks base method.

type MockHTTPResponseMockRecorder

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

MockHTTPResponseMockRecorder is the mock recorder for MockHTTPResponse.

func (*MockHTTPResponseMockRecorder) Bytes

Bytes indicates an expected call of Bytes.

func (*MockHTTPResponseMockRecorder) Error

Error indicates an expected call of Error.

func (*MockHTTPResponseMockRecorder) GetHeader

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

GetHeader indicates an expected call of GetHeader.

func (*MockHTTPResponseMockRecorder) GetHeaderValues

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

GetHeaderValues indicates an expected call of GetHeaderValues.

func (*MockHTTPResponseMockRecorder) GetStatus

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

GetStatus indicates an expected call of GetStatus.

func (*MockHTTPResponseMockRecorder) GetStatusCode

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

GetStatusCode indicates an expected call of GetStatusCode.

func (*MockHTTPResponseMockRecorder) IsError

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

IsError indicates an expected call of IsError.

func (*MockHTTPResponseMockRecorder) IsSuccess

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

IsSuccess indicates an expected call of IsSuccess.

func (*MockHTTPResponseMockRecorder) Result

Result indicates an expected call of Result.

func (*MockHTTPResponseMockRecorder) String

String indicates an expected call of String.

func (*MockHTTPResponseMockRecorder) ToBytes

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

ToBytes indicates an expected call of ToBytes.

func (*MockHTTPResponseMockRecorder) ToString

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

ToString indicates an expected call of ToString.

func (*MockHTTPResponseMockRecorder) UnmarshalJson

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