manage

package
v1.6.0-dev.2 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: MIT Imports: 11 Imported by: 8

Documentation

Overview

Balances API: https://developers.deepgram.com/reference/get-all-balances https://developers.deepgram.com/reference/get-balance

Invitations API https://developers.deepgram.com/reference/list-invites https://developers.deepgram.com/reference/send-invites https://developers.deepgram.com/reference/delete-invite https://developers.deepgram.com/reference/leave-project

Keys API: https://developers.deepgram.com/reference/list-keys https://developers.deepgram.com/reference/get-key https://developers.deepgram.com/reference/create-key https://developers.deepgram.com/reference/delete-key

This package contains the code for the Keys APIs in the Deepgram Manage API

Members API: https://developers.deepgram.com/reference/get-members https://developers.deepgram.com/reference/remove-member

Models API: https://developers.deepgram.com/docs/model-metadata

Projects API: https://developers.deepgram.com/reference/get-projects https://developers.deepgram.com/reference/get-project https://developers.deepgram.com/reference/update-project https://developers.deepgram.com/reference/delete-project

Scopes API: https://developers.deepgram.com/reference/get-member-scopes https://developers.deepgram.com/reference/update-scope

Usage API: https://developers.deepgram.com/reference/get-all-requests https://developers.deepgram.com/reference/get-request https://developers.deepgram.com/reference/summarize-usage https://developers.deepgram.com/reference/get-fields

Index

Constants

View Source
const (
	PackageVersion string = "v1.0"
)

Variables

View Source
var (
	// ErrUnexpectedInterface unexpected interface encountered
	ErrUnexpectedInterface = errors.New("unexpected interface encountered")
)

Functions

This section is empty.

Types

type Client added in v1.3.0

type Client struct {
	*manage.Client
}

Alias

func New

func New(client interface{}) *Client

New creates a new Client from

func (*Client) CreateKey added in v1.3.0

func (c *Client) CreateKey(ctx context.Context, projectID string, key *api.KeyCreateRequest) (*api.APIKey, error)

CreateKey creates a key for a project

func (*Client) DeleteInvitation added in v1.3.0

func (c *Client) DeleteInvitation(ctx context.Context, projectID, email string) (*api.MessageResult, error)

DeleteInvitation deletes an invitation to a project

func (*Client) DeleteKey added in v1.3.0

func (c *Client) DeleteKey(ctx context.Context, projectID, keyID string) (*api.MessageResult, error)

DeleteKey deletes a key for a project

func (*Client) DeleteProject added in v1.3.0

func (c *Client) DeleteProject(ctx context.Context, projectID string) (*api.MessageResult, error)

DeleteProject deletes a project

func (*Client) GetBalance added in v1.3.0

func (c *Client) GetBalance(ctx context.Context, projectID, balanceID string) (*api.BalanceResult, error)

GetBalance gets a balance for a project

func (*Client) GetFields added in v1.3.0

func (c *Client) GetFields(ctx context.Context, projectID string, use *api.UsageListRequest) (*api.UsageFieldResult, error)

GetFields gets a list of fields for a project

func (*Client) GetKey added in v1.3.0

func (c *Client) GetKey(ctx context.Context, projectID, keyID string) (*api.KeyResult, error)

GetKey gets a key for a project

func (*Client) GetMemberScopes added in v1.3.0

func (c *Client) GetMemberScopes(ctx context.Context, projectID, memberID string) (*api.ScopeResult, error)

GetMemberScopes gets the scopes for a member

func (*Client) GetModel added in v1.5.0

func (c *Client) GetModel(ctx context.Context, modelID string) (*api.ModelResult, error)

GetModel gets a model by ID

Args:

ctx: context
modelID: model ID

Returns:

*api.ModelResult: specific model

func (*Client) GetModels added in v1.5.0

func (c *Client) GetModels(ctx context.Context, model *api.ModelRequest) (*api.ModelsResult, error)

GetModels lists all models available

Args:

ctx: context
model: model request options

Returns:

*api.ModelsResult: list of models

func (*Client) GetProject added in v1.3.0

func (c *Client) GetProject(ctx context.Context, projectID string) (*api.ProjectResult, error)

GetProject gets a project by ID

