Documentation
¶
Index ¶
- type APIClient
- func (c *APIClient) ApproveAccessRequest(requestID, reviewerID string) error
- func (c *APIClient) CreateAccessRequest(request map[string]interface{}) (*AccessRequest, error)
- func (c *APIClient) GetAccessRequest(requestID string) (*AccessRequest, error)
- func (c *APIClient) GetMachineByName(name string) (*Machine, error)
- func (c *APIClient) ListMachines() ([]Machine, error)
- func (c *APIClient) ListPendingAccessRequests() ([]AccessRequest, error)
- func (c *APIClient) RejectAccessRequest(requestID, reviewerID string) error
- type AccessRequest
- type Machine
- type SCPClient
- type SSHClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIClient ¶ added in v0.3.0
type APIClient struct {
// contains filtered or unexported fields
}
APIClient handles REST API communication with the Orion-Belt server
func NewAPIClient ¶ added in v0.3.0
func NewAPIClient(baseURL, username string, signer ssh.Signer, logger *common.Logger) (*APIClient, error)
NewAPIClient creates a new API client with authentication
func (*APIClient) ApproveAccessRequest ¶ added in v0.3.0
ApproveAccessRequest approves an access request (admin only)
func (*APIClient) CreateAccessRequest ¶ added in v0.3.0
func (c *APIClient) CreateAccessRequest(request map[string]interface{}) (*AccessRequest, error)
CreateAccessRequest creates a new access request
func (*APIClient) GetAccessRequest ¶ added in v0.3.0
func (c *APIClient) GetAccessRequest(requestID string) (*AccessRequest, error)
GetAccessRequest retrieves an access request by ID
func (*APIClient) GetMachineByName ¶ added in v0.3.0
GetMachineByName retrieves a machine by its name
func (*APIClient) ListMachines ¶ added in v0.3.0
ListMachines retrieves all available machines
func (*APIClient) ListPendingAccessRequests ¶ added in v0.3.0
func (c *APIClient) ListPendingAccessRequests() ([]AccessRequest, error)
ListPendingAccessRequests retrieves all pending access requests (admin only)
func (*APIClient) RejectAccessRequest ¶ added in v0.3.0
RejectAccessRequest rejects an access request (admin only)
type AccessRequest ¶ added in v0.3.0
type AccessRequest struct {
ID string `json:"id"`
UserID string `json:"user_id"`
MachineID string `json:"machine_id"`
RemoteUsers []string `json:"remote_users"`
Reason string `json:"reason"`
Duration int `json:"duration"`
Status string `json:"status"`
RequestedAt time.Time `json:"requested_at"`
ReviewedAt *time.Time `json:"reviewed_at"`
ReviewedBy *string `json:"reviewed_by"`
ExpiresAt *time.Time `json:"expires_at"`
}
AccessRequest represents an access request from the API
type Machine ¶ added in v0.3.0
type Machine struct {
ID string `json:"id"`
Name string `json:"name"`
Hostname string `json:"hostname"`
Port int `json:"port"`
Tags map[string]string `json:"tags"`
AgentID string `json:"agent_id"`
IsActive bool `json:"is_active"`
LastSeenAt *time.Time `json:"last_seen_at"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
Machine represents a machine from the API
type SCPClient ¶
type SCPClient struct {
// contains filtered or unexported fields
}
SCPClient represents an Orion-Belt SCP client
func NewSCPClient ¶
NewSCPClient creates a new SCP client
type SSHClient ¶
type SSHClient struct {
// contains filtered or unexported fields
}
SSHClient represents an Orion-Belt SSH client
func NewSSHClient ¶
NewSSHClient creates a new SSH client
func (*SSHClient) ListMachines ¶
ListMachines lists available machines