mock

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package mock is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

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

App is a mock of App interface

func NewApp

func NewApp(ctrl *gomock.Controller) *App

NewApp creates a new mock instance

func (*App) CreateRecoveryCode

func (m *App) CreateRecoveryCode(ctx context.Context, email string) error

CreateRecoveryCode mocks base method

func (*App) CreateUser

func (m *App) CreateUser(ctx context.Context, email, username, password string, origin app.Origin) (*app.User, app.AuthToken, error)

CreateUser mocks base method

func (*App) DeleteUser

func (m *App) DeleteUser(arg0 context.Context, arg1 app.AuthUser) error

DeleteUser mocks base method

func (*App) EXPECT

func (m *App) EXPECT() *AppMockRecorder

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

func (*App) ListUserByUsername

func (m *App) ListUserByUsername(arg0 context.Context, arg1 app.AuthUser, arg2 string, arg3 app.Page) ([]app.User, int, error)

ListUserByUsername mocks base method

func (*App) Login

func (m *App) Login(ctx context.Context, email, password string, origin app.Origin) (*app.User, app.AuthToken, error)

Login mocks base method

func (*App) Logout

func (m *App) Logout(arg0 context.Context, arg1 app.AuthUser) error

Logout mocks base method

func (*App) RecoveryPassword

func (m *App) RecoveryPassword(ctx context.Context, code, newPassword string) error

RecoveryPassword mocks base method

func (*App) StartWALNotification

func (m *App) StartWALNotification(ctx context.Context) error

StartWALNotification mocks base method

func (*App) UpdateEmail

func (m *App) UpdateEmail(arg0 context.Context, arg1 app.AuthUser, arg2 string) error

UpdateEmail mocks base method

func (*App) UpdatePassword

func (m *App) UpdatePassword(ctx context.Context, authUser app.AuthUser, oldPass, newPass string) error

UpdatePassword mocks base method

func (*App) UpdateUsername

func (m *App) UpdateUsername(arg0 context.Context, arg1 app.AuthUser, arg2 string) error

UpdateUsername mocks base method

func (*App) User

func (m *App) User(arg0 context.Context, arg1 app.AuthUser, arg2 app.UserID) (*app.User, error)

User mocks base method

func (*App) UserByAuthToken

func (m *App) UserByAuthToken(ctx context.Context, token app.AuthToken) (*app.AuthUser, error)

UserByAuthToken mocks base method

func (*App) VerificationEmail

func (m *App) VerificationEmail(ctx context.Context, email string) error

VerificationEmail mocks base method

func (*App) VerificationUsername

func (m *App) VerificationUsername(ctx context.Context, username string) error

VerificationUsername mocks base method

type AppMockRecorder

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

AppMockRecorder is the mock recorder for App

func (*AppMockRecorder) CreateRecoveryCode

func (mr *AppMockRecorder) CreateRecoveryCode(ctx, email interface{}) *gomock.Call

CreateRecoveryCode indicates an expected call of CreateRecoveryCode

func (*AppMockRecorder) CreateUser

func (mr *AppMockRecorder) CreateUser(ctx, email, username, password, origin interface{}) *gomock.Call

CreateUser indicates an expected call of CreateUser

func (*AppMockRecorder) DeleteUser

func (mr *AppMockRecorder) DeleteUser(arg0, arg1 interface{}) *gomock.Call

DeleteUser indicates an expected call of DeleteUser

func (*AppMockRecorder) ListUserByUsername

func (mr *AppMockRecorder) ListUserByUsername(arg0, arg1, arg2, arg3 interface{}) *gomock.Call

ListUserByUsername indicates an expected call of ListUserByUsername

func (*AppMockRecorder) Login

func (mr *AppMockRecorder) Login(ctx, email, password, origin interface{}) *gomock.Call

Login indicates an expected call of Login

func (*AppMockRecorder) Logout

func (mr *AppMockRecorder) Logout(arg0, arg1 interface{}) *gomock.Call

Logout indicates an expected call of Logout

func (*AppMockRecorder) RecoveryPassword

func (mr *AppMockRecorder) RecoveryPassword(ctx, code, newPassword interface{}) *gomock.Call

RecoveryPassword indicates an expected call of RecoveryPassword

func (*AppMockRecorder) StartWALNotification

func (mr *AppMockRecorder) StartWALNotification(ctx interface{}) *gomock.Call

StartWALNotification indicates an expected call of StartWALNotification

func (*AppMockRecorder) UpdateEmail

func (mr *AppMockRecorder) UpdateEmail(arg0, arg1, arg2 interface{}) *gomock.Call

UpdateEmail indicates an expected call of UpdateEmail

