mocks

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Extension added in v1.1.0

type Extension struct {
	mock.Mock
}

Extension is an autogenerated mock type for the Extension type

func (*Extension) ExecuteHTML added in v1.1.0

func (_m *Extension) ExecuteHTML(name string, data map[string]string) string

ExecuteHTML provides a mock function with given fields: name, data

func (*Extension) ExecuteMarkdown added in v1.1.0

func (_m *Extension) ExecuteMarkdown(name string, data map[string]string) string

ExecuteMarkdown provides a mock function with given fields: name, data

type FormHandler

type FormHandler struct {
	mock.Mock
}

FormHandler is an autogenerated mock type for the FormHandler type

func (*FormHandler) HandleGET

func (_m *FormHandler) HandleGET(_a0 string, _a1 *http.Request) (string, error)

HandleGET provides a mock function with given fields: _a0, _a1

func (*FormHandler) HandlePOST

func (_m *FormHandler) HandlePOST(_a0 string, _a1 *http.Request) (string, error)

HandlePOST provides a mock function with given fields: _a0, _a1

type FormPolicy

type FormPolicy struct {
	mock.Mock
}

FormPolicy is an autogenerated mock type for the FormPolicy type

func (*FormPolicy) Sanitize

func (_m *FormPolicy) Sanitize(_a0 string) string

Sanitize provides a mock function with given fields: _a0

type FormSender

type FormSender struct {
	mock.Mock
}

FormSender is an autogenerated mock type for the FormSender type

func (*FormSender) SendMessage

func (_m *FormSender) SendMessage(_a0 id.RoomID, _a1 string) error

SendMessage provides a mock function with given fields: _a0, _a1

func (*FormSender) SendWebhook

func (_m *FormSender) SendWebhook(_a0 string, _a1 string, _a2 string, _a3 string, _a4 string) error

SendWebhook provides a mock function with given fields: _a0, _a1, _a2, _a3, _a4

type HTTPServer

type HTTPServer struct {
	mock.Mock
}

HTTPServer is an autogenerated mock type for the HTTPServer type

func (*HTTPServer) Start

func (_m *HTTPServer) Start()

Start provides a mock function with given fields:

type IPMatcher

type IPMatcher struct {
	mock.Mock
}

IPMatcher is an autogenerated mock type for the IPMatcher type

func (*IPMatcher) Match

func (_m *IPMatcher) Match(_a0 *http.Request) string

Match provides a mock function with given fields: _a0

type Logger

type Logger struct {
	mock.Mock
}

Logger is an autogenerated mock type for the Logger type

func (*Logger) Debug

func (_m *Logger) Debug(message string, args ...interface{})

Debug provides a mock function with given fields: message, args

func (*Logger) Error

func (_m *Logger) Error(message string, args ...interface{})

Error provides a mock function with given fields: message, args

func (*Logger) GetLog

func (_m *Logger) GetLog() *log.Logger

GetLog provides a mock function with given fields:

func (*Logger) Info

func (_m *Logger) Info(message string, args ...interface{})

Info provides a mock function with given fields: message, args

func (*Logger) Trace

func (_m *Logger) Trace(message string, args ...interface{})

Trace provides a mock function with given fields: message, args

func (*Logger) Warn

func (_m *Logger) Warn(message string, args ...interface{})

Warn provides a mock function with given fields: message, args

type MatrixBot

type MatrixBot struct {
	mock.Mock
}

MatrixBot is an autogenerated mock type for the MatrixBot type

func (*MatrixBot) SendEncryptedMessage

func (_m *MatrixBot) SendEncryptedMessage(roomID id.RoomID, message string) error

SendEncryptedMessage provides a mock function with given fields: roomID, message

func (*MatrixBot) SendMessage

func (_m *MatrixBot) SendMessage(roomID id.RoomID, message string) error

SendMessage provides a mock function with given fields: roomID, message

func (*MatrixBot) SendWebhook

func (_m *MatrixBot) SendWebhook(avatar string, name string, format string, text string, url string) error

SendWebhook provides a mock function with given fields: avatar, name, format, text, url

func (*MatrixBot) Start

func (_m *MatrixBot) Start(displayName string)

