-
Notifications
You must be signed in to change notification settings - Fork 96
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
14 changed files
with
1,038 additions
and
25 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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
'use strict'; | ||
|
||
const comment = require('./comment'); | ||
|
||
|
||
module.exports = { | ||
getNotes: comment.getBetweenComments | ||
}; |
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,5 @@ | ||
{ | ||
"libraries": { | ||
"OSS": "./oss.dara" | ||
} | ||
} |
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,83 @@ | ||
import OSS; | ||
import './util.dara' Util; | ||
|
||
|
||
@input('call'); | ||
model CallRequest extends OSS.File { | ||
size: number, | ||
} | ||
|
||
@output('call'); | ||
model CallResponse { | ||
size: number, | ||
} | ||
|
||
init(); | ||
|
||
@error([Util.MainFileError, Util.ExtendFileError, Util.ExtendSubFileError]) | ||
@returnMode({ | ||
aliasName = "execTaskAsync", | ||
async = true, | ||
callback = callback, | ||
interval= 3, | ||
times = 10, | ||
input = data.size, | ||
}) | ||
static function call(data: CallRequest): CallResponse { | ||
@go('fmt.printv("%v", data)'); | ||
if(data.size > 100) { | ||
throw new Util.MainFileError{ | ||
name = 'name', | ||
size = 100, | ||
}; | ||
} else if (data.size == 100){ | ||
throw new Util.ExtendFileError{ | ||
code = 'name', | ||
size = 100, | ||
}; | ||
} else if (data.size == 50){ | ||
throw new Util.ExtendSubFileError{ | ||
name = 'name', | ||
size = 100, | ||
}; | ||
} | ||
return new CallResponse { | ||
size = data.size, | ||
}; | ||
} | ||
|
||
|
||
|
||
@paginated({ | ||
aliasName = "getUsersPaginated", | ||
policy = "token", | ||
maxItemsDefault = 20, | ||
totalCount = 100, | ||
inputToken = req.nextToken, | ||
outputToken = resp.nextToken, | ||
maxItems = req.maxResults, | ||
maxItemsDefault = 20, | ||
pageTruncated = resp.truncated, | ||
totalCount = 100, | ||
items = resp.replicaPairs, | ||
}) | ||
async function callback(size: number) throws: void{ | ||
var req = { | ||
nextToken = '123', | ||
maxResults = 100, | ||
}; | ||
|
||
var resp = { | ||
nextToken = '321', | ||
truncated = false, | ||
replicaPairs = 50 | ||
}; | ||
return; | ||
} | ||
|
||
@deprecated({ | ||
sub = callback, | ||
deprecatedTime = "2022-03-03", | ||
warning = "this is deprecated", | ||
}) | ||
async function test(size: number) : void; |
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,15 @@ | ||
|
||
model File = { | ||
name: string, | ||
}; | ||
|
||
exception FileError = { | ||
code: string, | ||
} | ||
|
||
model SubFile = { | ||
file: { | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import OSS | ||
|
||
model mainFile extends OSS.File { | ||
size: number, | ||
} | ||
|
||
exception MainFileError extends OSS.File { | ||
size: number, | ||
} | ||
|
||
exception ExtendFileError extends OSS.FileError { | ||
size: number, | ||
} | ||
|
||
exception ExtendSubFileError extends OSS.SubFile.file { | ||
size: number, | ||
} | ||
|
||
model ExtendSubFile extends OSS.SubFile.file { | ||
size: number, | ||
} |
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.