common

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 4 Imported by: 5

Documentation

Overview

This package contains the initialization code for the Deepgram Go SDK

Index

Constants

View Source
const (
	LogLevelDefault   LogLevel = iota
	LogLevelErrorOnly          = 1
	LogLevelStandard           = 2
	LogLevelElevated           = 3
	LogLevelFull               = 4
	LogLevelDebug              = 5
	LogLevelTrace              = 6
	LogLevelVerbose            = 7
)

The verbosity of the logging to the console or logfile. Default is LogLevelStandard LogLevelFull contains INFO related messages that could be helpful in debugging (recommended and default) LogLevelTrace is very detailed function enter, highly verbose statements, function exit LogLevelVerbose contains data movement on top of LogLevelTrace. This is extremely chatty.

View Source
const (
	// default host
	DefaultHost string = "api.deepgram.com"
)

Variables

This section is empty.

Functions

func Init

func Init(init InitLib)

The SDK Init function for this library. Allows you to set the logging level and use of a log file. Default is output to the stdout.

func InitWithDefault

func InitWithDefault()

InitWithDefault is the SDK Init function for this library using default values.

Types

type Config added in v1.0.4

type Config interface {
	// Parse the config and setup
	Parse() error

	// Getters
	GetHost() string
	GetApiKey() string
	GetApiVersion() string
	GetPath() string
	GetOnPrem() bool

	// prerecorded/manage client options
	GetSkipServerAuth() bool

	// live client options
	GetRedirectService() bool
	GetEnableKeepAlive() bool
}

type InitLib

type InitLib struct {
	LogLevel      LogLevel
	DebugFilePath string
}

InitLib Initialization options for this SDK.

type LogLevel

type LogLevel int64

LogLevel expressed as an int64

Jump to

Keyboard shortcuts

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