Start provides a mock function with given fields: displayName

func (*MatrixBot) Stop

func (_m *MatrixBot) Stop()

Stop provides a mock function with given fields:

type MatrixClient

type MatrixClient struct {
	mock.Mock
}

MatrixClient is an autogenerated mock type for the MatrixClient type

func (*MatrixClient) GetOwnDisplayName

func (_m *MatrixClient) GetOwnDisplayName() (*mautrix.RespUserDisplayName, error)

GetOwnDisplayName provides a mock function with given fields:

func (*MatrixClient) JoinRoomByID

func (_m *MatrixClient) JoinRoomByID(_a0 id.RoomID) (*mautrix.RespJoinRoom, error)

JoinRoomByID provides a mock function with given fields: _a0

func (*MatrixClient) LeaveRoom

func (_m *MatrixClient) LeaveRoom(_a0 id.RoomID) (*mautrix.RespLeaveRoom, error)

LeaveRoom provides a mock function with given fields: _a0

func (*MatrixClient) Logout

func (_m *MatrixClient) Logout() (*mautrix.RespLogout, error)

Logout provides a mock function with given fields:

func (*MatrixClient) SendMessageEvent

func (_m *MatrixClient) SendMessageEvent(_a0 id.RoomID, _a1 event.Type, _a2 interface{}, _a3 ...mautrix.ReqSendEvent) (*mautrix.RespSendEvent, error)

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

func (*MatrixClient) SetDisplayName

func (_m *MatrixClient) SetDisplayName(_a0 string) error

SetDisplayName provides a mock function with given fields: _a0

func (*MatrixClient) SetPresence

func (_m *MatrixClient) SetPresence(_a0 event.Presence) error

SetPresence provides a mock function with given fields: _a0

func (*MatrixClient) Sync

func (_m *MatrixClient) Sync() error

Sync provides a mock function with given fields:

func (*MatrixClient) Whoami

func (_m *MatrixClient) Whoami() (*mautrix.RespWhoami, error)

Whoami provides a mock function with given fields:

type MatrixCryptoStore

type MatrixCryptoStore struct {
	mock.Mock
}

MatrixCryptoStore is an autogenerated mock type for the MatrixCryptoStore type

func (*MatrixCryptoStore) AddOutboundGroupSession

func (_m *MatrixCryptoStore) AddOutboundGroupSession(_a0 *crypto.OutboundGroupSession) error

AddOutboundGroupSession provides a mock function with given fields: _a0

func (*MatrixCryptoStore) AddSession

func (_m *MatrixCryptoStore) AddSession(_a0 id.Curve25519, _a1 *crypto.OlmSession) error

AddSession provides a mock function with given fields: _a0, _a1

func (*MatrixCryptoStore) DropSignaturesByKey

func (_m *MatrixCryptoStore) DropSignaturesByKey(_a0 id.UserID, _a1 id.Ed25519) (int64, error)

DropSignaturesByKey provides a mock function with given fields: _a0, _a1

func (*MatrixCryptoStore) FilterTrackedUsers

func (_m *MatrixCryptoStore) FilterTrackedUsers(_a0 []id.UserID) []id.UserID

FilterTrackedUsers provides a mock function with given fields: _a0

func (*MatrixCryptoStore) Flush

func (_m *MatrixCryptoStore) Flush() error

Flush provides a mock function with given fields:

func (*MatrixCryptoStore) GetAccount

func (_m *MatrixCryptoStore) GetAccount() (*crypto.OlmAccount, error)

GetAccount provides a mock function with given fields:

func (*MatrixCryptoStore) GetAllGroupSessions

func (_m *MatrixCryptoStore) GetAllGroupSessions() ([]*crypto.InboundGroupSession, error)

GetAllGroupSessions provides a mock function with given fields:

func (*MatrixCryptoStore) GetCrossSigningKeys

func (_m *MatrixCryptoStore) GetCrossSigningKeys(_a0 id.UserID) (map[id.CrossSigningUsage]id.Ed25519, error)

GetCrossSigningKeys provides a mock function with given fields: _a0

func (*MatrixCryptoStore) GetDevice

