Help us shape the future of Go! Take the 2026 Go Developer Survey

adminclient

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLIAuthAuthenticator

type CLIAuthAuthenticator struct {
	Name    string                      `json:"name"`
	Enabled bool                        `json:"enabled"`
	Config  cliauth.AuthenticatorConfig `json:"config"`
}

type CLIAuthLogin

type CLIAuthLogin struct {
	LoginID           string `json:"login_id"`
	Status            string `json:"status"`
	AuthenticatorName string `json:"authenticator_name"`
	Message           string `json:"message,omitempty"`
}

type CLIAuthLoginStatus

type CLIAuthLoginStatus struct {
	LoginID           string `json:"login_id"`
	AuthenticatorName string `json:"authenticator_name"`
	Status            string `json:"status"`
	StartedAt         any    `json:"started_at,omitempty"`
	FinishedAt        any    `json:"finished_at,omitempty"`
	Phase             string `json:"phase,omitempty"`
	Message           string `json:"message,omitempty"`
	VerificationURL   string `json:"verification_url,omitempty"`
	UserCode          string `json:"user_code,omitempty"`
	Error             string `json:"error,omitempty"`
	CredentialID      string `json:"credential_id,omitempty"`
}

type CLIAuthRefresherStatus

type CLIAuthRefresherStatus struct {
	Enabled bool `json:"enabled"`
}

type CLIAuthUpdateAuthenticatorResponse

