-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
134 changed files
with
2,025 additions
and
1,070 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,4 +18,4 @@ | |
} | ||
] | ||
} | ||
} | ||
} |
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
7 changes: 7 additions & 0 deletions
7
...on/go/access_property_go/access_property_go_app/ten_packages/extension/extension_a/go.mod
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,7 @@ | ||
module extension_a | ||
|
||
go 1.18 | ||
|
||
replace ten_framework => ../../../ten_packages/system/ten_runtime_go/interface | ||
|
||
require ten_framework v0.0.0-00010101000000-000000000000 |
18 changes: 18 additions & 0 deletions
18
...ccess_property_go/access_property_go_app/ten_packages/extension/extension_a/manifest.json
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,18 @@ | ||
{ | ||
"type": "extension", | ||
"name": "extension_a", | ||
"version": "0.3.0-alpha", | ||
"dependencies": [ | ||
{ | ||
"type": "system", | ||
"name": "ten_runtime_go", | ||
"version": "0.3.0-alpha" | ||
} | ||
], | ||
"package": { | ||
"include": [ | ||
"**" | ||
] | ||
}, | ||
"api": {} | ||
} |
1 change: 1 addition & 0 deletions
1
...ccess_property_go/access_property_go_app/ten_packages/extension/extension_a/property.json
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 @@ | ||
{} |
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
11 changes: 11 additions & 0 deletions
11
tests/ten_runtime/integration/go/expired_ten_go/expired_ten_go_app/go.mod
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,11 @@ | ||
module app | ||
|
||
go 1.20 | ||
|
||
replace ten_framework => ./ten_packages/system/ten_runtime_go/interface | ||
|
||
replace go_common_dep => ./go_common_dep | ||
|
||
require ten_framework v0.0.0-00010101000000-000000000000 | ||
|
||
require go_common_dep v0.0.0-00010101000000-000000000000 |
3 changes: 3 additions & 0 deletions
3
tests/ten_runtime/integration/go/expired_ten_go/expired_ten_go_app/go_common_dep/go.mod
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,3 @@ | ||
module go_common_dep | ||
|
||
go 1.18 |
6 changes: 6 additions & 0 deletions
6
.../ten_runtime/integration/go/expired_ten_go/expired_ten_go_app/go_common_dep/types/data.go
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,6 @@ | ||
package types | ||
|
||
type UserData struct { | ||
Uid int | ||
Name string | ||
} |
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
11 changes: 11 additions & 0 deletions
11
...ntegration/go/expired_ten_go/expired_ten_go_app/ten_packages/extension/extension_a/go.mod
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,11 @@ | ||
module extension_a | ||
|
||
go 1.18 | ||
|
||
replace ten_framework => ../../../ten_packages/system/ten_runtime_go/interface | ||
|
||
replace go_common_dep => ../../../go_common_dep | ||
|
||
require ten_framework v0.0.0-00010101000000-000000000000 | ||
|
||
require go_common_dep v0.0.0-00010101000000-000000000000 |
18 changes: 18 additions & 0 deletions
18
...ion/go/expired_ten_go/expired_ten_go_app/ten_packages/extension/extension_a/manifest.json
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,18 @@ | ||
{ | ||
"type": "extension", | ||
"name": "extension_a", | ||
"version": "0.3.0-alpha", | ||
"dependencies": [ | ||
{ | ||
"type": "system", | ||
"name": "ten_runtime_go", | ||
"version": "0.3.0-alpha" | ||
} | ||
], | ||
"package": { | ||
"include": [ | ||
"**" | ||
] | ||
}, | ||
"api": {} | ||
} |
1 change: 1 addition & 0 deletions
1
...ion/go/expired_ten_go/expired_ten_go_app/ten_packages/extension/extension_a/property.json
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 @@ | ||
{} |
55 changes: 55 additions & 0 deletions
55
...tion/go/expired_ten_go/expired_ten_go_app/ten_packages/extension/extension_b/extension.go
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,55 @@ | ||
// | ||
// Copyright © 2024 Agora | ||
// This file is part of TEN Framework, an open source project. | ||
// Licensed under the Apache License, Version 2.0, with certain conditions. | ||
// Refer to https://github.com/TEN-framework/ten_framework/LICENSE for more | ||
// information. | ||
// | ||
|
||
package default_extension_go | ||
|
||
import ( | ||
"fmt" | ||
|
||
"go_common_dep/types" | ||
"ten_framework/ten" | ||
) | ||
|
||
type extensionB struct { | ||
ten.DefaultExtension | ||
} | ||
|
||
func newExtensionB(name string) ten.Extension { | ||
return &extensionB{} | ||
} | ||
|
||
func (p *extensionB) OnCmd( | ||
tenEnv ten.TenEnv, | ||
cmd ten.Cmd, | ||
) { | ||
go func() { | ||
fmt.Println("extensionB OnCmd") | ||
|
||
cmdName, _ := cmd.GetName() | ||
if cmdName == "B" { | ||
data := types.UserData{Uid: 1, Name: "ten"} | ||
cs, _ := ten.NewCmdResult(ten.StatusCodeOk) | ||
cs.SetProperty("data", &data) | ||
err := tenEnv.ReturnResult(cs, cmd) | ||
if err != nil { | ||
panic(err) | ||
} | ||
} | ||
}() | ||
} | ||
|
||
func init() { | ||
// Register addon | ||
err := ten.RegisterAddonAsExtension( | ||
"extension_b", | ||
ten.NewDefaultExtensionAddon(newExtensionB), | ||
) | ||
if err != nil { | ||
fmt.Println("register addon failed", err) | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...ntegration/go/expired_ten_go/expired_ten_go_app/ten_packages/extension/extension_b/go.mod
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,11 @@ | ||
module extension_b | ||
|
||
go 1.18 | ||
|
||
replace ten_framework => ../../../ten_packages/system/ten_runtime_go/interface | ||
|
||
replace go_common_dep => ../../../go_common_dep | ||
|
||
require ten_framework v0.0.0-00010101000000-000000000000 | ||
|
||
require go_common_dep v0.0.0-00010101000000-000000000000 |
18 changes: 18 additions & 0 deletions
18
...ion/go/expired_ten_go/expired_ten_go_app/ten_packages/extension/extension_b/manifest.json
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,18 @@ | ||
{ | ||
"type": "extension", | ||
"name": "extension_b", | ||
"version": "0.3.0-alpha", | ||
"dependencies": [ | ||
{ | ||
"type": "system", | ||
"name": "ten_runtime_go", | ||
"version": "0.3.0-alpha" | ||
} | ||
], | ||
"package": { | ||
"include": [ | ||
"**" | ||
] | ||
}, | ||
"api": {} | ||
} |
1 change: 1 addition & 0 deletions
1
...ion/go/expired_ten_go/expired_ten_go_app/ten_packages/extension/extension_b/property.json
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 @@ | ||
{} |
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
Oops, something went wrong.