@@ -39,3 +39,24 @@ type LoginResponse struct {
|
||||
PermissionManage bool `json:"permission_manage_agent"`
|
||||
PermissionAdmin bool `json:"permission_admin"`
|
||||
}
|
||||
|
||||
// RegistrationToken represents a one-time agent registration token.
|
||||
type RegistrationToken struct {
|
||||
ID int64 `json:"id"`
|
||||
Token string `json:"token"`
|
||||
Label string `json:"label"`
|
||||
Used bool `json:"used"`
|
||||
CreatedAt *string `json:"created_at"`
|
||||
UsedAt *string `json:"used_at"`
|
||||
}
|
||||
|
||||
// RegistrationRequest is the request body for creating a registration token.
|
||||
type RegistrationRequest struct {
|
||||
Label string `json:"label" binding:"required"`
|
||||
}
|
||||
|
||||
// RegistrationResponse is returned when an agent registers.
|
||||
type RegistrationResponse struct {
|
||||
CACert string `json:"ca_cert"`
|
||||
ClientCert string `json:"client_cert"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user