auth

package
v0.0.0-...-46fca04 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2022 License: MIT, MIT Imports: 8 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 IOAuth

type IOAuth interface {
	AuthCodeURL(state string, opts ...oauth2.AuthCodeOption) string
	Client(ctx context.Context, t *oauth2.Token) *http.Client
	Exchange(ctx context.Context, code string, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)
}

type MockIOAuth

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

MockIOAuth is a mock of IOAuth interface.

func NewMockIOAuth

func NewMockIOAuth(ctrl *gomock.Controller) *MockIOAuth

NewMockIOAuth creates a new mock instance.

func (*MockIOAuth) AuthCodeURL

func (m *MockIOAuth) AuthCodeURL(state string, opts ...oauth2.AuthCodeOption) string

AuthCodeURL mocks base method.

func (*MockIOAuth) Client

func (m *MockIOAuth) Client(ctx context.Context, t *oauth2.Token) *http.Client

Client mocks base method.

func (*MockIOAuth) EXPECT

func (m *MockIOAuth) EXPECT() *MockIOAuthMockRecorder

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

func (*MockIOAuth) Exchange

func (m *MockIOAuth) Exchange(ctx context.Context, code string, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)

Exchange mocks base method.

type MockIOAuthMockRecorder

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

MockIOAuthMockRecorder is the mock recorder for MockIOAuth.

func (*MockIOAuthMockRecorder) AuthCodeURL

func (mr *MockIOAuthMockRecorder) AuthCodeURL(state interface{}, opts ...interface{}) *gomock.Call

AuthCodeURL indicates an expected call of AuthCodeURL.

func (*MockIOAuthMockRecorder) Client

func (mr *MockIOAuthMockRecorder) Client(ctx, t interface{}) *gomock.Call

Client indicates an expected call of Client.

func (*MockIOAuthMockRecorder) Exchange

func (mr *MockIOAuthMockRecorder) Exchange(ctx, code interface{}, opts ...interface{}) *gomock.Call

Exchange indicates an expected call of Exchange.

type Repo

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

func New

func New(oauth IOAuth) *Repo

func (*Repo) GetGoogleUserInfo

func (r *Repo) GetGoogleUserInfo(ctx context.Context, code string) (google.GoogleUserInfo, error)

GetGoogleUserInfo get user info after authenticate

func (*Repo) GoogleRedirectURL

func (r *Repo) GoogleRedirectURL(ctx context.Context, state string) string

GoogleRedirectURL get login url

Jump to

Keyboard shortcuts

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