Documentation ¶
Index ¶
- type FakeSocialService
- func (fss *FakeSocialService) GetConnector(string) (social.SocialConnector, error)
- func (fss *FakeSocialService) GetOAuthHttpClient(string) (*http.Client, error)
- func (fss *FakeSocialService) GetOAuthInfoProvider(string) *social.OAuthInfo
- func (fss *FakeSocialService) GetOAuthInfoProviders() map[string]*social.OAuthInfo
- func (fss *FakeSocialService) GetOAuthProviders() map[string]bool
- type MockSocialConnector
- func (_m *MockSocialConnector) AuthCodeURL(state string, opts ...oauth2.AuthCodeOption) string
- func (_m *MockSocialConnector) Client(ctx context.Context, t *oauth2.Token) *http.Client
- func (_m *MockSocialConnector) Exchange(ctx context.Context, code string, authOptions ...oauth2.AuthCodeOption) (*oauth2.Token, error)
- func (_m *MockSocialConnector) IsEmailAllowed(email string) bool
- func (_m *MockSocialConnector) IsSignupAllowed() bool
- func (_m *MockSocialConnector) SupportBundleContent(_a0 *bytes.Buffer) error
- func (_m *MockSocialConnector) TokenSource(ctx context.Context, t *oauth2.Token) oauth2.TokenSource
- func (_m *MockSocialConnector) UserInfo(ctx context.Context, client *http.Client, token *oauth2.Token) (*social.BasicUserInfo, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeSocialService ¶
type FakeSocialService struct { ExpectedAuthInfoProvider *social.OAuthInfo ExpectedConnector social.SocialConnector ExpectedHttpClient *http.Client }
func (*FakeSocialService) GetConnector ¶
func (fss *FakeSocialService) GetConnector(string) (social.SocialConnector, error)
func (*FakeSocialService) GetOAuthHttpClient ¶
func (fss *FakeSocialService) GetOAuthHttpClient(string) (*http.Client, error)
func (*FakeSocialService) GetOAuthInfoProvider ¶
func (fss *FakeSocialService) GetOAuthInfoProvider(string) *social.OAuthInfo
func (*FakeSocialService) GetOAuthInfoProviders ¶
func (fss *FakeSocialService) GetOAuthInfoProviders() map[string]*social.OAuthInfo
func (*FakeSocialService) GetOAuthProviders ¶
func (fss *FakeSocialService) GetOAuthProviders() map[string]bool
type MockSocialConnector ¶
MockSocialConnector is an autogenerated mock type for the SocialConnector type
func NewMockSocialConnector ¶
func NewMockSocialConnector(t mockConstructorTestingTNewMockSocialConnector) *MockSocialConnector
NewMockSocialConnector creates a new instance of MockSocialConnector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*MockSocialConnector) AuthCodeURL ¶
func (_m *MockSocialConnector) AuthCodeURL(state string, opts ...oauth2.AuthCodeOption) string
AuthCodeURL provides a mock function with given fields: state, opts
func (*MockSocialConnector) Exchange ¶
func (_m *MockSocialConnector) Exchange(ctx context.Context, code string, authOptions ...oauth2.AuthCodeOption) (*oauth2.Token, error)
Exchange provides a mock function with given fields: ctx, code, authOptions
func (*MockSocialConnector) IsEmailAllowed ¶
func (_m *MockSocialConnector) IsEmailAllowed(email string) bool
IsEmailAllowed provides a mock function with given fields: email
func (*MockSocialConnector) IsSignupAllowed ¶
func (_m *MockSocialConnector) IsSignupAllowed() bool
IsSignupAllowed provides a mock function with given fields:
func (*MockSocialConnector) SupportBundleContent ¶
func (_m *MockSocialConnector) SupportBundleContent(_a0 *bytes.Buffer) error
SupportBundleContent provides a mock function with given fields: _a0
func (*MockSocialConnector) TokenSource ¶
func (_m *MockSocialConnector) TokenSource(ctx context.Context, t *oauth2.Token) oauth2.TokenSource
TokenSource provides a mock function with given fields: ctx, t