interfaces

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 2 Imported by: 6

Documentation

Overview

This package provides the types for the Deepgram Manage API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIKey

type APIKey struct {
	APIKeyID string   `json:"api_key_id,omitempty"`
	Key      string   `json:"key,omitempty"`
	Comment  string   `json:"comment,omitempty"`
	Scopes   []string `json:"scopes,omitempty"`
	Created  string   `json:"created,omitempty"`
}

Key provides a key

type APIKeyPermission

type APIKeyPermission struct {
	Member Member `json:"member,omitempty"`
	APIKey APIKey `json:"api_key,omitempty"`
}

APIKeyPermission Provides a user and key pairing

type APIKeysList

type APIKeysList struct {
	APIKeys []APIKeyPermission `json:"api_keys,omitempty"`
}

KeyList provides a list of keys

type Balance

type Balance struct {
	BalanceID       string  `json:"balance_id,omitempty"`
	Amount          float64 `json:"amount,omitempty"`
	Units           string  `json:"units,omitempty"`
	PurchaseOrderID string  `json:"purchase_order_id,omitempty"`
}

********************************* shared/common structs ********************************* Balance provides a balance

type BalanceList

type BalanceList struct {
	Balances []Balance `json:"balances,omitempty"`
}

BalanceList provides a list of balances

type BalanceResult

type BalanceResult struct {
	Balance
}

BalanceResult provides a result with a single balance

type BalancesResult

type BalancesResult struct {
	BalanceList
}

BalanceResult provides a result with a list of balances

type Callback added in v1.1.0

type Callback struct {
	Attempts  int    `json:"attempts,omitempty"`
	Code      int    `json:"code,omitempty"`
	Completed string `json:"completed,omitempty"`
}

type Config

type Config struct {
	Language       string  `json:"language,omitempty"`
	Model          string  `json:"model,omitempty"`
	Punctuate      *bool   `json:"punctuate,omitempty"`
	Utterances     *bool   `json:"utterances,omitempty"`
	Diarize        *bool   `json:"diarize,omitempty"`
	SmartFormat    *bool   `json:"smart_format,omitempty"`
	InterimResults *bool   `json:"interim_results,omitempty"`
	Topics         *string `json:"topics,omitempty"`
	Intents        *string `json:"intents,omitempty"`
	Sentiment      *bool   `json:"sentiment,omitempty"`
	Summarize      *string `json:"summarize,omitempty"`
}

Config provides a config

type Details

type Details struct {
	Usd        float64  `json:"usd,omitempty"`
	Duration   float64  `json:"duration,omitempty"`
	TotalAudio float64  `json:"total_audio,omitempty"`
	Channels   int      `json:"channels,omitempty"`
	Streams    int      `json:"streams,omitempty"`
	Models     []string `json:"models,omitempty"`
	Method     string   `json:"method,omitempty"`
	Tier       string   `json:"tier,omitempty"`
	Tags       []string `json:"tags,omitempty"`
	Features   []string `json:"features,omitempty"`
	Config     Config   `json:"config,omitempty"`
}

Details provides details

type ErrorResponse added in v1.3.0

type ErrorResponse interfaces.DeepgramError

ErrorResponse is the Deepgram specific response error

type InvitationRequest

type InvitationRequest struct {
	Email string `json:"email,omitempty" url:"email,omitempty"`
	Scope string `json:"scope,omitempty" url:"scope,omitempty"`
}

InvitationRequest provides an invitation request

type InvitationsResult

type InvitationsResult struct {
	InvitesList
}

InvitationResult provides a result with a single invitation

type Invite

type Invite struct {
	Email string `json:"email,omitempty"`
	Scope string `json:"scope,omitempty"`
}

Invitation provides an invitation

type InvitesList

type InvitesList struct {
	Invites []Invite `json:"invites,omitempty"`
}

InvitationList provides a list of invitations

type KeyCreateRequest

type KeyCreateRequest struct {
	Comment        string    `json:"comment,omitempty" url:"comment,omitempty"`
	Scopes         []string  `json:"scopes,omitempty" url:"scopes,omitempty"`
	ExpirationDate time.Time `json:"expiration_date,omitempty" url:"expiration_date,omitempty"`
	TimeToLive     int       `json:"time_to_live_in_seconds,omitempty" url:"time_to_live_in_seconds,omitempty"`
	Tags           []string  `json:"tags,omitempty" url:"tags,omitempty"`
}

KeyCreateRequest provides a key create request

type KeyResult

type KeyResult struct {
	APIKeyPermission
}

KeyResult provides a result with a single key

type KeysResult

type KeysResult struct {
	APIKeysList
}

InvitationResult provides a result with a single invitation

type Member

