mocks

package
v0.0.0-...-8f43f39 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDbMock

func GetDbMock() (*gorm.DB, sqlmock.Sqlmock)

Types

type ChatServiceMock

type ChatServiceMock struct {
}

func (*ChatServiceMock) Broadcast

func (s *ChatServiceMock) Broadcast(*chats.ClientMessage)

func (*ChatServiceMock) Register

func (s *ChatServiceMock) Register(*chats.Client)

func (*ChatServiceMock) Run

func (s *ChatServiceMock) Run()

func (*ChatServiceMock) ServeWs

func (s *ChatServiceMock) ServeWs(c *gin.Context)

func (*ChatServiceMock) Unregister

func (s *ChatServiceMock) Unregister(*chats.Client)

type EsClientMock

type EsClientMock struct {
	IndexCallback func() (*elastic.IndexResponse, error)
}

func (*EsClientMock) DeleteByQuery

func (c *EsClientMock) DeleteByQuery(string, elastic.Query) error

func (*EsClientMock) GetById

func (c *EsClientMock) GetById(string, string) (*elastic.GetResult, error)

func (*EsClientMock) IndexData

func (*EsClientMock) Search

func (*EsClientMock) SetClient

func (c *EsClientMock) SetClient(client *elastic.Client)

type FaqServiceMock

type FaqServiceMock struct {
	FaqErrCallback func() (*faqs.Faq, api_errors.ApiError)
	ErrCallback    func() api_errors.ApiError
	FaqsCallback   func() *faqs.CreateFaqsResponse
}

func (*FaqServiceMock) CreateFaq

func (s *FaqServiceMock) CreateFaq(input *faqs.FaqCreateInput) (*faqs.Faq, api_errors.ApiError)

func (*FaqServiceMock) CreateFaqs

func (s *FaqServiceMock) CreateFaqs(requests []faqs.FaqCreateInput) *faqs.CreateFaqsResponse

func (*FaqServiceMock) DeleteFaq

func (s *FaqServiceMock) DeleteFaq(int64) api_errors.ApiError

func (*FaqServiceMock) GetFaq

func (*FaqServiceMock) InitializeDemoFaqs

func (s *FaqServiceMock) InitializeDemoFaqs()

func (*FaqServiceMock) SearchFaq

func (*FaqServiceMock) UpdateFaq

func (s *FaqServiceMock) UpdateFaq(id int64, input *faqs.FaqUpdateInput) (*faqs.Faq, api_errors.ApiError)

Jump to

Keyboard shortcuts

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