func (*AppMockRecorder) UpdatePassword

func (mr *AppMockRecorder) UpdatePassword(ctx, authUser, oldPass, newPass interface{}) *gomock.Call

UpdatePassword indicates an expected call of UpdatePassword

func (*AppMockRecorder) UpdateUsername

func (mr *AppMockRecorder) UpdateUsername(arg0, arg1, arg2 interface{}) *gomock.Call

UpdateUsername indicates an expected call of UpdateUsername

func (*AppMockRecorder) User

func (mr *AppMockRecorder) User(arg0, arg1, arg2 interface{}) *gomock.Call

User indicates an expected call of User

func (*AppMockRecorder) UserByAuthToken

func (mr *AppMockRecorder) UserByAuthToken(ctx, token interface{}) *gomock.Call

UserByAuthToken indicates an expected call of UserByAuthToken

func (*AppMockRecorder) VerificationEmail

func (mr *AppMockRecorder) VerificationEmail(ctx, email interface{}) *gomock.Call

VerificationEmail indicates an expected call of VerificationEmail

func (*AppMockRecorder) VerificationUsername

func (mr *AppMockRecorder) VerificationUsername(ctx, username interface{}) *gomock.Call

VerificationUsername indicates an expected call of VerificationUsername

type Auth

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

Auth is a mock of Auth interface

func NewAuth

func NewAuth(ctrl *gomock.Controller) *Auth

NewAuth creates a new mock instance

func (*Auth) EXPECT

func (m *Auth) EXPECT() *AuthMockRecorder

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

func (*Auth) Parse

func (m *Auth) Parse(token app.AuthToken) (app.TokenID, error)

Parse mocks base method

func (*Auth) Token

func (m *Auth) Token(expired time.Duration) (app.AuthToken, app.TokenID, error)

Token mocks base method

type AuthMockRecorder

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

AuthMockRecorder is the mock recorder for Auth

func (*AuthMockRecorder) Parse

func (mr *AuthMockRecorder) Parse(token interface{}) *gomock.Call

Parse indicates an expected call of Parse

func (*AuthMockRecorder) Token

func (mr *AuthMockRecorder) Token(expired interface{}) *gomock.Call

Token indicates an expected call of Token

type Code

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

Code is a mock of Code interface

func NewCode

func NewCode(ctrl *gomock.Controller) *Code

NewCode creates a new mock instance

func (*Code) EXPECT

func (m *Code) EXPECT() *CodeMockRecorder

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

func (*Code) Generate

func (m *Code) Generate(length int) string

Generate mocks base method

type CodeMockRecorder

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

CodeMockRecorder is the mock recorder for Code

func (*CodeMockRecorder) Generate

func (mr *CodeMockRecorder) Generate(length interface{}) *gomock.Call

Generate indicates an expected call of Generate

type CodeRepo

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

CodeRepo is a mock of CodeRepo interface

func NewCodeRepo

func NewCodeRepo(ctrl *gomock.Controller) *CodeRepo

NewCodeRepo creates a new mock instance

func (*CodeRepo) Code

func (m *CodeRepo) Code(ctx context.Context, id app.UserID) (string, error)

Code mocks base method

func (*CodeRepo) EXPECT

func (m *CodeRepo) EXPECT() *CodeRepoMockRecorder

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

func (*CodeRepo) SaveCode

func (m *CodeRepo) SaveCode(ctx context.Context, id app.UserID, code string) error

SaveCode mocks base method

func (*CodeRepo) UserID

func (m *CodeRepo) UserID(ctx context.Context, code string) (app.UserID, time.Time, error)

UserID mocks base method

type CodeRepoMockRecorder

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

CodeRepoMockRecorder is the mock recorder for CodeRepo

func (*CodeRepoMockRecorder) Code

func (mr *CodeRepoMockRecorder) Code(ctx, id interface{}) *gomock.Call

Code indicates an expected call of Code

func (*CodeRepoMockRecorder) SaveCode

func (mr *CodeRepoMockRecorder) SaveCode(ctx, id, code interface{}) *gomock.Call

SaveCode indicates an expected call of SaveCode

func (*CodeRepoMockRecorder) UserID

func (mr *CodeRepoMockRecorder) UserID(ctx, code interface{}) *gomock.Call

UserID indicates an expected call of UserID

type Notification

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

Notification is a mock of Notification interface

func NewNotification

func NewNotification(ctrl *gomock.Controller) *Notification

NewNotification creates a new mock instance

func (*Notification) EXPECT

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

func (*Notification) Notification

func (m *Notification) Notification(contact string, msg app.Message) error

Notification mocks base method

type NotificationMockRecorder

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

