mocks

package
v0.2.10 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectService

type ConnectService struct {
	mock.Mock
}

ConnectService is an autogenerated mock type for the ConnectService type

func NewConnectService

func NewConnectService(t interface {
	mock.TestingT
	Cleanup(func())
}) *ConnectService

NewConnectService creates a new instance of ConnectService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*ConnectService) Callback

func (_m *ConnectService) Callback(ctx context.Context, baseURL string, provider string, state string, code string, errCode string, errDesc string) (string, error)

Callback provides a mock function with given fields: ctx, baseURL, provider, state, code, errCode, errDesc

func (*ConnectService) ChainURL

func (_m *ConnectService) ChainURL(ctx context.Context, baseURL string, gatewayID ids.ID[ids.GatewayKind], resource string, principalSub string, resumeURL string) (string, error)

ChainURL provides a mock function with given fields: ctx, baseURL, gatewayID, resource, principalSub, resumeURL

func (*ConnectService) CreateTicket

func (_m *ConnectService) CreateTicket(ctx context.Context, gatewayID ids.ID[ids.GatewayKind], principalSub string, consumerPath string) (string, error)

CreateTicket provides a mock function with given fields: ctx, gatewayID, principalSub, consumerPath

func (*ConnectService) Disconnect

func (_m *ConnectService) Disconnect(ctx context.Context, ticketID string, provider string) error

Disconnect provides a mock function with given fields: ctx, ticketID, provider

func (*ConnectService) EXPECT

func (*ConnectService) Page

func (_m *ConnectService) Page(ctx context.Context, ticketID string) (*oauth.ConnectPage, error)

Page provides a mock function with given fields: ctx, ticketID

func (*ConnectService) RefreshAuth

func (_m *ConnectService) RefreshAuth(ctx context.Context, gatewayID ids.ID[ids.GatewayKind], reg *registry.Registry) (*registry.MCPAuth, error)

RefreshAuth provides a mock function with given fields: ctx, gatewayID, reg

func (*ConnectService) Start

func (_m *ConnectService) Start(ctx context.Context, baseURL string, ticketID string, provider string) (string, error)

Start provides a mock function with given fields: ctx, baseURL, ticketID, provider

type ConnectService_Callback_Call

type ConnectService_Callback_Call struct {
	*mock.Call
}

ConnectService_Callback_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Callback'

func (*ConnectService_Callback_Call) Return

func (*ConnectService_Callback_Call) Run

func (_c *ConnectService_Callback_Call) Run(run func(ctx context.Context, baseURL string, provider string, state string, code string, errCode string, errDesc string)) *ConnectService_Callback_Call

func (*ConnectService_Callback_Call) RunAndReturn

type ConnectService_ChainURL_Call

type ConnectService_ChainURL_Call struct {
	*mock.Call
}

ConnectService_ChainURL_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChainURL'

func (*ConnectService_ChainURL_Call) Return

func (*ConnectService_ChainURL_Call) Run

func (_c *ConnectService_ChainURL_Call) Run(run func(ctx context.Context, baseURL string, gatewayID ids.ID[ids.GatewayKind], resource string, principalSub string, resumeURL string)) *ConnectService_ChainURL_Call

func (*ConnectService_ChainURL_Call) RunAndReturn

type ConnectService_CreateTicket_Call

type ConnectService_CreateTicket_Call struct {
	*mock.Call
}

ConnectService_CreateTicket_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateTicket'

func (*ConnectService_CreateTicket_Call) Return

func (*ConnectService_CreateTicket_Call) Run

func (_c *ConnectService_CreateTicket_Call) Run(run func(ctx context.Context, gatewayID ids.ID[ids.GatewayKind], principalSub string, consumerPath string)) *ConnectService_CreateTicket_Call

func (*ConnectService_CreateTicket_Call) RunAndReturn

type ConnectService_Disconnect_Call

type ConnectService_Disconnect_Call struct {
	*mock.Call
}

ConnectService_Disconnect_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Disconnect'

func (*ConnectService_Disconnect_Call) Return

func (*ConnectService_Disconnect_Call) Run

func (_c *ConnectService_Disconnect_Call) Run(run func(ctx context.Context, ticketID string, provider string)) *ConnectService_Disconnect_Call

func (*ConnectService_Disconnect_Call) RunAndReturn

type ConnectService_Expecter

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

func (*ConnectService_Expecter) Callback

