-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from VivoxaLabs/master
Update
- Loading branch information
Showing
4 changed files
with
44 additions
and
46 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
// This module is used for validating data. | ||
|
||
// ToDo: | ||
// Add validation methods for | ||
// String, Integer, Email Addr etc. | ||
|
||
import ballerina/io; | ||
|
||
|
||
// sample func, not implemeted yet | ||
public function isValidInteger() returns boolean { | ||
return true; | ||
} | ||
|
||
|
||
|
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,25 @@ | ||
import ballerina/http; | ||
import ballerina/io; | ||
|
||
import bal.validate; | ||
|
||
service hello on new http:Listener(9090) { | ||
|
||
resource function sayHello(http:Caller caller, http:Request request) { | ||
|
||
http:Response response = new; | ||
|
||
response.setTextPayload("Hello Ballerina!"); | ||
|
||
|
||
|
||
_ = caller -> respond(response); | ||
} | ||
} | ||
|
||
|
||
public function main() { | ||
|
||
// calling validator | ||
io:println(validate:isValidInteger()); | ||
} |
This file was deleted.
Oops, something went wrong.