type CLIAuthUpdateAuthenticatorResponse struct {
	Status        string               `json:"status"`
	Authenticator CLIAuthAuthenticator `json:"authenticator"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(cfg Config) *Client

func (*Client) BaseURL

func (c *Client) BaseURL() string

func (*Client) CallMCPServiceTool added in v0.1.0

func (c *Client) CallMCPServiceTool(ctx context.Context, id string, req MCPToolCallRequest) (*MCPToolResult, error)

func (*Client) CreateCredential

func (c *Client) CreateCredential(ctx context.Context, req CreateCredentialRequest) (*ManagedCredential, error)

func (*Client) CreateLLMRoute added in v0.1.0

func (c *Client) CreateLLMRoute(ctx context.Context, route LLMRouteConfig) (*LLMRouteConfig, error)

func (*Client) CreateMCPRoute added in v0.1.0

func (c *Client) CreateMCPRoute(ctx context.Context, cfg MCPRouteConfig) (*MCPRouteView, error)

func (*Client) CreateMCPService added in v0.1.0

func (c *Client) CreateMCPService(ctx context.Context, cfg MCPServiceConfig) (*MCPServiceView, error)

func (*Client) CreateManagedModel

func (c *Client) CreateManagedModel(ctx context.Context, model modelcatalog.ManagedModel) (*ManagedModel, error)

func (*Client) CreateProvider

func (c *Client) CreateProvider(ctx context.Context, cfg ProviderConfig) (*Provider, error)

func (*Client) CreateVirtualKey

func (c *Client) CreateVirtualKey(ctx context.Context, key VirtualKeyConfig) (*VirtualKeyConfig, error)

func (*Client) DeleteCredential

func (c *Client) DeleteCredential(ctx context.Context, id string) (*StatusResponse, error)

func (*Client) DeleteLLMRoute added in v0.1.0

func (c *Client) DeleteLLMRoute(ctx context.Context, id string) (*StatusResponse, error)

func (*Client) DeleteMCPRoute added in v0.1.0

func (c *Client) DeleteMCPRoute(ctx context.Context, id string) (*StatusResponse, error)

func (*Client) DeleteMCPService added in v0.1.0

func (c *Client) DeleteMCPService(ctx context.Context, id string) (*StatusResponse, error)

func (*Client) DeleteManagedModel

func (c *Client) DeleteManagedModel(ctx context.Context, providerID, upstreamModel string) (*StatusResponse, error)

func (*Client) DeleteProvider

func (c *Client) DeleteProvider(ctx context.Context, id string) (*StatusResponse, error)

func (*Client) DeleteVirtualKey

func (c *Client) DeleteVirtualKey(ctx context.Context, id string) (*StatusResponse, error)

func (*Client) DisableCLIAuthRefresher

func (c *Client) DisableCLIAuthRefresher(ctx context.Context) (*boolStatusResponse, error)

func (*Client) DisableLLMRoute added in v0.1.0

func (c *Client) DisableLLMRoute(ctx context.Context, id string) (*LLMRoute, error)

func (*Client) DisableProvider

func (c *Client) DisableProvider(ctx context.Context, id string) (*Provider, error)

func (*Client) DisableProviderType

func (c *Client) DisableProviderType(ctx context.Context, providerType string) (*boolStatusResponse, error)

func (*Client) DisableVirtualKey

func (c *Client) DisableVirtualKey(ctx context.Context, id string) (*VirtualKey, error)

func (*Client) EnableCLIAuthRefresher

func (c *Client) EnableCLIAuthRefresher(ctx context.Context) (*boolStatusResponse, error)

func (*Client) EnableLLMRoute added in v0.1.0

func (c *Client) EnableLLMRoute(ctx context.Context, id string) (*LLMRoute, error)

func (*Client) EnableProvider

func (c *Client) EnableProvider(ctx context.Context, id string) (*Provider, error)

func (*Client) EnableProviderType

func (c *Client) EnableProviderType(ctx context.Context, providerType string) (*boolStatusResponse, error)

func (*Client) EnableVirtualKey

func (c *Client) EnableVirtualKey(ctx context.Context, id string) (*VirtualKey, error)

func (*Client) GetCLIAuthAuthenticator

func (c *Client) GetCLIAuthAuthenticator(ctx context.Context, name string) (*CLIAuthAuthenticator, error)

func (*Client) GetCLIAuthLoginStatus

func (c *Client) GetCLIAuthLoginStatus(ctx context.Context, loginID string) (*CLIAuthLoginStatus, error)

func (*Client) GetCLIAuthRefresherStatus

func (c *Client) GetCLIAuthRefresherStatus(ctx context.Context) (*CLIAuthRefresherStatus, error)

func (*Client) GetCredential

func (c *Client) GetCredential(ctx context.Context, id string) (*Credential, error)

func (*Client) GetLLMRoute added in v0.1.0

func (c *Client) GetLLMRoute(ctx context.Context, id string) (*LLMRoute, error)

func (*Client) GetMCPRoute added in v0.1.0

func (c *Client) GetMCPRoute(ctx context.Context, id string) (*MCPRouteView, error)

func (*Client) GetMCPRuntime added in v0.1.0

func (c *Client) GetMCPRuntime(ctx context.Context) (*MCPRuntimeView, error)

func (*Client) GetMCPService added in v0.1.0

func (c *Client) GetMCPService(ctx context.Context, id string) (*MCPServiceView, error)

func (*Client) GetMCPServiceCapabilities added in v0.1.0

func (c *Client) GetMCPServiceCapabilities(ctx context.Context, id string) (*MCPServiceCapabilities, error)

func (*Client) GetMCPServicePrompt added in v0.1.0

func (c *Client) GetMCPServicePrompt(ctx context.Context, id string, req MCPPromptGetRequest) (*MCPPromptResult, error)

func (*Client) GetMCPServiceSession added in v0.1.0

func (c *Client) GetMCPServiceSession(ctx context.Context, id string) (*MCPServiceSessionView, error)

func (*Client) GetManagedModel

func (c *Client) GetManagedModel(ctx context.Context, providerID, upstreamModel string) (*ManagedModel, error)

func (*Client) GetProvider

func (c *Client) GetProvider(ctx context.Context, id string) (*Provider, error)

func (*Client) GetVirtualKey

func (c *Client) GetVirtualKey(ctx context.Context, id string) (*VirtualKey, error)

func (*Client) ListCLIAuthAuthenticators

func (c *Client) ListCLIAuthAuthenticators(ctx context.Context) ([]CLIAuthAuthenticator, error)

func (*Client) ListCredentials

func (c *Client) ListCredentials(ctx context.Context, opts CredentialListOptions) ([]Credential, error)

func (*Client) ListDiscoveredModels

func (c *Client) ListDiscoveredModels(ctx context.Context, providerID string) ([]DiscoveredModel, error)

func (*Client) ListLLMAPIHandlerTypes

func (c *Client) ListLLMAPIHandlerTypes(ctx context.Context) ([]LLMAPIHandlerType, error)

func (*Client) ListLLMRoutes added in v0.1.0

func (c *Client) ListLLMRoutes(ctx context.Context, opts LLMRouteListOptions) ([]LLMRoute, error)

func (*Client) ListMCPRoutes added in v0.1.0

func (c *Client) ListMCPRoutes(ctx context.Context) ([]MCPRouteView, error)

func (*Client) ListMCPRuntimeHistory added in v0.1.0

func (c *Client) ListMCPRuntimeHistory(ctx context.Context, routeID string) ([]MCPRuntimeCompletedRequest, error)

func (*Client) ListMCPRuntimeInFlight added in v0.1.0

func (c *Client) ListMCPRuntimeInFlight(ctx context.Context) ([]MCPRuntimeInFlightRequest, error)

func (*Client) ListMCPRuntimeProgress added in v0.1.0

func (c *Client) ListMCPRuntimeProgress(ctx context.Context) ([]MCPRuntimeProgressNotification, error)

func (*Client) ListMCPServicePrompts added in v0.1.0

func (c *Client) ListMCPServicePrompts(ctx context.Context, id string) ([]MCPPrompt, error)

func (*Client) ListMCPServiceResourceTemplates added in v0.1.0

func (c *Client) ListMCPServiceResourceTemplates(ctx context.Context, id string) ([]MCPResourceTemplate, error)

func (*Client) ListMCPServiceResources added in v0.1.0

func (c *Client) ListMCPServiceResources(ctx context.Context, id string) ([]MCPResource, error)

func (*Client) ListMCPServiceTools added in v0.1.0

func (c *Client) ListMCPServiceTools(ctx context.Context, id string) ([]MCPTool, error)

func (*Client) ListMCPServices added in v0.1.0

func (c *Client) ListMCPServices(ctx context.Context) ([]MCPServiceView, error)

func (*Client) ListManagedModels

func (c *Client) ListManagedModels(ctx context.Context, opts ManagedModelListOptions) ([]ManagedModel, error)

func (*Client) ListProviderTypes

func (c *Client) ListProviderTypes(ctx context.Context) ([]ProviderType, error)

func (*Client) ListProviders

func (c *Client) ListProviders(ctx context.Context, opts ProviderListOptions) ([]Provider, error)

func (*Client) ListVirtualKeys

func (c *Client) ListVirtualKeys(ctx context.Context, opts VirtualKeyListOptions) ([]VirtualKey, error)

func (*Client) Login

func (c *Client) Login(ctx context.Context) (*LoginResponse, error)

func (*Client) Logout

func (c *Client) Logout(ctx context.Context) error

func (*Client) Me

func (c *Client) Me(ctx context.Context) (*MeResponse, error)

func (*Client) ReadMCPServiceResource added in v0.1.0

func (c *Client) ReadMCPServiceResource(ctx context.Context, id string, req MCPResourceReadRequest) (*MCPResourceReadResult, error)

func (*Client) RefreshProviderModels

func (c *Client) RefreshProviderModels(ctx context.Context, providerID string) (*RefreshDiscoveredModelsResponse, error)

func (*Client) SetToken

func (c *Client) SetToken(token string)

func (*Client) StartCLIAuthLogin

func (c *Client) StartCLIAuthLogin(ctx context.Context, name string, req StartCLIAuthLoginRequest) (*CLIAuthLogin, error)

func (*Client) UpdateCredential

func (c *Client) UpdateCredential(ctx context.Context, id string, req UpdateCredentialRequest) (*ManagedCredential, error)

func (*Client) UpdateLLMRoute added in v0.1.0

func (c *Client) UpdateLLMRoute(ctx context.Context, id string, route LLMRouteConfig) (*LLMRouteConfig, error)

func (*Client) UpdateMCPRoute added in v0.1.0

func (c *Client) UpdateMCPRoute(ctx context.Context, id string, cfg MCPRouteConfig) (*MCPRouteView, error)

func (*Client) UpdateMCPService added in v0.1.0

func (c *Client) UpdateMCPService(ctx context.Context, id string, cfg MCPServiceConfig) (*MCPServiceView, error)

func (*Client) UpdateManagedModel

func (c *Client) UpdateManagedModel(ctx context.Context, providerID, upstreamModel string, model modelcatalog.ManagedModel) (*ManagedModel, error)

func (*Client) UpdateProvider

func (c *Client) UpdateProvider(ctx context.Context, id string, cfg ProviderConfig) (*Provider, error)

func (*Client) UpdateVirtualKey

func (c *Client) UpdateVirtualKey(ctx context.Context, id string, req VirtualKeyConfig) (*VirtualKeyConfig, error)

type Config

type Config struct {
	BaseURL    string
	Username   string
	Password   string
	Token      string
	HTTPClient *http.Client
}

type CreateCredentialRequest

type CreateCredentialRequest struct {
	ID           string            `json:"id,omitempty"`
	Type         string            `json:"type"`
	ProviderType string            `json:"provider_type,omitempty"`
	ProviderID   string            `json:"provider_id"`
	Label        string            `json:"label,omitempty"`
	Attributes   map[string]string `json:"attributes,omitempty"`
	Metadata     map[string]any    `json:"metadata,omitempty"`
	Disabled     bool              `json:"disabled,omitempty"`
}

type Credential

type Credential = adminapi.CredentialView

type CredentialListOptions

type CredentialListOptions struct {
	ProviderType string
	ProviderID   string
	Type         string
}

type Error

type Error struct {
	StatusCode int
	Message    string
	Body       []byte
}

func (*Error) Error

func (e *Error) Error() string

type LLMAPIHandlerType

type LLMAPIHandlerType = adminapi.LLMApiHandlerTypeView

type LLMRoute added in v0.1.0

type LLMRoute = adminapi.LLMRouteView

type LLMRouteConfig added in v0.1.0

type LLMRouteConfig = llmroutepkg.LLMRouteConfig

type LLMRouteListOptions added in v0.1.0

type LLMRouteListOptions struct {
	Tag       string
	TagPrefix string
}

type LoginRequest

type LoginRequest struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type LoginResponse

type LoginResponse struct {
	Token    string `json:"token"`
	Username string `json:"username"`
}

type MCPPrompt added in v0.1.0

type MCPPrompt = basemcp.Prompt

type MCPPromptGetRequest added in v0.1.0

type MCPPromptGetRequest = adminapi.MCPPromptGetRequest

type MCPPromptResult added in v0.1.0

type MCPPromptResult = basemcp.PromptResult

type MCPResource added in v0.1.0

type MCPResource = basemcp.Resource

type MCPResourceReadRequest added in v0.1.0

type MCPResourceReadRequest = adminapi.MCPResourceReadRequest

type MCPResourceReadResult added in v0.1.0

type MCPResourceReadResult = basemcp.ResourceReadResult

type MCPResourceTemplate added in v0.1.0

type MCPResourceTemplate = basemcp.ResourceTemplate

type MCPRouteConfig added in v0.1.0

type MCPRouteConfig = mcproute.MCPRouteConfig

type MCPRouteView added in v0.1.0

type MCPRouteView = adminapi.MCPRouteView

type MCPRuntimeCompletedRequest added in v0.1.0

type MCPRuntimeCompletedRequest = mcpruntime.CompletedRequest

type MCPRuntimeInFlightRequest added in v0.1.0

type MCPRuntimeInFlightRequest = mcpruntime.InFlightRequest

type MCPRuntimeProgressNotification added in v0.1.0

type MCPRuntimeProgressNotification = mcpruntime.ProgressNotification

type MCPRuntimeView added in v0.1.0

type MCPRuntimeView = adminapi.MCPDispatcherRuntimeView

type MCPServiceCapabilities added in v0.1.0

type MCPServiceCapabilities = map[string]any

type MCPServiceConfig added in v0.1.0

type MCPServiceConfig = mcpservice.MCPServiceConfig

type MCPServiceSessionView added in v0.1.0

type MCPServiceSessionView = adminapi.GatewaySessionView

type MCPServiceView added in v0.1.0

type MCPServiceView = adminapi.MCPServiceView

type MCPTool added in v0.1.0

type MCPTool = basemcp.Tool

type MCPToolCallRequest added in v0.1.0

type MCPToolCallRequest = adminapi.MCPToolCallRequest

type MCPToolResult added in v0.1.0

type MCPToolResult = basemcp.ToolResult

type ManagedCredential

type ManagedCredential = credentialmgr.ManagedCredential

type ManagedModelListOptions

type ManagedModelListOptions struct {
	ProviderID string
}

type MeResponse

type MeResponse struct {
	Username  string    `json:"username"`
	CreatedAt time.Time `json:"created_at"`
}

type Provider

type Provider = adminapi.ProviderView

type ProviderConfig

type ProviderConfig = provider.ProviderConfig

type ProviderListOptions

type ProviderListOptions struct {
	ProviderType string
}

type ProviderType

type ProviderType = adminapi.ProviderTypeView

type RefreshDiscoveredModelsResponse

type RefreshDiscoveredModelsResponse struct {
	ProviderID string            `json:"provider_id"`
	Items      []DiscoveredModel `json:"items"`
}

type StartCLIAuthLoginRequest

type StartCLIAuthLoginRequest struct {
	ProviderID string `json:"provider_id"`
	Scope      string `json:"scope,omitempty"`
}

type StatusResponse

type StatusResponse struct {
	Status string `json:"status"`
	ID     string `json:"id,omitempty"`
	Key    string `json:"key,omitempty"`
}

type UpdateCLIAuthAuthenticatorRequest

type UpdateCLIAuthAuthenticatorRequest struct {
	Enabled *bool                        `json:"enabled,omitempty"`
	Config  *cliauth.AuthenticatorConfig `json:"config,omitempty"`
}

type UpdateCredentialRequest

type UpdateCredentialRequest struct {
	Type         string            `json:"type,omitempty"`
	ProviderType string            `json:"provider_type,omitempty"`
	ProviderID   string            `json:"provider_id,omitempty"`
	Label        string            `json:"label,omitempty"`
	Attributes   map[string]string `json:"attributes,omitempty"`
	Metadata     map[string]any    `json:"metadata,omitempty"`
	Disabled     bool              `json:"disabled,omitempty"`
}

type VirtualKey

type VirtualKey = adminapi.VirtualKeyView

type VirtualKeyConfig

type VirtualKeyConfig struct {
	ID              string    `json:"id,omitempty"`
	Tag             string    `json:"tag,omitempty"`
	Description     string    `json:"description,omitempty"`
	Disabled        bool      `json:"disabled,omitempty"`
	AllowedRouteIDs []string  `json:"allowed_route_ids,omitempty"`
	StatusMessage   string    `json:"status_message,omitempty"`
	ExpiresAt       time.Time `json:"expires_at,omitempty"`
}

type VirtualKeyListOptions

type VirtualKeyListOptions struct {
	Tag string
}

Jump to

Keyboard shortcuts

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