NotificationMockRecorder is the mock recorder for Notification

func (*NotificationMockRecorder) Notification

func (mr *NotificationMockRecorder) Notification(contact, msg interface{}) *gomock.Call

Notification indicates an expected call of Notification

type OAuth

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

OAuth is a mock of OAuth interface

func NewOAuth

func NewOAuth(ctrl *gomock.Controller) *OAuth

NewOAuth creates a new mock instance

func (*OAuth) Account

func (m *OAuth) Account(arg0 context.Context, arg1 string) (*app.OAuthAccount, error)

Account mocks base method

func (*OAuth) EXPECT

func (m *OAuth) EXPECT() *OAuthMockRecorder

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

type OAuthMockRecorder

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

OAuthMockRecorder is the mock recorder for OAuth

func (*OAuthMockRecorder) Account

func (mr *OAuthMockRecorder) Account(arg0, arg1 interface{}) *gomock.Call

Account indicates an expected call of Account

type Password

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

Password is a mock of Password interface

func NewPassword

func NewPassword(ctrl *gomock.Controller) *Password

NewPassword creates a new mock instance

func (*Password) Compare

func (m *Password) Compare(hashedPassword, password []byte) bool

Compare mocks base method

func (*Password) EXPECT

func (m *Password) EXPECT() *PasswordMockRecorder

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

func (*Password) Hashing

func (m *Password) Hashing(password string) ([]byte, error)

Hashing mocks base method

type PasswordMockRecorder

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

PasswordMockRecorder is the mock recorder for Password

func (*PasswordMockRecorder) Compare

func (mr *PasswordMockRecorder) Compare(hashedPassword, password interface{}) *gomock.Call

Compare indicates an expected call of Compare

func (*PasswordMockRecorder) Hashing

func (mr *PasswordMockRecorder) Hashing(password interface{}) *gomock.Call

Hashing indicates an expected call of Hashing

type SessionRepo

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

SessionRepo is a mock of SessionRepo interface

func NewSessionRepo

func NewSessionRepo(ctrl *gomock.Controller) *SessionRepo

NewSessionRepo creates a new mock instance

func (*SessionRepo) DeleteSession

func (m *SessionRepo) DeleteSession(arg0 context.Context, arg1 app.TokenID) error

DeleteSession mocks base method

func (*SessionRepo) EXPECT

func (m *SessionRepo) EXPECT() *SessionRepoMockRecorder

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

func (*SessionRepo) SaveSession

func (m *SessionRepo) SaveSession(arg0 context.Context, arg1 app.UserID, arg2 app.TokenID, arg3 app.Origin) error

SaveSession mocks base method

func (*SessionRepo) SessionByTokenID

func (m *SessionRepo) SessionByTokenID(arg0 context.Context, arg1 app.TokenID) (*app.Session, error)

SessionByTokenID mocks base method

type SessionRepoMockRecorder

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

SessionRepoMockRecorder is the mock recorder for SessionRepo

func (*SessionRepoMockRecorder) DeleteSession

func (mr *SessionRepoMockRecorder) DeleteSession(arg0, arg1 interface{}) *gomock.Call

DeleteSession indicates an expected call of DeleteSession

func (*SessionRepoMockRecorder) SaveSession

func (mr *SessionRepoMockRecorder) SaveSession(arg0, arg1, arg2, arg3 interface{}) *gomock.Call

SaveSession indicates an expected call of SaveSession

func (*SessionRepoMockRecorder) SessionByTokenID

func (mr *SessionRepoMockRecorder) SessionByTokenID(arg0, arg1 interface{}) *gomock.Call

SessionByTokenID indicates an expected call of SessionByTokenID

type UserRepo

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

UserRepo is a mock of UserRepo interface

func NewUserRepo

func NewUserRepo(ctrl *gomock.Controller) *UserRepo

NewUserRepo creates a new mock instance

func (*UserRepo) CreateUser

func (m *UserRepo) CreateUser(arg0 context.Context, arg1 app.User) (app.UserID, error)

CreateUser mocks base method

func (*UserRepo) DeleteUser

func (m *UserRepo) DeleteUser(arg0 context.Context, arg1 app.UserID) error

DeleteUser mocks base method

func (*UserRepo) EXPECT

func (m *UserRepo) EXPECT() *UserRepoMockRecorder

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

func (*UserRepo) ListUserByUsername

func (m *UserRepo) ListUserByUsername(arg0 context.Context, arg1 string, arg2 app.Page) ([]app.User, int, error)

ListUserByUsername mocks base method

func (*UserRepo) UpdateEmail

func (m *UserRepo) UpdateEmail(arg0 context.Context, arg1 app.UserID, arg2 string) error