func (_m *MatrixCryptoStore) GetDevice(_a0 id.UserID, _a1 id.DeviceID) (*crypto.DeviceIdentity, error)

GetDevice provides a mock function with given fields: _a0, _a1

func (*MatrixCryptoStore) GetDevices

func (_m *MatrixCryptoStore) GetDevices(_a0 id.UserID) (map[id.DeviceID]*crypto.DeviceIdentity, error)

GetDevices provides a mock function with given fields: _a0

func (*MatrixCryptoStore) GetGroupSession

func (_m *MatrixCryptoStore) GetGroupSession(_a0 id.RoomID, _a1 id.Curve25519, _a2 id.SessionID) (*crypto.InboundGroupSession, error)

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

func (*MatrixCryptoStore) GetGroupSessionsForRoom

func (_m *MatrixCryptoStore) GetGroupSessionsForRoom(_a0 id.RoomID) ([]*crypto.InboundGroupSession, error)

GetGroupSessionsForRoom provides a mock function with given fields: _a0

func (*MatrixCryptoStore) GetLatestSession

func (_m *MatrixCryptoStore) GetLatestSession(_a0 id.Curve25519) (*crypto.OlmSession, error)

GetLatestSession provides a mock function with given fields: _a0

func (*MatrixCryptoStore) GetOutboundGroupSession

func (_m *MatrixCryptoStore) GetOutboundGroupSession(_a0 id.RoomID) (*crypto.OutboundGroupSession, error)

GetOutboundGroupSession provides a mock function with given fields: _a0

func (*MatrixCryptoStore) GetSessions

func (_m *MatrixCryptoStore) GetSessions(_a0 id.Curve25519) (crypto.OlmSessionList, error)

GetSessions provides a mock function with given fields: _a0

func (*MatrixCryptoStore) GetSignaturesForKeyBy

func (_m *MatrixCryptoStore) GetSignaturesForKeyBy(_a0 id.UserID, _a1 id.Ed25519, _a2 id.UserID) (map[id.Ed25519]string, error)

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

func (*MatrixCryptoStore) GetWithheldGroupSession

func (_m *MatrixCryptoStore) GetWithheldGroupSession(_a0 id.RoomID, _a1 id.Curve25519, _a2 id.SessionID) (*event.RoomKeyWithheldEventContent, error)

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

func (*MatrixCryptoStore) HasSession

func (_m *MatrixCryptoStore) HasSession(_a0 id.Curve25519) bool

HasSession provides a mock function with given fields: _a0

func (*MatrixCryptoStore) IsKeySignedBy

func (_m *MatrixCryptoStore) IsKeySignedBy(_a0 id.UserID, _a1 id.Ed25519, _a2 id.UserID, _a3 id.Ed25519) (bool, error)

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

func (*MatrixCryptoStore) PutAccount

func (_m *MatrixCryptoStore) PutAccount(_a0 *crypto.OlmAccount) error

PutAccount provides a mock function with given fields: _a0

func (*MatrixCryptoStore) PutCrossSigningKey

func (_m *MatrixCryptoStore) PutCrossSigningKey(_a0 id.UserID, _a1 id.CrossSigningUsage, _a2 id.Ed25519) error

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

func (*MatrixCryptoStore) PutDevice

func (_m *MatrixCryptoStore) PutDevice(_a0 id.UserID, _a1 *crypto.DeviceIdentity) error

PutDevice provides a mock function with given fields: _a0, _a1

func (*MatrixCryptoStore) PutDevices

func (_m *MatrixCryptoStore) PutDevices(_a0 id.UserID, _a1 map[id.DeviceID]*crypto.DeviceIdentity) error

PutDevices provides a mock function with given fields: _a0, _a1

func (*MatrixCryptoStore) PutGroupSession

func (_m *MatrixCryptoStore) PutGroupSession(_a0 id.RoomID, _a1 id.Curve25519, _a2 id.SessionID, _a3 *crypto.InboundGroupSession) error

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

func (*MatrixCryptoStore) PutSignature

func (_m *MatrixCryptoStore) PutSignature(_a0 id.UserID, _a1 id.Ed25519, _a2 id.UserID, _a3 id.Ed25519, _a4 string) error