type Member struct {
	MemberID  string   `json:"member_id,omitempty"`
	Email     string   `json:"email,omitempty"`
	FirstName string   `json:"first_name,omitempty"`
	LastName  string   `json:"last_name,omitempty"`
	Scopes    []string `json:"scopes,omitempty"`
}

Member provides a member

type MemberList

type MemberList struct {
	Members []Member `json:"members,omitempty"`
}

MemberList provides a list of members

type MembersResult

type MembersResult struct {
	MemberList
}

MembersResult provides a result with a list of members

type MessageResult

type MessageResult struct {
	Message string `json:"message"`
}

********************************* Result/Output structs ********************************* BookmarksResult provides a generic message results

type Model

type Model struct {
	Name     string `json:"name,omitempty"`
	Language string `json:"language,omitempty"`
	Version  string `json:"version,omitempty"`
	ModelID  string `json:"model_id,omitempty"`
}

Model provides a list of models

type Project

type Project struct {
	ProjectID string `json:"project_id,omitempty"`
	Name      string `json:"name,omitempty"`
	Company   string `json:"company,omitempty"`
}

Project provides a project

type ProjectList

type ProjectList struct {
	Projects []Project `json:"projects,omitempty"`
}

ProjectList provides a list of projects

type ProjectResult

type ProjectResult struct {
	Project
}

ProjectResult provides a result with a single project

type ProjectUpdateRequest

type ProjectUpdateRequest struct {
	Name    string `json:"name,omitempty" url:"name,omitempty"`
	Company string `json:"company,omitempty" url:"company,omitempty"`
}

********************************* Request/Input structs ********************************* ProjectUpdateRequest provides a project update

type ProjectsResult

type ProjectsResult struct {
	ProjectList
}

ProjectsResult provides a result with a list of projects

type Request

type Request struct {
	RequestID   string   `json:"request_id,omitempty"`
	ProjectUUID string   `json:"project_uuid,omitempty"`
	Created     string   `json:"created,omitempty"`
	Path        string   `json:"path,omitempty"`
	Accessor    string   `json:"accessor,omitempty"`
	APIKeyID    string   `json:"api_key_id,omitempty"`
	Response    Response `json:"response,omitempty"`
	Callback    Callback `json:"callback,omitempty"`
}

Request provides a request

type RequestList

type RequestList struct {
	Page     int       `json:"page,omitempty"`
	Limit    int       `json:"limit,omitempty"`
	Requests []Request `json:"requests,omitempty"`
}

RequestList provides a list of requests

type Resolution

type Resolution struct {
	Units  string `json:"units,omitempty"`
	Amount int    `json:"amount,omitempty"`
}

Resolution provides a resolution

type Response

type Response struct {
	Details      Details        `json:"details,omitempty"`
	Code         int            `json:"code,omitempty"`
	Completed    string         `json:"completed,omitempty"`
	TTSDetails   *TTSDetails    `json:"tts_details,omitempty"`
	TokenDetails []TokenDetails `json:"token_details,omitempty"`
}

Response provides a response

type Result

type Result struct {
	Start      string  `json:"start,omitempty"`
	End        string  `json:"end,omitempty"`
	Hours      float64 `json:"hours,omitempty"`
	TotalHours float64 `json:"total_hours,omitempty"`
	Requests   int     `json:"requests,omitempty"`
	Tokens     Token   `json:"tokens,omitempty"`
	TTS        TTS     `json:"tts,omitempty"`
}

Result provides a list of results

type ScopeList

type ScopeList struct {
	Scopes []string `json:"scopes,omitempty"`
}

ScopeList provides a list of scopes

type ScopeResult

type ScopeResult struct {
	ScopeList
}

type ScopeUpdateRequest

type ScopeUpdateRequest struct {
	Scope string `json:"scope,omitempty" url:"scope,omitempty"`
}

ScopeUpdateRequest provides a scope update request

type SpeechSegment added in v1.2.0

type SpeechSegment struct {
	Characters int    `json:"characters,omitempty"`
	Model      string `json:"model,omitempty"`
	Tier       string `json:"tier,omitempty"`
}

SpeechSegment provides a speech segment

type TTS added in v1.2.0

type TTS struct {
	Characters int `json:"characters,omitempty"`
	Requests   int `json:"requests,omitempty"`
}

TTS provides a TTS

type TTSDetails added in v1.2.0

type TTSDetails struct {
	Duration       float64         `json:"duration,omitempty"`
	SpeechSegments []SpeechSegment `json:"speech_segments,omitempty"`
}

TTSDetails provides token details

type Token added in v1.1.0

type Token struct {
	In  int `json:"in,omitempty"`
	Out int `json:"out,omitempty"`
}

Token provides a token

type TokenDetails added in v1.1.0

