npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ks3_internal

v0.4.0

Published

本代码库为`金山云存储KS3`服务.主要提供`KS3 nodejs SDK`和`命令行工具`.

Downloads

39

Readme

KS3-SDK-Nodejs

本代码库为金山云存储KS3服务.主要提供KS3 nodejs SDK命令行工具.

Build Status

Nodejs-sdk

安装

下载后安装

npm install

通过npm直接安装

npm install ks3

测试

请先安装 mocha

npm install -g mocha

然后进行测试

// 全部测试
mocha

// 指定自己ak,sk和bucket做测试
AK=$ak SK=$sk BUCKET=$bucket mocha

// 大文件(大于5M)上传测试
BIGFILE=$path mocha test/upload.js

// 文件夹上传测试
UPDIR=$path mocha test/upload.js

使用

var KS3 = require('ks3');
var client = new KS3(AK,SK);

api

以下调用详细信息,可以访问官方文档

ks3.service.get : 可以通过该操作来列出客户所有的 Bucket 信息

ks3.bucket.put : 创建一个新的Bucket

ks3.bucket.del : 删除指定Bucket

ks3.bucket.get : 枚举Bucket内的Object

ks3.bucket.head : 获取Bucket元数据

ks3.bucket.getACL : 获取Bucket的ACL

ks3.bucket.putACL : 设置Bucket的ACL

ks3.bucket.getLogging : 获得Bucket的日志信息

ks3.bucket.putLogging : 设置Bucket的日志信息

ks3.object.del : 删除指定Object

ks3.object.get : 下载该Object数据

ks3.object.put : 上传Object数据

ks3.object.getAcl : 获得Object的acl

ks3.object.putAcl : 上传Object的acl

ks3.object.headObject : 获取指定Object元数据

ks3.object.multitpart_upload_init : 调用这个接口会初始化一个分块上传并且返回一个upload id, upload id 用来标识属于当前object的具体的块,并且用来标识完成分块上传或者取消分块上传

ks3.object.upload_part : 初始化分块上传后,上传分块接口

ks3.object.upload_complete : 组装之前上传的块,然后完成分块上传。通过你提供的xml文件,进行分块组装。在xml文件中,块号必须使用升序排列。必须提供每个块的ETag值

ks3.object.upload_abort : 取消分块上传

ks3.object.upload_list_part : 罗列出已经上传的块

ks3.upload.start : 文件(文件夹)上传

ks3.download.start: 文件下载(分块下载)

ks3.auth.getQueryStringSignature : 计算通过URL QueryString发送的签名

ks3.auth.getFormSignature : 计算通过POST请求的表单实体发送的签名

ks3.auth.generateAuth : 计算通过请求头发送的签名/Token(Authorization请求头的值)

SDK方法详细介绍参见,SDK详细介绍

KS3

关于命令行工具,文档请查看 ./bin/readme.md,或者查看这里

功能包括上传文件和文件夹.上传过程中会根据文件大小进行简单上传和分块上传

如果大文件在上传过程中发生意外,限次上传文件的时候会从上次断开的地方续传.