PutSignature provides a mock function with given fields: _a0, _a1, _a2, _a3, _a4

func (*MatrixCryptoStore) PutWithheldGroupSession

func (_m *MatrixCryptoStore) PutWithheldGroupSession(_a0 event.RoomKeyWithheldEventContent) error

PutWithheldGroupSession provides a mock function with given fields: _a0

func (*MatrixCryptoStore) RemoveOutboundGroupSession

func (_m *MatrixCryptoStore) RemoveOutboundGroupSession(_a0 id.RoomID) error

RemoveOutboundGroupSession provides a mock function with given fields: _a0

func (*MatrixCryptoStore) UpdateOutboundGroupSession

func (_m *MatrixCryptoStore) UpdateOutboundGroupSession(_a0 *crypto.OutboundGroupSession) error

UpdateOutboundGroupSession provides a mock function with given fields: _a0

func (*MatrixCryptoStore) UpdateSession

func (_m *MatrixCryptoStore) UpdateSession(_a0 id.Curve25519, _a1 *crypto.OlmSession) error

UpdateSession provides a mock function with given fields: _a0, _a1

func (*MatrixCryptoStore) ValidateMessageIndex

func (_m *MatrixCryptoStore) ValidateMessageIndex(senderKey id.Curve25519, sessionID id.SessionID, eventID id.EventID, index uint, timestamp int64) bool

ValidateMessageIndex provides a mock function with given fields: senderKey, sessionID, eventID, index, timestamp

type MatrixLogger

type MatrixLogger struct {
	mock.Mock
}

MatrixLogger is an autogenerated mock type for the MatrixLogger type

func (*MatrixLogger) Debug

func (_m *MatrixLogger) Debug(message string, args ...interface{})

Debug provides a mock function with given fields: message, args

func (*MatrixLogger) Error

func (_m *MatrixLogger) Error(message string, args ...interface{})

Error provides a mock function with given fields: message, args

func (*MatrixLogger) GetLog

func (_m *MatrixLogger) GetLog() *log.Logger

GetLog provides a mock function with given fields:

func (*MatrixLogger) Info

func (_m *MatrixLogger) Info(message string, args ...interface{})

Info provides a mock function with given fields: message, args

func (*MatrixLogger) Trace

func (_m *MatrixLogger) Trace(message string, args ...interface{})

Trace provides a mock function with given fields: message, args

func (*MatrixLogger) Warn

func (_m *MatrixLogger) Warn(message string, args ...interface{})

Warn provides a mock function with given fields: message, args

type MatrixOlmMachine

type MatrixOlmMachine struct {
	mock.Mock
}

MatrixOlmMachine is an autogenerated mock type for the MatrixOlmMachine type

func (*MatrixOlmMachine) DecryptMegolmEvent

func (_m *MatrixOlmMachine) DecryptMegolmEvent(_a0 *event.Event) (*event.Event, error)

DecryptMegolmEvent provides a mock function with given fields: _a0

func (*MatrixOlmMachine) EncryptMegolmEvent

func (_m *MatrixOlmMachine) EncryptMegolmEvent(_a0 id.RoomID, _a1 event.Type, _a2 interface{}) (*event.EncryptedEventContent, error)

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

func (*MatrixOlmMachine) FlushStore

func (_m *MatrixOlmMachine) FlushStore() error

FlushStore provides a mock function with given fields:

func (*MatrixOlmMachine) HandleMemberEvent

func (_m *MatrixOlmMachine) HandleMemberEvent(_a0 *event.Event)

HandleMemberEvent provides a mock function with given fields: _a0

func (*MatrixOlmMachine) ProcessSyncResponse

func (_m *MatrixOlmMachine) ProcessSyncResponse(_a0 *mautrix.RespSync, _a1 string) bool

ProcessSyncResponse provides a mock function with given fields: _a0, _a1

func (*MatrixOlmMachine) ShareGroupSession

func (_m *MatrixOlmMachine) ShareGroupSession(_a0 id.RoomID, _a1 []id.UserID) error

ShareGroupSession provides a mock function with given fields: _a0, _a1

type MatrixRegistrationClient

type MatrixRegistrationClient struct {
	mock.Mock
}

