kafkaapi

package
v0.0.0-...-4c7982d Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBEntry

type DBEntry struct {
	ID               string
	Data             string
	FileName         string
	JobType          string
	NumberOfSpeakers string
	RecordQuality    string
}

DBEntry keeps structure for AudioGetResponse

type DBResultEntry

type DBResultEntry struct {
	ID            string
	Error         *DBTranscriptionError
	Transcription DBTranscriptionResult
}

DBResultEntry keeps structure for TranscriptionPostRequest

func AddDBResultError

func AddDBResultError(data *DBResultEntry, code, err string) *DBResultEntry

AddDBResultError adds error to object

type DBTranscriptionError

type DBTranscriptionError struct {
	Code  string
	Error string
}

DBTranscriptionError keeps structure for TranscriptionError

type DBTranscriptionResult

type DBTranscriptionResult struct {
	Text        string
	LatticeData string
	WebVTT      string
}

DBTranscriptionResult keeps structure for Result

type KafkaTrMap

type KafkaTrMap struct {
	TrID    string
	KafkaID string
}

KafkaTrMap maps kafkas and transcription ids

type Msg

type Msg struct {
	ID      string
	RealMsg *kafka.Message
}

Msg wrapped msg to be returned by kafka

type ResponseMsg

type ResponseMsg struct {
	ID    string
	Error TranscriptionError
}

ResponseMsg wrapped msg to be writen to kafkas AudioTextReadyEvent

type Result

type Result struct {
	ID          string
	LatticeData string
	WebVTTData  string
}

Result keeps structure for transcription result

type Status

type Status struct {
	ID        string
	Text      string
	Completed bool
	ErrorCode string
	Error     string
}

Status keeps structure for transcription status

type TranscriptionError

type TranscriptionError struct {
	Code         string
	DebugMessage string
}

TranscriptionError keeps error structure to put into kafkas event

type UploadData

type UploadData struct {
	ExternalID       string
	AudioData        string
	FileName         string
	JobType          string
	NumberOfSpeakers string
	RecordQuality    string
}

UploadData keeps structure for upload method

Jump to

Keyboard shortcuts

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