type TokenDetails struct {
	Feature string `json:"feature,omitempty"`
	Input   int    `json:"input,omitempty"`
	Output  int    `json:"output,omitempty"`
	Model   string `json:"model,omitempty"`
}

TokenDetails provides token details

type Usage

type Usage struct {
	Start      string     `json:"start,omitempty"`
	End        string     `json:"end,omitempty"`
	Resolution Resolution `json:"resolution,omitempty"`
	Results    []Result   `json:"results,omitempty"`
}

Usage provides a usage

type UsageField

type UsageField struct {
	Tags              []string `json:"tags,omitempty"`
	Models            []Model  `json:"models,omitempty"`
	ProcessingMethods []string `json:"processing_methods,omitempty"`
	Features          []string `json:"features,omitempty"`
	Languages         []string `json:"languages,omitempty"`
}

UsageField provides a usage field

type UsageFieldResult

type UsageFieldResult struct {
	UsageField
}

UsageFieldResult provides a result with a list of fields

type UsageListRequest

type UsageListRequest struct {
	Start  string `json:"start,omitempty" url:"start,omitempty"`
	End    string `json:"end,omitempty" url:"end,omitempty"`
	Page   int    `json:"page,omitempty" url:"page,omitempty"`
	Limit  int    `json:"limit,omitempty" url:"limit,omitempty"`
	Status string `json:"status,omitempty" url:"status,omitempty"`
}

UsageListRequest provides a usage request

type UsageListResult

type UsageListResult struct {
	RequestList
}

UsageResult provides a result with a list of usage

type UsageRequest

type UsageRequest struct {
	Accessor           string   `json:"accessor,omitempty" url:"accessor,omitempty"`
	Alternatives       bool     `json:"alternatives,omitempty" url:"alternatives,omitempty"`
	AnalyzeSentiment   bool     `json:"analyze_sentiment,omitempty" url:"analyze_sentiment,omitempty"`
	DetectEntities     bool     `json:"detect_entities,omitempty" url:"detect_entities,omitempty"`
	DetectLanguage     bool     `json:"detect_language,omitempty" url:"detect_language,omitempty"`
	DetectTopics       bool     `json:"detect_topics,omitempty" url:"detect_topics,omitempty"`
	Diarize            bool     `json:"diarize,omitempty" url:"diarize,omitempty"`
	End                string   `json:"end,omitempty" url:"end,omitempty"`
	InterimResults     bool     `json:"interim_results,omitempty" url:"interim_results,omitempty"`
	Keywords           bool     `json:"keywords,omitempty" url:"keywords,omitempty"`
	Method             string   `json:"method,omitempty" url:"method,omitempty"` // Must be one of "sync" | "async" | "streaming"
	Model              string   `json:"model,omitempty" url:"model,omitempty"`
	Multichannel       bool     `json:"multichannel,omitempty" url:"multichannel,omitempty"`
	Ner                bool     `json:"ner,omitempty" url:"ner,omitempty"`
	Numbers            bool     `json:"numbers,omitempty" url:"numbers,omitempty"`
	Numerals           bool     `json:"numerals,omitempty" url:"numerals,omitempty"`
	Paragraphs         bool     `json:"paragraphs,omitempty" url:"paragraphs,omitempty"`
	ProfanityFilter    bool     `json:"profanity_filter,omitempty" url:"profanity_filter,omitempty"`
	Punctuate          bool     `json:"punctuate,omitempty" url:"punctuate,omitempty"`
	Redact             bool     `json:"redact,omitempty" url:"redact,omitempty"`
	Replace            bool     `json:"replace,omitempty" url:"replace,omitempty"`
	Search             bool     `json:"search,omitempty" url:"search,omitempty"`
	Sentiment          bool     `json:"sentiment,omitempty" url:"sentiment,omitempty"`
	SentimentThreshold float64  `json:"sentiment_threshold,omitempty" url:"sentiment_threshold,omitempty"`
	SmartFormat        bool     `json:"smart_format,omitempty" url:"smart_format,omitempty"`
	Start              string   `json:"start,omitempty" url:"start,omitempty"`
	Summarize          bool     `json:"summarize,omitempty" url:"summarize,omitempty"`
	Tag                []string `json:"tag,omitempty" url:"tag,omitempty"`
	Translate          bool     `json:"translate,omitempty" url:"translate,omitempty"`
	Utterances         bool     `json:"utterances,omitempty" url:"utterances,omitempty"`
	UttSplit           bool     `json:"utt_split,omitempty" url:"utt_split,omitempty"`
}

UsageRequest provides a usage request

type UsageRequestResult

type UsageRequestResult struct {
	Request
}

UsageRequestResult provides a result with a single usage request

type UsageResult

type UsageResult struct {
	Usage
}

UsageSummary provides a result with a list of usage

Jump to

Keyboard shortcuts

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