GitHub

Classes

Templates

Rio Classes are defined in template files. A template looks like this:

init: index.init
getState: index.getState
authorizer: index.authorizer
methods:
  - method: sayHello
    inputModel: SayHelloInput
    tag: test
    type: READ
    handler: index.sayHello

API Reference

ParameterTypeRequiredDescription
architecturestring (arm64, x86_64)falseArchitecture for methods. Default value is arm64 which is faster.
acceleratedbooleanfalseFlag to decide whether to cache instances or not
authorizerstringfalseDelegate method for authorization. (filename.methodName)
destroystringfalseDelegate method for approving instance deletion. (filename.methodName)
initstringfalseDelegate method for constructor. (filename.methodName)
getstringfalseDelegate method for getting existing instances. (filename.methodName)
getInstanceIdstringfalseDelegate method for generating custom instanceId
getStatestringfalseDelegate method for returning states conditionally
dependenciesstring[]falseCustom dependencies to use in deployment
destinationsstring[]falseCustom destinations to use on state changes
methodsMethod[]falseMethod definitions
descriptionstringfalseDescription to put into the auto-generated documentation.

Handler Model

Most of Rio's delegate methods accept Handler model as well as they accept source code strings.

ParameterTypeRequiredDescription
handlerstringtrueHandler method's path. (filename.methodName)
queryStringModelstringfalseName of the validation model for query strings
inputModelstringfalseName of the validation model for input body
outputModelstringfalseName of the validation model for output body
errorModelstringfalseName of the validation model for error response

Method Model

ParameterTypeRequiredDescription
methodstringtrueName of the method
typeREAD, STATIC, WRITE, QUEUED_WRITEfalseType of the method. Default is WRITE.
descriptionstringfalseDescription to put into the auto-generated documentation.
queryStringModelstringfalseName of the validation model for query strings
inputModelstringfalseName of the validation model for input body
outputModelstringfalseName of the validation model for output body
errorModelstringfalseName of the validation model for error response
methodGroupIdstringfalseExpression to dissociate fifo queues in method-scope
handlerstringtrueHandler method's path. (filename.methodName)
schedulestringfalseSchedule rule. It's only available for STATIC methods.
Previous
The Concept