dashboard

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const DashboardBaseURL = "https://console-api.pinecone.io"
View Source
const (
	URL_DELETE_API_KEYS = "/v2/dashboard/projects/%s/api-key"
)
View Source
const (
	URL_DELETE_PROJECT = "/v2/dashboard/projects/%s"
)
View Source
const (
	URL_GET_API_KEYS = "/v2/dashboard/projects/%s/api-keys"
)
View Source
const (
	URL_GET_ORGANIZATION = "/v2/dashboard/organizations/%s"
)
View Source
const (
	URL_LIST_ORGANIZATIONS = "/v2/dashboard/organizations"
)
View Source
const (
	URL_POST_API_KEYS = "/v2/dashboard/projects/%s/api-key"
)
View Source
const (
	URL_POST_PROJECTS = "/v2/dashboard/organizations/%s/projects"
)

Variables

This section is empty.

Functions

func DeleteAndDecode

func DeleteAndDecode[T any](path string) (*T, error)

func GetAndDecode

func GetAndDecode[T any](path string) (*T, error)

func PostAndDecode

func PostAndDecode[B any, R any](path string, body B) (*R, error)

func RequestWithBodyAndDecode

func RequestWithBodyAndDecode[B any, R any](path string, method string, body B) (*R, error)

func RequestWithoutBodyAndDecode

func RequestWithoutBodyAndDecode[T any](path string, method string) (*T, error)

Types

type CreateApiKeyRequest added in v0.0.5

type CreateApiKeyRequest struct {
	Label string `json:"label"`
}

type CreateApiKeyResponse added in v0.0.5

type CreateApiKeyResponse struct {
	Success bool `json:"success"`
	Key     Key  `json:"key"`
}

func CreateApiKey added in v0.0.5

func CreateApiKey(projId string, keyName string) (*CreateApiKeyResponse, error)

type CreateProjectRequest

type CreateProjectRequest struct {
	Name        string `json:"name"`
	PodQuota    int32  `json:"quota"`
	Environment string `json:"environment"`
}

type CreateProjectResponse

type CreateProjectResponse struct {
	Success       bool          `json:"success"`
	GlobalProject GlobalProject `json:"globalProject"`
}

func CreateProject

func CreateProject(orgId string, projName string, podQuota int32) (*CreateProjectResponse, error)

type DeleteApiKeyRequest added in v0.0.5

type DeleteApiKeyRequest struct {
	Label    string `json:"label"`
	UserName string `json:"userName"`
}

type DeleteApiKeyResponse added in v0.0.5

type DeleteApiKeyResponse struct {
	Success bool `json:"success"`
}

func DeleteApiKey added in v0.0.5

func DeleteApiKey(projId string, key Key) (*DeleteApiKeyResponse, error)

type DeletePostResponse

type DeletePostResponse struct {
	Success bool `json:"success"`
}

func DeleteProject

func DeleteProject(orgId string, projId string) (*DeletePostResponse, error)

type DescribeOrganizationResponse

type DescribeOrganizationResponse struct {
	Success   bool       `json:"success"`
	UserRoles []UserRole `json:"userRoles"`
}

func DescribeOrganization

func DescribeOrganization(orgId string) (*DescribeOrganizationResponse, error)

type GlobalProject

type GlobalProject struct {
	Id         string `json:"id"`
	Name       string `json:"name"`
	Quota      string `json:"quota"`
	IndexQuota string `json:"indexQuota"`
}

func GetProjectById

func GetProjectById(orgId string, projId string) (*GlobalProject, error)

func GetProjectByName

func GetProjectByName(orgName string, projName string) (*GlobalProject, error)

type Key

type Key struct {
	Id        string `json:"id"`
	UserLabel string `json:"user_label"`
	Value     string `json:"value"`
	UserName  string `json:"user_name"`
}

type KeyResponse

type KeyResponse struct {
	Keys []Key `json:"keys"`
}

func GetApiKeys

func GetApiKeys(project GlobalProject) (*KeyResponse, error)

func GetApiKeysById added in v0.0.5

func GetApiKeysById(projectId string) (*KeyResponse, error)

type Organization

type Organization struct {
	Id       string    `json:"id"`
	Name     string    `json:"name"`
	Projects []Project `json:"projects"`
}

type OrganizationsResponse

type OrganizationsResponse struct {
	Organizations []Organization `json:"organizations"`
}

func ListOrganizations

func ListOrganizations() (*OrganizationsResponse, error)

type Project

type Project struct {
	Id            string        `json:"id"`
	Name          string        `json:"name"`
	GlobalProject GlobalProject `json:"globalProject"`
}

type UserRole

type UserRole struct {
	Id    string `json:"id"`
	Name  string `json:"name"`
	Email string `json:"email"`
	Role  string `json:"role"`
}

Jump to

Keyboard shortcuts

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