version

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

This package handles the versioning in the API for the various clients (prerecorded, live, etc.)

Index

Constants

View Source
const (
	// ReadAPIVersion current supported version
	ReadAPIVersion string = "v1"

	// ReadPath is the current path for prerecorded transcription
	ReadPath string = "read"
)
View Source
const (
	// APIProtocol default protocol
	APIProtocol string = "https"

	// WSProtocol default protocol
	WSProtocol string = "wss"
)
View Source
const (
	// LiveAPIVersion current supported version
	LiveAPIVersion string = "v1"

	// LivePath is the current path for live transcription
	LivePath string = "listen"
)
View Source
const (
	// version
	ManageAPIVersion string = "v1"

	// balances
	BalancesURI     string = "projects/%s/balances"
	BalancesByIdURI string = "projects/%s/balances/%s"

	// invitations
	InvitationsURI      string = "projects/%s/invites"
	InvitationsByIdURI  string = "projects/%s/invites/%s"
	InvitationsLeaveURI string = "projects/%s/leave"

	// Keys
	KeysURI     string = "projects/%s/keys"
	KeysByIdURI string = "projects/%s/keys/%s"

	// Members
	MembersURI     string = "projects/%s/members"
	MembersByIdURI string = "projects/%s/members/%s"

	// projects
	ProjectsURI     string = "projects"
	ProjectsByIdURI string = "projects/%s"

	// scopes
	MembersScopeByIdURI string = "projects/%s/members/%s/scopes"

	// usage
	UsageRequestURI     string = "projects/%s/requests"
	UsageRequestByIdURI string = "projects/%s/requests/%s"
	UsageURI            string = "projects/%s/usage"
	UsageFieldsURI      string = "projects/%s/usage/fields"
)
View Source
const (
	// PrerecordedAPIVersion current supported version
	PrerecordedAPIVersion string = "v1"

	// PrerecordedPath is the current path for prerecorded transcription
	PrerecordedPath string = "listen"
)
View Source
const (
	// SpeakAPIVersion current supported version
	SpeakAPIVersion string = "v1"

	// SpeakPath is the current path for prerecorded transcription
	SpeakPath string = "speak"
)

Variables

View Source
var (
	// ErrInvalidPath invalid path
	ErrInvalidPath = errors.New("invalid path")
)

Functions

func GetAnalyzeAPI

func GetAnalyzeAPI(ctx context.Context, host, version, path string, options interfaces.AnalyzeOptions, args ...interface{}) (string, error)

GetAnalyzeAPI is a function which controls the versioning of the live transcription API and provides mechanism for:

- overriding the host endpoint - overriding the version used - overriding the endpoint path - additional arguments to the query string/parameters

The return value is the complete URL endpoint to be used for the live transcription

func GetLiveAPI

func GetLiveAPI(ctx context.Context, host, version, path string, options interfaces.LiveTranscriptionOptions, args ...interface{}) (string, error)

GetLiveAPI is a function which controls the versioning of the live transcription API and provides mechanism for:

- overriding the host endpoint - overriding the version used - overriding the endpoint path - additional arguments to the query string/parameters

The return value is the complete URL endpoint to be used for the live transcription

func GetManageAPI

func GetManageAPI(ctx context.Context, host, version, path string, vals interface{}, args ...interface{}) (string, error)

GetManageAPI is a function which controls the versioning of the manage API and provides mechanism for:

- overriding the host endpoint - overriding the version used - overriding the endpoint path - additional arguments to the query string/parameters

The return value is the complete URL endpoint to be used for manage

func GetPrerecordedAPI

func GetPrerecordedAPI(ctx context.Context, host, version, path string, options interfaces.PreRecordedTranscriptionOptions, args ...interface{}) (string, error)

GetPrerecordedAPI is a function which controls the versioning of the live transcription API and provides mechanism for:

- overriding the host endpoint - overriding the version used - overriding the endpoint path - additional arguments to the query string/parameters

The return value is the complete URL endpoint to be used for the live transcription

func GetSpeakAPI

func GetSpeakAPI(ctx context.Context, host, version, path string, options interfaces.SpeakOptions, args ...interface{}) (string, error)

GetSpeakAPI is a function which controls the versioning of the live transcription API and provides mechanism for:

- overriding the host endpoint - overriding the version used - overriding the endpoint path - additional arguments to the query string/parameters

The return value is the complete URL endpoint to be used for the live transcription

Types

This section is empty.

Jump to

Keyboard shortcuts

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