auth

package
v0.0.0-...-4eeaa7b Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package auth is a generated GoMock package.

Package auth is a generated GoMock package.

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 MockOAuthClient

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

MockOAuthClient is a mock of OAuthClient interface

func NewMockOAuthClient

func NewMockOAuthClient(ctrl *gomock.Controller) *MockOAuthClient

NewMockOAuthClient creates a new mock instance

func (*MockOAuthClient) EXPECT

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

func (*MockOAuthClient) Exchange

func (m *MockOAuthClient) Exchange(authCode string) (*oauth2.Token, error)

Exchange mocks base method

func (*MockOAuthClient) GetAuthCodeURL

func (m *MockOAuthClient) GetAuthCodeURL() string

GetAuthCodeURL mocks base method

type MockOAuthClientMockRecorder

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

MockOAuthClientMockRecorder is the mock recorder for MockOAuthClient

func (*MockOAuthClientMockRecorder) Exchange

func (mr *MockOAuthClientMockRecorder) Exchange(authCode interface{}) *gomock.Call

Exchange indicates an expected call of Exchange

func (*MockOAuthClientMockRecorder) GetAuthCodeURL

func (mr *MockOAuthClientMockRecorder) GetAuthCodeURL() *gomock.Call

GetAuthCodeURL indicates an expected call of GetAuthCodeURL

type MockService

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

MockService is a mock of Service interface

func NewMockService

func NewMockService(ctrl *gomock.Controller) *MockService

NewMockService creates a new mock instance

func (*MockService) EXPECT

func (m *MockService) EXPECT() *MockServiceMockRecorder

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

func (*MockService) HandleFitbitAuthCode

func (m *MockService) HandleFitbitAuthCode(code string) error

HandleFitbitAuthCode mocks base method

func (*MockService) HandleGCalAuthCode

func (m *MockService) HandleGCalAuthCode(code string) error

HandleGCalAuthCode mocks base method

type MockServiceMockRecorder

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

MockServiceMockRecorder is the mock recorder for MockService

func (*MockServiceMockRecorder) HandleFitbitAuthCode

func (mr *MockServiceMockRecorder) HandleFitbitAuthCode(code interface{}) *gomock.Call

HandleFitbitAuthCode indicates an expected call of HandleFitbitAuthCode

func (*MockServiceMockRecorder) HandleGCalAuthCode

func (mr *MockServiceMockRecorder) HandleGCalAuthCode(code interface{}) *gomock.Call

HandleGCalAuthCode indicates an expected call of HandleGCalAuthCode

type MockStore

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

MockStore is a mock of Store interface

func NewMockStore

func NewMockStore(ctrl *gomock.Controller) *MockStore

NewMockStore creates a new mock instance

func (*MockStore) EXPECT

func (m *MockStore) EXPECT() *MockStoreMockRecorder

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

func (*MockStore) FetchFitbitToken

func (m *MockStore) FetchFitbitToken() (*oauth2.Token, error)

FetchFitbitToken mocks base method

func (*MockStore) FetchGCalToken

func (m *MockStore) FetchGCalToken() (*oauth2.Token, error)

FetchGCalToken mocks base method

func (*MockStore) WriteFitbitToken

func (m *MockStore) WriteFitbitToken(token *oauth2.Token) error

WriteFitbitToken mocks base method

func (*MockStore) WriteGCalToken

func (m *MockStore) WriteGCalToken(token *oauth2.Token) error

WriteGCalToken mocks base method

type MockStoreMockRecorder

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

MockStoreMockRecorder is the mock recorder for MockStore

func (*MockStoreMockRecorder) FetchFitbitToken

func (mr *MockStoreMockRecorder) FetchFitbitToken() *gomock.Call

FetchFitbitToken indicates an expected call of FetchFitbitToken

func (*MockStoreMockRecorder) FetchGCalToken

func (mr *MockStoreMockRecorder) FetchGCalToken() *gomock.Call

FetchGCalToken indicates an expected call of FetchGCalToken

func (*MockStoreMockRecorder) WriteFitbitToken

func (mr *MockStoreMockRecorder) WriteFitbitToken(token interface{}) *gomock.Call

WriteFitbitToken indicates an expected call of WriteFitbitToken

func (*MockStoreMockRecorder) WriteGCalToken

func (mr *MockStoreMockRecorder) WriteGCalToken(token interface{}) *gomock.Call

WriteGCalToken indicates an expected call of WriteGCalToken

type OAuthClient

type OAuthClient interface {
	GetAuthCodeURL() string
	Exchange(authCode string) (*oauth2.Token, error)
}

func NewOAuthClient

func NewOAuthClient(config *oauth2.Config) OAuthClient

type Service

type Service interface {
	HandleFitbitAuthCode(code string) error
	HandleGCalAuthCode(code string) error
}

func NewService

func NewService(store Store, fitbitOAuthClient, gcalOAuthClient OAuthClient) Service

type Store

type Store interface {
	WriteFitbitToken(token *oauth2.Token) error
	FetchFitbitToken() (*oauth2.Token, error)
	WriteGCalToken(token *oauth2.Token) error
	FetchGCalToken() (*oauth2.Token, error)
}

Store is an interface for storing oauth token

Jump to

Keyboard shortcuts

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