-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from guilherme-marcello/jgc/organize-requests-p…
…ackage Organize requests package
- Loading branch information
Showing
8 changed files
with
159 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package requests | ||
|
||
import ( | ||
"github.com/guilherme-marcello/janus/elements" | ||
) | ||
|
||
type MODEL_LIST_RECORDPLAY struct { | ||
Janus string `json:"janus"` | ||
SessionID int64 `json:"session_id"` | ||
Transaction string `json:"transaction"` | ||
Sender int64 `json:"sender"` | ||
Plugindata struct { | ||
Plugin string `json:"plugin"` | ||
Data struct { | ||
Recordplay string `json:"recordplay"` | ||
List []elements.Recording `json:"list"` | ||
} `json:"data"` | ||
} `json:"plugindata"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package requests | ||
|
||
import ( | ||
"github.com/guilherme-marcello/janus/elements" | ||
) | ||
|
||
type MODEL_LIST_STREAMING struct { | ||
Janus string `json:"janus"` | ||
SessionID int64 `json:"session_id"` | ||
Transaction string `json:"transaction"` | ||
Sender int64 `json:"sender"` | ||
Plugindata struct { | ||
Plugin string `json:"plugin"` | ||
Data struct { | ||
Streaming string `json:"streaming"` | ||
List []elements.Mountpoint `json:"list"` | ||
} `json:"data"` | ||
} `json:"plugindata"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
package requests | ||
|
||
import ( | ||
"github.com/google/uuid" | ||
) | ||
|
||
type MODEL_CREATE_SESSION struct { | ||
Janus string `json:"janus"` | ||
Transaction string `json:"transaction"` | ||
Data struct { | ||
ID int64 `json:"id"` | ||
} `json:"data"` | ||
} | ||
|
||
func CREATE_SESSION() map[string]string { | ||
return map[string]string{ | ||
"janus": "create", "transaction": uuid.New().String(), | ||
} | ||
} | ||
|
||
type MODEL_DESTROY_SESSION struct { | ||
Janus string `json:"janus"` | ||
SessionID int64 `json:"session_id"` | ||
Transaction string `json:"transaction"` | ||
} | ||
|
||
func DESTROY_SESSION() map[string]string { | ||
return map[string]string{ | ||
"janus": "destroy", "transaction": uuid.New().String(), | ||
} | ||
} | ||
|
||
type MODEL_KEEPALIVE_SESSION struct { | ||
Janus string `json:"janus"` | ||
SessionID int64 `json:"session_id"` | ||
Transaction string `json:"transaction"` | ||
} | ||
|
||
func KEEPALIVE_SESSION() map[string]string { | ||
return map[string]string{ | ||
"janus": "keepalive", "transaction": uuid.New().String(), | ||
} | ||
} | ||
|
||
type MODEL_ATTACH_PLUGIN struct { | ||
Janus string `json:"janus"` | ||
SessionID int64 `json:"session_id"` | ||
Transaction string `json:"transaction"` | ||
Data struct { | ||
ID int64 `json:"id"` | ||
} `json:"data"` | ||
} | ||
|
||
func ATTACH_PLUGIN(pluginName string) map[string]string { | ||
return map[string]string{ | ||
"janus": "attach", "transaction": uuid.New().String(), | ||
"plugin": pluginName, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters