mirror of
https://github.com/getcompanion-ai/computer-host.git
synced 2026-04-15 05:02:05 +00:00
feat(contracts): add published ports, snapshot request, and storage report types
This commit is contained in:
parent
501ae2abd5
commit
26b5d2966d
20 changed files with 893 additions and 81 deletions
30
contract/published_ports.go
Normal file
30
contract/published_ports.go
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
package host
|
||||
|
||||
import "time"
|
||||
|
||||
type PublishedPortID string
|
||||
|
||||
type PublishedPort struct {
|
||||
ID PublishedPortID `json:"id"`
|
||||
MachineID MachineID `json:"machine_id"`
|
||||
Name string `json:"name,omitempty"`
|
||||
Port uint16 `json:"port"`
|
||||
HostPort uint16 `json:"host_port"`
|
||||
Protocol PortProtocol `json:"protocol"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
}
|
||||
|
||||
type CreatePublishedPortRequest struct {
|
||||
PublishedPortID PublishedPortID `json:"published_port_id"`
|
||||
Name string `json:"name,omitempty"`
|
||||
Port uint16 `json:"port"`
|
||||
Protocol PortProtocol `json:"protocol"`
|
||||
}
|
||||
|
||||
type CreatePublishedPortResponse struct {
|
||||
Port PublishedPort `json:"port"`
|
||||
}
|
||||
|
||||
type ListPublishedPortsResponse struct {
|
||||
Ports []PublishedPort `json:"ports"`
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue