mocks

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func To

func To[T interface{}](val interface{}) T

To convert interface to object

Types

type DB

type DB struct{ mock.Mock }

DB is postgress DB mock

func (*DB) DeleteWorkData

func (m *DB) DeleteWorkData(ctx context.Context, id string) error

func (*DB) InsertRequest

func (m *DB) InsertRequest(ctx context.Context, req *persistence.ReqData) error

LoadFile func mock

func (*DB) InsertStatus

func (m *DB) InsertStatus(ctx context.Context, req *persistence.Status) error

LoadFile func mock

func (*DB) InsertWorkData

func (m *DB) InsertWorkData(ctx context.Context, data *persistence.WorkData) error

func (*DB) LoadRequest

func (m *DB) LoadRequest(ctx context.Context, id string) (*persistence.ReqData, error)

func (*DB) LoadStatus

func (m *DB) LoadStatus(ctx context.Context, id string) (*persistence.Status, error)

func (*DB) LoadWorkData

func (m *DB) LoadWorkData(ctx context.Context, id string) (*persistence.WorkData, error)

func (*DB) LockEmailTable

func (m *DB) LockEmailTable(ctx context.Context, id, lType string) error

func (*DB) UnLockEmailTable

func (m *DB) UnLockEmailTable(ctx context.Context, id, lType string, val int) error

func (*DB) UpdateStatus

func (m *DB) UpdateStatus(ctx context.Context, data *persistence.Status) error

func (*DB) UpdateWorkData

func (m *DB) UpdateWorkData(ctx context.Context, data *persistence.WorkData) error

type Filer

type Filer struct{ mock.Mock }

Filer is minio mock

func (*Filer) LoadFile

func (m *Filer) LoadFile(ctx context.Context, fileName string) (io.ReadSeekCloser, error)

LoadFile func mock

func (*Filer) SaveFile

func (m *Filer) SaveFile(ctx context.Context, name string, r io.Reader, fileSize int64) error

type Sender

type Sender struct{ mock.Mock }

Sender is postgres queue mock

func (*Sender) SendMessage

func (m *Sender) SendMessage(ctx context.Context, msg amessages.Message, opt *messages.Options) error

type Transcriber

type Transcriber struct{ mock.Mock }

Transcriber is transcription client mock

func (*Transcriber) Clean

func (m *Transcriber) Clean(ctx context.Context, ID string) error

func (*Transcriber) GetAudio

func (m *Transcriber) GetAudio(ctx context.Context, ID string) (*api.FileData, error)

func (*Transcriber) GetResult

func (m *Transcriber) GetResult(ctx context.Context, ID, name string) (*api.FileData, error)

func (*Transcriber) GetStatus

func (m *Transcriber) GetStatus(ctx context.Context, ID string) (*api.StatusData, error)

func (*Transcriber) HookToStatus

func (m *Transcriber) HookToStatus(ctx context.Context, ID string) (<-chan api.StatusData, func(), error)

func (*Transcriber) Upload

func (m *Transcriber) Upload(ctx context.Context, audioFunc func(context.Context) (*api.UploadData, func(), error)) (string, error)

type TranscriberProvider

type TranscriberProvider struct{ mock.Mock }

TranscriberProvider is a provider mock

func (*TranscriberProvider) Get

func (m *TranscriberProvider) Get(key string, allowNew bool) (api.Transcriber, string, error)

Jump to

Keyboard shortcuts

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