mock_gosesh

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HandlerDone added in v0.2.0

type HandlerDone struct {
	mock.Mock
}

HandlerDone is an autogenerated mock type for the HandlerDone type

func NewHandlerDone added in v0.2.0

func NewHandlerDone(t interface {
	mock.TestingT
	Cleanup(func())
}) *HandlerDone

NewHandlerDone creates a new instance of HandlerDone. 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 (*HandlerDone) EXPECT added in v0.2.0

func (_m *HandlerDone) EXPECT() *HandlerDone_Expecter

func (*HandlerDone) Execute added in v0.2.0

func (_m *HandlerDone) Execute(_a0 http.ResponseWriter, _a1 *http.Request, _a2 error)

Execute provides a mock function with given fields: _a0, _a1, _a2

type HandlerDone_Execute_Call added in v0.2.0

type HandlerDone_Execute_Call struct {
	*mock.Call
}

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

func (*HandlerDone_Execute_Call) Return added in v0.2.0

func (*HandlerDone_Execute_Call) Run added in v0.2.0

func (*HandlerDone_Execute_Call) RunAndReturn added in v0.2.0

type HandlerDone_Expecter added in v0.2.0

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

func (*HandlerDone_Expecter) Execute added in v0.2.0

func (_e *HandlerDone_Expecter) Execute(_a0 interface{}, _a1 interface{}, _a2 interface{}) *HandlerDone_Execute_Call

Execute is a helper method to define mock.On call

  • _a0 http.ResponseWriter
  • _a1 *http.Request
  • _a2 error

type IDParser

type IDParser struct {
	mock.Mock
}

IDParser is an autogenerated mock type for the IDParser type

func NewIDParser

func NewIDParser(t interface {
	mock.TestingT
	Cleanup(func())
}) *IDParser

NewIDParser creates a new instance of IDParser. 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 (*IDParser) EXPECT

func (_m *IDParser) EXPECT() *IDParser_Expecter

func (*IDParser) Execute added in v0.1.2

func (_m *IDParser) Execute(_a0 []byte) (gosesh.Identifier, error)

Execute provides a mock function with given fields: _a0

type IDParser_Execute_Call added in v0.1.2

type IDParser_Execute_Call struct {
	*mock.Call
}

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

func (*IDParser_Execute_Call) Return added in v0.1.2

func (*IDParser_Execute_Call) Run added in v0.1.2

func (_c *IDParser_Execute_Call) Run(run func(_a0 []byte)) *IDParser_Execute_Call

func (*IDParser_Execute_Call) RunAndReturn added in v0.1.2

func (_c *IDParser_Execute_Call) RunAndReturn(run func([]byte) (gosesh.Identifier, error)) *IDParser_Execute_Call

type IDParser_Expecter

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

func (*IDParser_Expecter) Execute added in v0.1.2

func (_e *IDParser_Expecter) Execute(_a0 interface{}) *IDParser_Execute_Call

Execute is a helper method to define mock.On call

  • _a0 []byte

type Identifier

type Identifier struct {
	mock.Mock
}

Identifier is an autogenerated mock type for the Identifier type

func NewIdentifier

func NewIdentifier(t interface {
	mock.TestingT
	Cleanup(func())
}) *Identifier

NewIdentifier creates a new instance of Identifier. 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 (*Identifier) EXPECT

func (_m *Identifier) EXPECT() *Identifier_Expecter

func (*Identifier) String

func (_m *Identifier) String() string

String provides a mock function with given fields:

type Identifier_Expecter

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

func (*Identifier_Expecter) String

String is a helper method to define mock.On call

type Identifier_String_Call

type Identifier_String_Call struct {
	*mock.Call
}

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

func (*Identifier_String_Call) Return

func (*Identifier_String_Call) Run

func (_c *Identifier_String_Call) Run(run func()) *Identifier_String_Call

func (*Identifier_String_Call) RunAndReturn

func (_c *Identifier_String_Call) RunAndReturn(run func() string) *Identifier_String_Call

type NewOpts

type NewOpts struct {
	mock.Mock
}

NewOpts is an autogenerated mock type for the NewOpts type

func NewNewOpts

func NewNewOpts(t interface {
	mock.TestingT
	Cleanup(func())
}) *NewOpts

NewNewOpts creates a new instance of NewOpts. 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 (*NewOpts) EXPECT

func (_m *NewOpts) EXPECT() *NewOpts_Expecter

func (*NewOpts) Execute

func (_m *NewOpts) Execute(_a0 *gosesh.Gosesh)

Execute provides a mock function with given fields: _a0