MatrixRegistrationClient is an autogenerated mock type for the MatrixRegistrationClient type

func (*MatrixRegistrationClient) CreateToken

func (_m *MatrixRegistrationClient) CreateToken(_a0 string, _a1 string) (*models.RegistrationToken, error)

CreateToken provides a mock function with given fields: _a0, _a1

func (*MatrixRegistrationClient) DisableToken

func (_m *MatrixRegistrationClient) DisableToken(_a0 string) (*models.RegistrationToken, error)

DisableToken provides a mock function with given fields: _a0

func (*MatrixRegistrationClient) GetList

GetList provides a mock function with given fields:

func (*MatrixRegistrationClient) GetRoomID

func (_m *MatrixRegistrationClient) GetRoomID() id.RoomID

GetRoomID provides a mock function with given fields:

func (*MatrixRegistrationClient) GetStatus

GetStatus provides a mock function with given fields: _a0

type MatrixStore

type MatrixStore struct {
	mock.Mock
}

MatrixStore is an autogenerated mock type for the MatrixStore type

func (*MatrixStore) FindSharedRooms

func (_m *MatrixStore) FindSharedRooms(_a0 id.UserID) []id.RoomID

FindSharedRooms provides a mock function with given fields: _a0

func (*MatrixStore) GetEncryptionEvent

func (_m *MatrixStore) GetEncryptionEvent(_a0 id.RoomID) *event.EncryptionEventContent

GetEncryptionEvent provides a mock function with given fields: _a0

func (*MatrixStore) GetRoomMembers

func (_m *MatrixStore) GetRoomMembers(_a0 id.RoomID) []id.UserID

GetRoomMembers provides a mock function with given fields: _a0

func (*MatrixStore) IsEncrypted

func (_m *MatrixStore) IsEncrypted(_a0 id.RoomID) bool

IsEncrypted provides a mock function with given fields: _a0

func (*MatrixStore) LoadFilterID

func (_m *MatrixStore) LoadFilterID(userID id.UserID) string

LoadFilterID provides a mock function with given fields: userID

func (*MatrixStore) LoadNextBatch

func (_m *MatrixStore) LoadNextBatch(userID id.UserID) string

LoadNextBatch provides a mock function with given fields: userID

func (*MatrixStore) LoadRoom

func (_m *MatrixStore) LoadRoom(roomID id.RoomID) *mautrix.Room

LoadRoom provides a mock function with given fields: roomID

func (*MatrixStore) SaveFilterID

func (_m *MatrixStore) SaveFilterID(userID id.UserID, filterID string)

SaveFilterID provides a mock function with given fields: userID, filterID

func (*MatrixStore) SaveNextBatch

func (_m *MatrixStore) SaveNextBatch(userID id.UserID, nextBatchToken string)

SaveNextBatch provides a mock function with given fields: userID, nextBatchToken

func (*MatrixStore) SaveRoom

func (_m *MatrixStore) SaveRoom(room *mautrix.Room)

SaveRoom provides a mock function with given fields: room

func (*MatrixStore) SetEncryptionEvent

func (_m *MatrixStore) SetEncryptionEvent(_a0 *event.Event)

SetEncryptionEvent provides a mock function with given fields: _a0

func (*MatrixStore) SetMembership

func (_m *MatrixStore) SetMembership(_a0 *event.Event)

SetMembership provides a mock function with given fields: _a0

type MatrixSyncer

type MatrixSyncer struct {
	mock.Mock
}

MatrixSyncer is an autogenerated mock type for the MatrixSyncer type

func (*MatrixSyncer) OnEvent

func (_m *MatrixSyncer) OnEvent(callback mautrix.EventHandler)

OnEvent provides a mock function with given fields: callback

func (*MatrixSyncer) OnEventType

func (_m *MatrixSyncer) OnEventType(eventType event.Type, callback mautrix.EventHandler)

OnEventType provides a mock function with given fields: eventType, callback

func (*MatrixSyncer) OnSync

func (_m *MatrixSyncer) OnSync(callback mautrix.SyncHandler)

OnSync provides a mock function with given fields: callback

Jump to

Keyboard shortcuts

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