Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
N
node-bigstream
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bs
node-bigstream
Commits
4914822e
Commit
4914822e
authored
Jun 02, 2017
by
project
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
1fb3f873
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
4 deletions
+30
-4
binarystream_v1_1.js
lib/bss/binarystream_v1_1.js
+4
-0
response.js
lib/ws/response.js
+5
-0
main.js
storage-service/main.js
+1
-1
service-object.js
storage-service/ws/v0.1/service-object.js
+20
-3
No files found.
lib/bss/binarystream_v1_1.js
View file @
4914822e
...
...
@@ -23,6 +23,10 @@ const STRING_TYPE = 1;
const
BINARY_TYPE
=
2
;
const
OBJECT_TYPE
=
3
;
module
.
exports
.
STRING_TYPE
=
STRING_TYPE
;
module
.
exports
.
BINARY_TYPE
=
BINARY_TYPE
;
module
.
exports
.
OBJECT_TYPE
=
OBJECT_TYPE
;
module
.
exports
.
format
=
function
(
filename
,
opt
,
cb
){
var
options
=
{};
if
(
typeof
opt
==
'function'
){
...
...
lib/ws/response.js
View file @
4914822e
...
...
@@ -41,6 +41,11 @@ responseHelper.prototype.setLastModified = function(lm){
responseHelper
.
prototype
.
responseOK
=
responseResult
;
responseHelper
.
prototype
.
type
=
function
(
tpy
)
{
this
.
response
.
type
(
tpy
);
}
responseHelper
.
prototype
.
write
=
function
(
data
)
{
this
.
response
.
write
(
data
);
...
...
storage-service/main.js
View file @
4914822e
...
...
@@ -25,7 +25,7 @@ var SS = function StorageService(cfg)
SS
.
prototype
.
start
=
function
()
{
console
.
log
(
'Starting Storage Service ...
\
n'
);
this
.
amqp_start
();
//
this.amqp_start();
this
.
http_start
();
}
...
...
storage-service/ws/v0.1/service-object.js
View file @
4914822e
...
...
@@ -31,6 +31,8 @@ router.get('/:id/data',function (req, res) {
var
opt
=
{
'field'
:
'data'
}
opt
.
filetype
=
(
query
.
filetype
)?
query
.
filetype
:
null
get_object
(
reqHelper
,
respHelper
,{
'oid'
:
oid
,
'opt'
:
opt
});
});
...
...
@@ -98,7 +100,7 @@ function get_object(reqHelper,respHelper,prm)
function
output
(
resp
,
obj
,
opt
)
{
if
(
opt
.
fi
le
d
==
'data'
)
if
(
opt
.
fi
el
d
==
'data'
)
{
data_out
(
resp
,
obj
,
opt
);
}
else
{
...
...
@@ -117,8 +119,23 @@ function obj_out(resp,obj,opt)
function
data_out
(
resp
,
obj
,
opt
)
{
var
objType
=
obj
.
header
;
resp
.
responseOK
(
objType
);
var
objType
=
obj
.
header
.
TY
;
if
(
objType
==
BinStream
.
BINARY_TYPE
){
if
(
opt
.
filetype
){
resp
.
response
.
type
(
opt
.
filetype
);
}
else
{
}
resp
.
response
.
send
(
obj
.
data
);
//resp.endOK();
}
else
if
(
objType
==
BinStream
.
STRING_TYPE
){
resp
.
response
.
send
(
obj
.
data
);
}
else
{
resp
.
responseOK
(
obj
.
data
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment