Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Larky Third Party Applications #49

Open
mjallday opened this issue Feb 19, 2021 · 1 comment
Open

Larky Third Party Applications #49

mjallday opened this issue Feb 19, 2021 · 1 comment
Labels
enhancement Enhance functionality in Starlarky

Comments

@mjallday
Copy link
Contributor

Proposing an interface for calling third party operations made available via the marketplace.

Assuming we provision an application that provides an operation for virus scanning we can invoke like this

Given an application defined like (see marketplace spec)

apiVersion: 1.0.0
kind: App
data:
  fqn: myCompany/virusScanner

and it has been provisioned onto a vault, it would become available to be invoked via larky like so:

# namespace/app-name/function-name
@loads('myCompany/virusScanner/scan')
def process(input, ctx):
    result = myCompany.virusScanner.scan(input, ctx)
    # do something with result
    if result.hasVirus:
       return abort(400, 'You have a virus')
    return input

Local development can be enabled by the app providing a basic mocked request/response that allows integrators to receive a static response without running a stand-alone server in their local environment.

We would need to publish a basic request/response somehow so that the api for the method call is available to the developer.

@mjallday mjallday added the enhancement Enhance functionality in Starlarky label Feb 19, 2021
@mahmoudimus
Copy link
Contributor

@mjallday did this get resolved with #71 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhance functionality in Starlarky
Projects
None yet
Development

No branches or pull requests

2 participants