func (_e *ConnectService_Expecter) Callback(ctx interface{}, baseURL interface{}, provider interface{}, state interface{}, code interface{}, errCode interface{}, errDesc interface{}) *ConnectService_Callback_Call

Callback is a helper method to define mock.On call

  • ctx context.Context
  • baseURL string
  • provider string
  • state string
  • code string
  • errCode string
  • errDesc string

func (*ConnectService_Expecter) ChainURL

func (_e *ConnectService_Expecter) ChainURL(ctx interface{}, baseURL interface{}, gatewayID interface{}, resource interface{}, principalSub interface{}, resumeURL interface{}) *ConnectService_ChainURL_Call

ChainURL is a helper method to define mock.On call

  • ctx context.Context
  • baseURL string
  • gatewayID ids.ID[ids.GatewayKind]
  • resource string
  • principalSub string
  • resumeURL string

func (*ConnectService_Expecter) CreateTicket

func (_e *ConnectService_Expecter) CreateTicket(ctx interface{}, gatewayID interface{}, principalSub interface{}, consumerPath interface{}) *ConnectService_CreateTicket_Call

CreateTicket is a helper method to define mock.On call

  • ctx context.Context
  • gatewayID ids.ID[ids.GatewayKind]
  • principalSub string
  • consumerPath string

func (*ConnectService_Expecter) Disconnect

func (_e *ConnectService_Expecter) Disconnect(ctx interface{}, ticketID interface{}, provider interface{}) *ConnectService_Disconnect_Call

Disconnect is a helper method to define mock.On call

  • ctx context.Context
  • ticketID string
  • provider string

func (*ConnectService_Expecter) Page

func (_e *ConnectService_Expecter) Page(ctx interface{}, ticketID interface{}) *ConnectService_Page_Call

Page is a helper method to define mock.On call

  • ctx context.Context
  • ticketID string

func (*ConnectService_Expecter) RefreshAuth

func (_e *ConnectService_Expecter) RefreshAuth(ctx interface{}, gatewayID interface{}, reg interface{}) *ConnectService_RefreshAuth_Call

RefreshAuth is a helper method to define mock.On call

  • ctx context.Context
  • gatewayID ids.ID[ids.GatewayKind]
  • reg *registry.Registry

func (*ConnectService_Expecter) Start

func (_e *ConnectService_Expecter) Start(ctx interface{}, baseURL interface{}, ticketID interface{}, provider interface{}) *ConnectService_Start_Call

Start is a helper method to define mock.On call

  • ctx context.Context
  • baseURL string
  • ticketID string
  • provider string

type ConnectService_Page_Call

type ConnectService_Page_Call struct {
	*mock.Call
}

ConnectService_Page_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Page'

func (*ConnectService_Page_Call) Return

func (*ConnectService_Page_Call) Run

func (_c *ConnectService_Page_Call) Run(run func(ctx context.Context, ticketID string)) *ConnectService_Page_Call

func (*ConnectService_Page_Call) RunAndReturn

type ConnectService_RefreshAuth_Call

type ConnectService_RefreshAuth_Call struct {
	*mock.Call
}

ConnectService_RefreshAuth_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RefreshAuth'

func (*ConnectService_RefreshAuth_Call) Return

func (*ConnectService_RefreshAuth_Call) Run

func (*ConnectService_RefreshAuth_Call) RunAndReturn

type ConnectService_Start_Call

type ConnectService_Start_Call struct {
	*mock.Call
}

ConnectService_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start'

func (*ConnectService_Start_Call) Return

func (*ConnectService_Start_Call) Run

func (_c *ConnectService_Start_Call) Run(run func(ctx context.Context, baseURL string, ticketID string, provider string)) *ConnectService_Start_Call

func (*ConnectService_Start_Call) RunAndReturn

type ProviderClient

type ProviderClient struct {
	mock.Mock
}

ProviderClient is an autogenerated mock type for the ProviderClient type

func NewProviderClient

func NewProviderClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *ProviderClient

NewProviderClient creates a new instance of ProviderClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*ProviderClient) AuthorizeURL

func (_m *ProviderClient) AuthorizeURL(cfg *registry.MCPAuth, redirectURI string, state string, challenge string) string

AuthorizeURL provides a mock function with given fields: cfg, redirectURI, state, challenge

func (*ProviderClient) EXPECT

func (*ProviderClient) ExchangeCode