type NewOpts_Execute_Call

type NewOpts_Execute_Call struct {
	*mock.Call
}

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

func (*NewOpts_Execute_Call) Return

func (*NewOpts_Execute_Call) Run

func (_c *NewOpts_Execute_Call) Run(run func(_a0 *gosesh.Gosesh)) *NewOpts_Execute_Call

func (*NewOpts_Execute_Call) RunAndReturn

func (_c *NewOpts_Execute_Call) RunAndReturn(run func(*gosesh.Gosesh)) *NewOpts_Execute_Call

type NewOpts_Expecter

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

func (*NewOpts_Expecter) Execute

func (_e *NewOpts_Expecter) Execute(_a0 interface{}) *NewOpts_Execute_Call

Execute is a helper method to define mock.On call

  • _a0 *gosesh.Gosesh

type OAuth2Credentials added in v0.4.0

type OAuth2Credentials struct {
	mock.Mock
}

OAuth2Credentials is an autogenerated mock type for the OAuth2Credentials type

func NewOAuth2Credentials added in v0.4.0

func NewOAuth2Credentials(t interface {
	mock.TestingT
	Cleanup(func())
}) *OAuth2Credentials

NewOAuth2Credentials creates a new instance of OAuth2Credentials. 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 (*OAuth2Credentials) ClientID added in v0.4.0

func (_m *OAuth2Credentials) ClientID() string

ClientID provides a mock function with given fields:

func (*OAuth2Credentials) ClientSecret added in v0.4.0

func (_m *OAuth2Credentials) ClientSecret() string

ClientSecret provides a mock function with given fields:

func (*OAuth2Credentials) EXPECT added in v0.4.0

type OAuth2Credentials_ClientID_Call added in v0.4.0

type OAuth2Credentials_ClientID_Call struct {
	*mock.Call
}

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

func (*OAuth2Credentials_ClientID_Call) Return added in v0.4.0

func (*OAuth2Credentials_ClientID_Call) Run added in v0.4.0

func (*OAuth2Credentials_ClientID_Call) RunAndReturn added in v0.4.0

type OAuth2Credentials_ClientSecret_Call added in v0.4.0

type OAuth2Credentials_ClientSecret_Call struct {
	*mock.Call
}

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

func (*OAuth2Credentials_ClientSecret_Call) Return added in v0.4.0

func (*OAuth2Credentials_ClientSecret_Call) Run added in v0.4.0

func (*OAuth2Credentials_ClientSecret_Call) RunAndReturn added in v0.4.0

type OAuth2Credentials_Expecter added in v0.4.0

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

func (*OAuth2Credentials_Expecter) ClientID added in v0.4.0

ClientID is a helper method to define mock.On call

func (*OAuth2Credentials_Expecter) ClientSecret added in v0.4.0

ClientSecret is a helper method to define mock.On call

type OAuth2User

type OAuth2User struct {
	mock.Mock
}

OAuth2User is an autogenerated mock type for the OAuth2User type

func NewOAuth2User

func NewOAuth2User(t interface {
	mock.TestingT
	Cleanup(func())
}) *OAuth2User

NewOAuth2User creates a new instance of OAuth2User. 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 (*OAuth2User) EXPECT

func (_m *OAuth2User) EXPECT() *OAuth2User_Expecter

func (*OAuth2User) Request

func (_m *OAuth2User) Request(ctx context.Context, accessToken string) (*http.Response, error)

Request provides a mock function with given fields: ctx, accessToken

func (*OAuth2User) String

func (_m *OAuth2User) String() string

String provides a mock function with given fields:

func (*OAuth2User) Unmarshal

func (_m *OAuth2User) Unmarshal(b []byte) error

Unmarshal provides a mock function with given fields: b

type OAuth2User_Expecter

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

func (*OAuth2User_Expecter) Request

func (_e *OAuth2User_Expecter) Request(ctx interface{}, accessToken interface{}) *OAuth2User_Request_Call

Request is a helper method to define mock.On call

  • ctx context.Context
  • accessToken string

func (*OAuth2User_Expecter) String

String is a helper method to define mock.On call

func (*OAuth2User_Expecter) Unmarshal

func (_e *OAuth2User_Expecter) Unmarshal(b interface{}) *OAuth2User_Unmarshal_Call

Unmarshal is a helper method to define mock.On call

  • b []byte

type OAuth2User_Request_Call

type OAuth2User_Request_Call struct {
	*mock.Call
}

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

func (*OAuth2User_Request_Call) Return

func (*OAuth2User_Request_Call) Run

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