func (*Client) GetProjectModel added in v1.5.0

func (c *Client) GetProjectModel(ctx context.Context, projectID, modelID string) (*api.ModelResult, error)

GetProjectModel gets a single model within the project by ID

Args:

ctx: context
projectID: project ID
modelID: model ID

Returns:

*api.ModelResult: specific model

func (*Client) GetProjectModels added in v1.5.0

func (c *Client) GetProjectModels(ctx context.Context, projectID string, model *api.ModelRequest) (*api.ModelsResult, error)

GetProjectModels lists all models available

Args:

ctx: context
projectID: project ID
model: model request options

Returns:

*api.ModelsResult: list of models

func (*Client) GetRequest added in v1.3.0

func (c *Client) GetRequest(ctx context.Context, projectID, requestID string) (*api.UsageRequestResult, error)

GetRequest gets a request by ID

func (*Client) GetUsage added in v1.3.0

func (c *Client) GetUsage(ctx context.Context, projectID string, use *api.UsageRequest) (*api.UsageResult, error)

GetUsage gets a usage by ID

func (*Client) LeaveProject added in v1.3.0

func (c *Client) LeaveProject(ctx context.Context, projectID string) (*api.MessageResult, error)

LeaveProject leaves a project

func (*Client) ListBalances added in v1.3.0

func (c *Client) ListBalances(ctx context.Context, projectID string) (*api.BalancesResult, error)

ListBalances lists all balances for a project

func (*Client) ListInvitations added in v1.3.0

func (c *Client) ListInvitations(ctx context.Context, projectID string) (*api.InvitationsResult, error)

ListInvitations lists all invitations for a project

func (*Client) ListKeys added in v1.3.0

func (c *Client) ListKeys(ctx context.Context, projectID string) (*api.KeysResult, error)

ListKeys lists all keys for a project

func (*Client) ListMembers added in v1.3.0

func (c *Client) ListMembers(ctx context.Context, projectID string) (*api.MembersResult, error)

ListMembers lists all members for a project

func (*Client) ListModels added in v1.5.0

func (c *Client) ListModels(ctx context.Context, model *api.ModelRequest) (*api.ModelsResult, error)

ListModels lists all models available NOTE: This is a wrapper around GetModels

Args:

ctx: context
model: model request options

Returns:

*api.ModelsResult: list of models

func (*Client) ListProjectModels added in v1.5.0

func (c *Client) ListProjectModels(ctx context.Context, projectID string, model *api.ModelRequest) (*api.ModelsResult, error)

ListProjectModels lists all models available NOTE: This is a wrapper around GetProjectModels

Args:

ctx: context
projectID: project ID
model: model request options

Returns:

*api.ModelsResult: list of models

func (*Client) ListProjects added in v1.3.0

func (c *Client) ListProjects(ctx context.Context) (*api.ProjectsResult, error)

ListProjects lists all projects for a user

func (*Client) ListRequests added in v1.3.0

func (c *Client) ListRequests(ctx context.Context, projectID string, use *api.UsageListRequest) (*api.UsageListResult, error)

ListRequests lists all requests for a project

func (*Client) RemoveMember added in v1.3.0

func (c *Client) RemoveMember(ctx context.Context, projectID, memberID string) (*api.MessageResult, error)

RemoveMember removes a member from a project

func (*Client) SendInvitation added in v1.3.0

func (c *Client) SendInvitation(ctx context.Context, projectID string, invite *api.InvitationRequest) (*api.MessageResult, error)

SendInvitation sends an invitation to a project

func (*Client) UpdateMemberScopes added in v1.3.0

func (c *Client) UpdateMemberScopes(ctx context.Context, projectID, memberID string, scope *api.ScopeUpdateRequest) (*api.MessageResult, error)

UpdateMemberScopes updates the scopes for a member

func (*Client) UpdateProject added in v1.3.0

func (c *Client) UpdateProject(ctx context.Context, projectID string, proj *api.ProjectUpdateRequest) (*api.MessageResult, error)

UpdateProject updates a project

Directories

Path Synopsis
This package provides the types for the Deepgram Manage API.
This package provides the types for the Deepgram Manage API.

Jump to

Keyboard shortcuts

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