func (_m *ProviderClient) ExchangeCode(ctx context.Context, cfg *registry.MCPAuth, code string, redirectURI string, verifier string) (*oauth.ProviderToken, error)

ExchangeCode provides a mock function with given fields: ctx, cfg, code, redirectURI, verifier

func (*ProviderClient) Refresh

func (_m *ProviderClient) Refresh(ctx context.Context, cfg *registry.MCPAuth, refreshToken string) (*oauth.ProviderToken, error)

Refresh provides a mock function with given fields: ctx, cfg, refreshToken

type ProviderClient_AuthorizeURL_Call

type ProviderClient_AuthorizeURL_Call struct {
	*mock.Call
}

ProviderClient_AuthorizeURL_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AuthorizeURL'

func (*ProviderClient_AuthorizeURL_Call) Return

func (*ProviderClient_AuthorizeURL_Call) Run

func (_c *ProviderClient_AuthorizeURL_Call) Run(run func(cfg *registry.MCPAuth, redirectURI string, state string, challenge string)) *ProviderClient_AuthorizeURL_Call

func (*ProviderClient_AuthorizeURL_Call) RunAndReturn

type ProviderClient_ExchangeCode_Call

type ProviderClient_ExchangeCode_Call struct {
	*mock.Call
}

ProviderClient_ExchangeCode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExchangeCode'

func (*ProviderClient_ExchangeCode_Call) Return

func (*ProviderClient_ExchangeCode_Call) Run

func (_c *ProviderClient_ExchangeCode_Call) Run(run func(ctx context.Context, cfg *registry.MCPAuth, code string, redirectURI string, verifier string)) *ProviderClient_ExchangeCode_Call

func (*ProviderClient_ExchangeCode_Call) RunAndReturn

type ProviderClient_Expecter

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

func (*ProviderClient_Expecter) AuthorizeURL

func (_e *ProviderClient_Expecter) AuthorizeURL(cfg interface{}, redirectURI interface{}, state interface{}, challenge interface{}) *ProviderClient_AuthorizeURL_Call

AuthorizeURL is a helper method to define mock.On call

  • cfg *registry.MCPAuth
  • redirectURI string
  • state string
  • challenge string

func (*ProviderClient_Expecter) ExchangeCode

func (_e *ProviderClient_Expecter) ExchangeCode(ctx interface{}, cfg interface{}, code interface{}, redirectURI interface{}, verifier interface{}) *ProviderClient_ExchangeCode_Call

ExchangeCode is a helper method to define mock.On call

  • ctx context.Context
  • cfg *registry.MCPAuth
  • code string
  • redirectURI string
  • verifier string

func (*ProviderClient_Expecter) Refresh

func (_e *ProviderClient_Expecter) Refresh(ctx interface{}, cfg interface{}, refreshToken interface{}) *ProviderClient_Refresh_Call

Refresh is a helper method to define mock.On call

  • ctx context.Context
  • cfg *registry.MCPAuth
  • refreshToken string

type ProviderClient_Refresh_Call

type ProviderClient_Refresh_Call struct {
	*mock.Call
}

ProviderClient_Refresh_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Refresh'

func (*ProviderClient_Refresh_Call) Return

func (*ProviderClient_Refresh_Call) Run

func (*ProviderClient_Refresh_Call) RunAndReturn

type UpstreamRegistrar

type UpstreamRegistrar struct {
	mock.Mock
}

UpstreamRegistrar is an autogenerated mock type for the UpstreamRegistrar type

func NewUpstreamRegistrar

func NewUpstreamRegistrar(t interface {
	mock.TestingT
	Cleanup(func())
}) *UpstreamRegistrar

NewUpstreamRegistrar creates a new instance of UpstreamRegistrar. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*UpstreamRegistrar) CachedClient

func (_m *UpstreamRegistrar) CachedClient(ctx context.Context, key string) (*oauth.RegisteredClient, error)

CachedClient provides a mock function with given fields: ctx, key

func (*UpstreamRegistrar) Discover

func (_m *UpstreamRegistrar) Discover(ctx context.Context, upstreamURL string) (*oauth.UpstreamAuthServer, error)

Discover provides a mock function with given fields: ctx, upstreamURL

func (*UpstreamRegistrar) EXPECT

func (*UpstreamRegistrar) EnsureClient

func (_m *UpstreamRegistrar) EnsureClient(ctx context.Context, key string, meta *oauth.UpstreamAuthServer, redirectURI string) (*oauth.RegisteredClient, error)