UpdateEmail mocks base method

func (*UserRepo) UpdatePassword

func (m *UserRepo) UpdatePassword(arg0 context.Context, arg1 app.UserID, arg2 []byte) error

UpdatePassword mocks base method

func (*UserRepo) UpdateUsername

func (m *UserRepo) UpdateUsername(arg0 context.Context, arg1 app.UserID, arg2 string) error

UpdateUsername mocks base method

func (*UserRepo) UserByEmail

func (m *UserRepo) UserByEmail(arg0 context.Context, arg1 string) (*app.User, error)

UserByEmail mocks base method

func (*UserRepo) UserByID

func (m *UserRepo) UserByID(arg0 context.Context, arg1 app.UserID) (*app.User, error)

UserByID mocks base method

func (*UserRepo) UserByTokenID

func (m *UserRepo) UserByTokenID(arg0 context.Context, arg1 app.TokenID) (*app.User, error)

UserByTokenID mocks base method

func (*UserRepo) UserByUsername

func (m *UserRepo) UserByUsername(arg0 context.Context, arg1 string) (*app.User, error)

UserByUsername mocks base method

type UserRepoMockRecorder

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

UserRepoMockRecorder is the mock recorder for UserRepo

func (*UserRepoMockRecorder) CreateUser

func (mr *UserRepoMockRecorder) CreateUser(arg0, arg1 interface{}) *gomock.Call

CreateUser indicates an expected call of CreateUser

func (*UserRepoMockRecorder) DeleteUser

func (mr *UserRepoMockRecorder) DeleteUser(arg0, arg1 interface{}) *gomock.Call

DeleteUser indicates an expected call of DeleteUser

func (*UserRepoMockRecorder) ListUserByUsername

func (mr *UserRepoMockRecorder) ListUserByUsername(arg0, arg1, arg2 interface{}) *gomock.Call

ListUserByUsername indicates an expected call of ListUserByUsername

func (*UserRepoMockRecorder) UpdateEmail

func (mr *UserRepoMockRecorder) UpdateEmail(arg0, arg1, arg2 interface{}) *gomock.Call

UpdateEmail indicates an expected call of UpdateEmail

func (*UserRepoMockRecorder) UpdatePassword

func (mr *UserRepoMockRecorder) UpdatePassword(arg0, arg1, arg2 interface{}) *gomock.Call

UpdatePassword indicates an expected call of UpdatePassword

func (*UserRepoMockRecorder) UpdateUsername

func (mr *UserRepoMockRecorder) UpdateUsername(arg0, arg1, arg2 interface{}) *gomock.Call

UpdateUsername indicates an expected call of UpdateUsername

func (*UserRepoMockRecorder) UserByEmail

func (mr *UserRepoMockRecorder) UserByEmail(arg0, arg1 interface{}) *gomock.Call

UserByEmail indicates an expected call of UserByEmail

func (*UserRepoMockRecorder) UserByID

func (mr *UserRepoMockRecorder) UserByID(arg0, arg1 interface{}) *gomock.Call

UserByID indicates an expected call of UserByID

func (*UserRepoMockRecorder) UserByTokenID

func (mr *UserRepoMockRecorder) UserByTokenID(arg0, arg1 interface{}) *gomock.Call

UserByTokenID indicates an expected call of UserByTokenID

func (*UserRepoMockRecorder) UserByUsername

func (mr *UserRepoMockRecorder) UserByUsername(arg0, arg1 interface{}) *gomock.Call

UserByUsername indicates an expected call of UserByUsername

type WAL

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

WAL is a mock of WAL interface

func NewWAL

func NewWAL(ctrl *gomock.Controller) *WAL

NewWAL creates a new mock instance

func (*WAL) DeleteTaskNotification

func (m *WAL) DeleteTaskNotification(ctx context.Context, id int) error

DeleteTaskNotification mocks base method

func (*WAL) EXPECT

func (m *WAL) EXPECT() *WALMockRecorder

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

func (*WAL) NotificationTask

func (m *WAL) NotificationTask(ctx context.Context) (*app.TaskNotification, error)

NotificationTask mocks base method

type WALMockRecorder

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

WALMockRecorder is the mock recorder for WAL

func (*WALMockRecorder) DeleteTaskNotification

func (mr *WALMockRecorder) DeleteTaskNotification(ctx, id interface{}) *gomock.Call

DeleteTaskNotification indicates an expected call of DeleteTaskNotification

func (*WALMockRecorder) NotificationTask

func (mr *WALMockRecorder) NotificationTask(ctx interface{}) *gomock.Call

NotificationTask indicates an expected call of NotificationTask

Jump to

Keyboard shortcuts

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