updates
Agent Release / build (push) Successful in 1m18s
Server Deploy / deploy (push) Successful in 1m33s

This commit is contained in:
domrichardson
2026-06-24 13:57:48 +01:00
parent 407a610cfb
commit e6ef9bc536
9 changed files with 181 additions and 6 deletions
+2 -1
View File
@@ -87,7 +87,7 @@ func (c *Client) SyncKeys(serverID, agentToken string) ([]string, error) {
return resp.PublicKeys, nil
}
func (c *Client) UploadGeneratedKey(serverID, agentToken, publicKey, label string) (string, error) {
func (c *Client) UploadGeneratedKey(serverID, agentToken, publicKey, privateKey, label string) (string, error) {
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
@@ -95,6 +95,7 @@ func (c *Client) UploadGeneratedKey(serverID, agentToken, publicKey, label strin
ServerId: serverID,
AgentToken: agentToken,
PublicKey: publicKey,
PrivateKey: privateKey,
Label: label,
})
if err != nil {
+6
View File
@@ -36,6 +36,7 @@ type UploadKeyRequest struct {
AgentToken string `json:"agent_token"`
PublicKey string `json:"public_key"`
Label string `json:"label"`
PrivateKey string `json:"private_key,omitempty"`
}
type UploadKeyResponse struct {
@@ -47,6 +48,11 @@ type UploadKeyResponse struct {
type ServerCommand struct {
CommandId string `json:"command_id"`
GenerateKey *GenerateKeyCmd `json:"generate_key,omitempty"`
DeleteKey *DeleteKeyCmd `json:"delete_key,omitempty"`
}
type DeleteKeyCmd struct {
Label string `json:"label"`
}
type GenerateKeyCmd struct {