EnsureClient provides a mock function with given fields: ctx, key, meta, redirectURI

type UpstreamRegistrar_CachedClient_Call

type UpstreamRegistrar_CachedClient_Call struct {
	*mock.Call
}

UpstreamRegistrar_CachedClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CachedClient'

func (*UpstreamRegistrar_CachedClient_Call) Return

func (*UpstreamRegistrar_CachedClient_Call) Run

func (*UpstreamRegistrar_CachedClient_Call) RunAndReturn

type UpstreamRegistrar_Discover_Call

type UpstreamRegistrar_Discover_Call struct {
	*mock.Call
}

UpstreamRegistrar_Discover_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Discover'

func (*UpstreamRegistrar_Discover_Call) Return

func (*UpstreamRegistrar_Discover_Call) Run

func (*UpstreamRegistrar_Discover_Call) RunAndReturn

type UpstreamRegistrar_EnsureClient_Call

type UpstreamRegistrar_EnsureClient_Call struct {
	*mock.Call
}

UpstreamRegistrar_EnsureClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnsureClient'

func (*UpstreamRegistrar_EnsureClient_Call) Return

func (*UpstreamRegistrar_EnsureClient_Call) Run

type UpstreamRegistrar_Expecter

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

func (*UpstreamRegistrar_Expecter) CachedClient

func (_e *UpstreamRegistrar_Expecter) CachedClient(ctx interface{}, key interface{}) *UpstreamRegistrar_CachedClient_Call

CachedClient is a helper method to define mock.On call

  • ctx context.Context
  • key string

func (*UpstreamRegistrar_Expecter) Discover

func (_e *UpstreamRegistrar_Expecter) Discover(ctx interface{}, upstreamURL interface{}) *UpstreamRegistrar_Discover_Call

Discover is a helper method to define mock.On call

  • ctx context.Context
  • upstreamURL string

func (*UpstreamRegistrar_Expecter) EnsureClient

func (_e *UpstreamRegistrar_Expecter) EnsureClient(ctx interface{}, key interface{}, meta interface{}, redirectURI interface{}) *UpstreamRegistrar_EnsureClient_Call

EnsureClient is a helper method to define mock.On call

  • ctx context.Context
  • key string
  • meta *oauth.UpstreamAuthServer
  • redirectURI string

type UserInfoClient added in v0.2.3

type UserInfoClient struct {
	mock.Mock
}

UserInfoClient is an autogenerated mock type for the UserInfoClient type

func NewUserInfoClient added in v0.2.3

func NewUserInfoClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *UserInfoClient

NewUserInfoClient creates a new instance of UserInfoClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*UserInfoClient) EXPECT added in v0.2.3

func (*UserInfoClient) Fetch added in v0.2.3

func (_m *UserInfoClient) Fetch(ctx context.Context, userInfoURL string, accessToken string) (map[string]interface{}, error)

Fetch provides a mock function with given fields: ctx, userInfoURL, accessToken

type UserInfoClient_Expecter added in v0.2.3

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

func (*UserInfoClient_Expecter) Fetch added in v0.2.3

func (_e *UserInfoClient_Expecter) Fetch(ctx interface{}, userInfoURL interface{}, accessToken interface{}) *UserInfoClient_Fetch_Call

Fetch is a helper method to define mock.On call

  • ctx context.Context
  • userInfoURL string
  • accessToken string

type UserInfoClient_Fetch_Call added in v0.2.3

type UserInfoClient_Fetch_Call struct {
	*mock.Call
}

UserInfoClient_Fetch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Fetch'

func (*UserInfoClient_Fetch_Call) Return added in v0.2.3

func (_c *UserInfoClient_Fetch_Call) Return(_a0 map[string]interface{}, _a1 error) *UserInfoClient_Fetch_Call

func (*UserInfoClient_Fetch_Call) Run added in v0.2.3

func (_c *UserInfoClient_Fetch_Call) Run(run func(ctx context.Context, userInfoURL string, accessToken string)) *UserInfoClient_Fetch_Call

func (*UserInfoClient_Fetch_Call) RunAndReturn added in v0.2.3

func (_c *UserInfoClient_Fetch_Call) RunAndReturn(run func(context.Context, string, string) (map[string]interface{}, error)) *UserInfoClient_Fetch_Call

Jump to

Keyboard shortcuts

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