mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add CLI commands to manage AI Gateway keys (#25689)
Adds `coder ai-gateway keys` commands: * `create <name>` creates key with given name * `list` lists existing keys (alias `ls`) * `delete <name | id>` removes key matching by name or key id, name has priority (alias `rm`)
This commit is contained in:
@@ -14,11 +14,11 @@ import (
|
||||
// AIGatewayKey is a shared secret used by a standalone AI Gateway
|
||||
// to authenticate into coderd.
|
||||
type AIGatewayKey struct {
|
||||
ID uuid.UUID `json:"id" format:"uuid"`
|
||||
Name string `json:"name"`
|
||||
KeyPrefix string `json:"key_prefix"`
|
||||
CreatedAt time.Time `json:"created_at" format:"date-time"`
|
||||
LastUsedAt *time.Time `json:"last_used_at,omitempty" format:"date-time"`
|
||||
ID uuid.UUID `json:"id" table:"id" format:"uuid"`
|
||||
Name string `json:"name" table:"name,default_sort"`
|
||||
KeyPrefix string `json:"key_prefix" table:"key prefix"`
|
||||
CreatedAt time.Time `json:"created_at" table:"created at" format:"date-time"`
|
||||
LastUsedAt *time.Time `json:"last_used_at,omitempty" table:"last used at" format:"date-time"`
|
||||
}
|
||||
|
||||
// CreateAIGatewayKeyRequest requests a new AI Gateway key.
|
||||
|
||||
Reference in New Issue
Block a user