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
AWSTemplateFormatVersion: "2010-09-09" | |
Transform: AWS::Serverless-2016-10-31 | |
Description: AWS Lambda Hello World Ballerina | |
Globals: | |
Function: | |
Timeout: 10 | |
Resources: | |
HelloWorldFunction: | |
Type: AWS::Serverless::Function | |
Properties: |
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
import ballerinax/awslambda; | |
@awslambda:Function | |
public function sayHello(awslambda:Context ctx, json input) returns json|error { | |
return "Hello World!"; | |
} |
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
@echo off | |
REM --------------------------------------------------------------------------- | |
REM Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. | |
REM | |
REM Licensed under the Apache License, Version 2.0 (the "License"); | |
REM you may not use this file except in compliance with the License. | |
REM You may obtain a copy of the License at | |
REM | |
REM http://www.apache.org/licenses/LICENSE-2.0 |
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
FROM openjdk:8u201-jdk-nanoserver-sac2016 | |
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] | |
LABEL maintainer="dev@ballerina.io" | |
ARG BALLERINA_DIST | |
RUN New-Item -path C:\ -name "ballerina" -type directory | Out-Null; | |
RUN New-Item -path C:\ -name "tmp" -type directory | Out-Null; |
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
// Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. | |
// | |
// WSO2 Inc. licenses this file to you under the Apache License, | |
// Version 2.0 (the "License"); you may not use this file except | |
// in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, |
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
import ballerina/http; | |
import ballerina/log; | |
import ballerinax/kubernetes; | |
import ballerinax/openshift; | |
@openshift:Route { | |
host: "www.got-quote.com" | |
} | |
@kubernetes:Service {} | |
listener http:Listener gotServiceEP = new(9090); // ballerina service endpoint |
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
import ballerina/http; | |
import ballerina/log; | |
listener http:Listener gotServiceEP = new(9090); // ballerina service endpoint | |
http:Client gotQuoteAPI = new("https://got-quotes.herokuapp.com/quotes"); // game of thrones API endpoint | |
@http:ServiceConfig { | |
basePath: "/got" // basepath for my service | |
} | |
service gotService on gotServiceEP { |
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
swagger: '2.0' | |
info: | |
version: 1.0.0 | |
title: PackagingService | |
basePath: /p | |
paths: | |
'/{orgName}/{packageName}/{packageVersion}': | |
get: | |
operationId: handlePullRequest | |
parameters: |
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
<?php | |
echo "Arrays" . "\xA"; | |
// Arrays | |
$cars = array("Volvo","BMW","Toyota"); | |
$cars2 = array("Volvo","BMW","Toyota"); | |
$cars3 = array("Nissan","e","8"); | |
var_dump($cars === $cars); | |
var_dump($cars === $cars2); | |
var_dump($cars === $cars3); |