api: payload + go mod

This commit is contained in:
Krisna Pranav
2023-04-15 16:51:03 +05:30
parent a7cac0b335
commit 2343c7097b
2 changed files with 21 additions and 0 deletions

18
api/payload.go Normal file
View File

@@ -0,0 +1,18 @@
package api
type newSessionRequest struct {
Offer string `json:"offer"`
Screen int `json:"screen"`
}
type newSessionResponse struct {
Answer string `json:"answer"`
}
type screenPayload struct {
Index int `json:"index"`
}
type screensResponse struct {
Screens []screenPayload `json:"screens"`
}

3
go.mod Normal file
View File

@@ -0,0 +1,3 @@
module github.com/krishpranav/remote-desktop
go 1.19