Skip to content

Commit

Permalink
solve
Browse files Browse the repository at this point in the history
  • Loading branch information
Allan-Nava authored Jun 25, 2024
1 parent aa7544e commit e59e56c
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 3 deletions.
4 changes: 2 additions & 2 deletions compress/api_restreamer.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (o *compress) GetRestreamers(startFrom int, amount int) ([]Restreamer, erro
* @param {number} amount
* @returns restreamer list
*/
func (o *compress) GetRestreamersOttAll(startFrom int, amount int) ([]Restreamer, error) {
func (o *compress) GetRestreamersOttAll(startFrom int, amount int) ([]RestreamersOTTResponse, error) {
//requestBody := BaseModel{ClientId: o.GetCliendId(), ApiKey: o.apiKey}
requestBody := &findRestreamersRequest{
BaseModel: BaseModel{ClientId: o.GetCliendId(), ApiKey: o.apiKey},
Expand All @@ -67,7 +67,7 @@ func (o *compress) GetRestreamersOttAll(startFrom int, amount int) ([]Restreamer
if resp.IsError() {
return nil, fmt.Errorf("restreamers error")
}
var obj []Restreamer
var obj []RestreamersOTTResponse
if err := json.Unmarshal(resp.Body(), &obj); err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion compress/compress.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type ICompress interface {
GetCategories() ([]Category, error)
CreateCategory(name string) (*Category, error)
GetRestreamers(startFrom int, amount int) ([]Restreamer, error) // startFrom int, amount int
GetRestreamersOttAll(startFrom int, amount int) ([]Restreamer, error) // startFrom int, amount int
GetRestreamersOttAll(startFrom int, amount int) ([]RestreamersOTTResponse, error) // startFrom int, amount int
GetSingleRestreamer(instanceName string) (*Restreamer, error)
ScaleRestreamer(instanceName string, scale int) (*ResponseServer, error)
CreateEventsBulk(request []InstancesEventCreate) (*ResponseServer, error)
Expand Down
43 changes: 43 additions & 0 deletions compress/model_restreamer.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,49 @@ type Restreamer struct {
}


type RestreamersOTTResponse struct {
Instances []RestreamerOTT `json:"instances"`
}

type RestreamerOTT struct {
ID int64 `json:"id"`
Enabled int64 `json:"enabled"`
Name string `json:"name"`
CustomerID int64 `json:"customer_id"`
Dnsname string `json:"dnsname"`
MarathonURL string `json:"marathon_url"`
NpmURL string `json:"npm_url"`
ExternalRtmp string `json:"external_rtmp"`
LoopbackRtmp LoopbackRtmp `json:"loopback_rtmp"`

Check failure on line 55 in compress/model_restreamer.go

View workflow job for this annotation

GitHub Actions / build (1.20.x)

undefined: LoopbackRtmp

Check failure on line 55 in compress/model_restreamer.go

View workflow job for this annotation

GitHub Actions / build (1.20.x)

undefined: LoopbackRtmp

Check failure on line 55 in compress/model_restreamer.go

View workflow job for this annotation

GitHub Actions / build (1.21.x)

undefined: LoopbackRtmp
Md5Generator interface{} `json:"md5_generator"`
MarathonPath MarathonPath `json:"marathon_path"`

Check failure on line 57 in compress/model_restreamer.go

View workflow job for this annotation

GitHub Actions / build (1.20.x)

undefined: MarathonPath

Check failure on line 57 in compress/model_restreamer.go

View workflow job for this annotation

GitHub Actions / build (1.20.x)

undefined: MarathonPath

Check failure on line 57 in compress/model_restreamer.go

View workflow job for this annotation

GitHub Actions / build (1.21.x)

undefined: MarathonPath
Token string `json:"token"`
DockerTemplate string `json:"docker_template"`
Status int64 `json:"status"`
Owner string `json:"owner"`
Title string `json:"title"`
Description string `json:"description"`
OwnerID int64 `json:"owner_id"`
CDNPath string `json:"cdn_path"`
ExtendedData string `json:"extended_data"`
LatestEvent string `json:"latest_event"`
Label string `json:"label"`
Dedicated string `json:"dedicated"`
StaticIP string `json:"static_ip"`
NvidiaVisibleDevices string `json:"nvidia_visible_devices"`
Transcode int64 `json:"transcode"`
UpdateAt time.Time `json:"update_at"`
PassiveToken string `json:"passive_token"`
Zone string `json:"zone"`
Protocol string `json:"protocol"`
AwsURL string `json:"aws_url"`
DRMHLSURL string `json:"drm_hls_url"`
DRMDashURL string `json:"drm_dash_url"`
Settings RestreamerSettings `json:"settings"`
Srt *RestreamerSrt `json:"srt"`
}


type RestreamerSettings struct {
Id int `json:"id" `
EnableEncoding int `json:"enable_encoding" `
Expand Down

0 comments on commit e59e56c

Please sign in to comment.