func (*OAuth2User_Request_Call) RunAndReturn

type OAuth2User_String_Call

type OAuth2User_String_Call struct {
	*mock.Call
}

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

func (*OAuth2User_String_Call) Return

func (*OAuth2User_String_Call) Run

func (_c *OAuth2User_String_Call) Run(run func()) *OAuth2User_String_Call

func (*OAuth2User_String_Call) RunAndReturn

func (_c *OAuth2User_String_Call) RunAndReturn(run func() string) *OAuth2User_String_Call

type OAuth2User_Unmarshal_Call

type OAuth2User_Unmarshal_Call struct {
	*mock.Call
}

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

func (*OAuth2User_Unmarshal_Call) Return

func (*OAuth2User_Unmarshal_Call) Run

func (*OAuth2User_Unmarshal_Call) RunAndReturn

func (_c *OAuth2User_Unmarshal_Call) RunAndReturn(run func([]byte) error) *OAuth2User_Unmarshal_Call

type Session added in v0.4.0

type Session struct {
	mock.Mock
}

Session is an autogenerated mock type for the Session type

func NewSession added in v0.4.0

func NewSession(t interface {
	mock.TestingT
	Cleanup(func())
}) *Session

NewSession creates a new instance of Session. 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 (*Session) EXPECT added in v0.4.0

func (_m *Session) EXPECT() *Session_Expecter

func (*Session) ExpireAt added in v0.4.0

func (_m *Session) ExpireAt() time.Time

ExpireAt provides a mock function with given fields:

func (*Session) ID added in v0.4.0

func (_m *Session) ID() gosesh.Identifier

ID provides a mock function with given fields:

func (*Session) IdleAt added in v0.4.0

func (_m *Session) IdleAt() time.Time

IdleAt provides a mock function with given fields:

func (*Session) UserID added in v0.4.0

func (_m *Session) UserID() gosesh.Identifier

UserID provides a mock function with given fields:

type Session_Expecter added in v0.4.0

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

func (*Session_Expecter) ExpireAt added in v0.4.0

func (_e *Session_Expecter) ExpireAt() *Session_ExpireAt_Call

ExpireAt is a helper method to define mock.On call

func (*Session_Expecter) ID added in v0.4.0

ID is a helper method to define mock.On call

func (*Session_Expecter) IdleAt added in v0.4.0

func (_e *Session_Expecter) IdleAt() *Session_IdleAt_Call

IdleAt is a helper method to define mock.On call

func (*Session_Expecter) UserID added in v0.4.0

func (_e *Session_Expecter) UserID() *Session_UserID_Call

UserID is a helper method to define mock.On call

type Session_ExpireAt_Call added in v0.4.0

type Session_ExpireAt_Call struct {
	*mock.Call
}

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

func (*Session_ExpireAt_Call) Return added in v0.4.0

func (*Session_ExpireAt_Call) Run added in v0.4.0

func (_c *Session_ExpireAt_Call) Run(run func()) *Session_ExpireAt_Call

func (*Session_ExpireAt_Call) RunAndReturn added in v0.4.0

func (_c *Session_ExpireAt_Call) RunAndReturn(run func() time.Time) *Session_ExpireAt_Call

type Session_ID_Call added in v0.4.0

type Session_ID_Call struct {
	*mock.Call
}

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

func (*Session_ID_Call) Return added in v0.4.0

func (*Session_ID_Call) Run added in v0.4.0

func (_c *Session_ID_Call) Run(run func()) *Session_ID_Call

func (*Session_ID_Call) RunAndReturn added in v0.4.0

func (_c *Session_ID_Call) RunAndReturn(run func() gosesh.Identifier) *Session_ID_Call

type Session_IdleAt_Call added in v0.4.0

type Session_IdleAt_Call struct {
	*mock.Call
}

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

func (*Session_IdleAt_Call) Return added in v0.4.0

func (*Session_IdleAt_Call) Run added in v0.4.0

func (_c *Session_IdleAt_Call) Run(run func()) *Session_IdleAt_Call

func (*Session_IdleAt_Call) RunAndReturn added in v0.4.0

func (_c *Session_IdleAt_Call) RunAndReturn(run func() time.Time) *Session_IdleAt_Call

type Session_UserID_Call added in v0.4.0

type Session_UserID_Call struct {
	*mock.Call
}

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

func (*Session_UserID_Call) Return added in v0.4.0

func (*Session_UserID_Call) Run added in v0.4.0

func (_c *Session_UserID_Call) Run(run func()) *Session_UserID_Call

