manage

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2025 License: MIT Imports: 11 Imported by: 0

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

type Client struct {
	*manage.Client
}

Alias

func New

func New(client interface{}) *Client

New creates a new Client from

func (*Client) CreateKey

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

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

DeleteInvitation deletes an invitation to a project

func (*Client) DeleteKey

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

DeleteKey deletes a key for a project

func (*Client) DeleteProject

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

DeleteProject deletes a project

func (*Client) GetBalance

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

GetBalance gets a balance for a project

func (*Client) GetFields

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

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

GetKey gets a key for a project

func (*Client) GetMemberScopes

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

GetMemberScopes gets the scopes for a member

func (*Client) GetModel

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

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

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

GetProject gets a project by ID

func (*Client) GetProjectModel

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

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

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

GetRequest gets a request by ID

func (*Client) GetUsage

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

GetUsage gets a usage by ID

func (*Client) LeaveProject

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

LeaveProject leaves a project

func (*Client) ListBalances

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

ListBalances lists all balances for a project

func (*Client) ListInvitations

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

ListInvitations lists all invitations for a project

func (*Client) ListKeys

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

ListKeys lists all keys for a project

func (*Client) ListMembers

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

ListMembers lists all members for a project

func (*Client) ListModels

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

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

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

ListProjects lists all projects for a user

func (*Client) ListRequests

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

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

RemoveMember removes a member from a project

func (*Client) SendInvitation

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

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

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