func (*Session_UserID_Call) RunAndReturn added in v0.4.0

func (_c *Session_UserID_Call) RunAndReturn(run func() gosesh.Identifier) *Session_UserID_Call

type Storer

type Storer struct {
	mock.Mock
}

Storer is an autogenerated mock type for the Storer type

func NewStorer

func NewStorer(t interface {
	mock.TestingT
	Cleanup(func())
}) *Storer

NewStorer creates a new instance of Storer. 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 (*Storer) CreateSession

func (_m *Storer) CreateSession(ctx context.Context, req gosesh.CreateSessionRequest) (gosesh.Session, error)

CreateSession provides a mock function with given fields: ctx, req

func (*Storer) DeleteSession

func (_m *Storer) DeleteSession(ctx context.Context, sessionID gosesh.Identifier) error

DeleteSession provides a mock function with given fields: ctx, sessionID

func (*Storer) DeleteUserSessions

func (_m *Storer) DeleteUserSessions(ctx context.Context, userID gosesh.Identifier) (int, error)

DeleteUserSessions provides a mock function with given fields: ctx, userID

func (*Storer) EXPECT

func (_m *Storer) EXPECT() *Storer_Expecter

func (*Storer) GetSession

func (_m *Storer) GetSession(ctx context.Context, sessionID gosesh.Identifier) (gosesh.Session, error)

GetSession provides a mock function with given fields: ctx, sessionID

func (*Storer) UpsertUser

func (_m *Storer) UpsertUser(ctx context.Context, user gosesh.OAuth2User) (gosesh.Identifier, error)

UpsertUser provides a mock function with given fields: ctx, user

type Storer_CreateSession_Call

type Storer_CreateSession_Call struct {
	*mock.Call
}

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

func (*Storer_CreateSession_Call) Return

func (*Storer_CreateSession_Call) Run

func (*Storer_CreateSession_Call) RunAndReturn

type Storer_DeleteSession_Call

type Storer_DeleteSession_Call struct {
	*mock.Call
}

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

func (*Storer_DeleteSession_Call) Return

func (*Storer_DeleteSession_Call) Run

func (*Storer_DeleteSession_Call) RunAndReturn

type Storer_DeleteUserSessions_Call

type Storer_DeleteUserSessions_Call struct {
	*mock.Call
}

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

func (*Storer_DeleteUserSessions_Call) Return

func (*Storer_DeleteUserSessions_Call) Run

func (*Storer_DeleteUserSessions_Call) RunAndReturn

type Storer_Expecter

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

func (*Storer_Expecter) CreateSession

func (_e *Storer_Expecter) CreateSession(ctx interface{}, req interface{}) *Storer_CreateSession_Call

CreateSession is a helper method to define mock.On call

  • ctx context.Context
  • req gosesh.CreateSessionRequest

func (*Storer_Expecter) DeleteSession

func (_e *Storer_Expecter) DeleteSession(ctx interface{}, sessionID interface{}) *Storer_DeleteSession_Call

DeleteSession is a helper method to define mock.On call

  • ctx context.Context
  • sessionID gosesh.Identifier

func (*Storer_Expecter) DeleteUserSessions

func (_e *Storer_Expecter) DeleteUserSessions(ctx interface{}, userID interface{}) *Storer_DeleteUserSessions_Call

DeleteUserSessions is a helper method to define mock.On call

  • ctx context.Context
  • userID gosesh.Identifier

func (*Storer_Expecter) GetSession

func (_e *Storer_Expecter) GetSession(ctx interface{}, sessionID interface{}) *Storer_GetSession_Call

GetSession is a helper method to define mock.On call

  • ctx context.Context
  • sessionID gosesh.Identifier

func (*Storer_Expecter) UpsertUser

func (_e *Storer_Expecter) UpsertUser(ctx interface{}, user interface{}) *Storer_UpsertUser_Call

UpsertUser is a helper method to define mock.On call

  • ctx context.Context
  • user gosesh.OAuth2User

type Storer_GetSession_Call

type Storer_GetSession_Call struct {
	*mock.Call
}

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

func (*Storer_GetSession_Call) Return

func (*Storer_GetSession_Call) Run

func (*Storer_GetSession_Call) RunAndReturn

type Storer_UpsertUser_Call

type Storer_UpsertUser_Call struct {
	*mock.Call
}

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

func (*Storer_UpsertUser_Call) Return

func (*Storer_UpsertUser_Call) Run

func (*Storer_UpsertUser_Call) RunAndReturn

Directories

Path Synopsis
stores

Jump to

Keyboard shortcuts

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