Code Monkey home page Code Monkey logo

lua-resty-ks3's Introduction

lua-resty-ks3

金山云 ks3 lua sdk,基于openresty

使用方法

local resty_ks3 = require "resty.ks3.ks3"

local accessKey	  =   "your accessKey";
local secretKey	  =   "your secretKey";
local bucket      =   "your bucket",

local opts = {
    endpoint = 'your ks3 endpoint',
    timeout  = 'request timeout',
}

local key_name = 'your key name'

local client, err_code, err_msg = resty_ks3.new(bucket, ak, sk, opts)
if err_code == nil then
    local _
     _, err_code, err_msg = client:delete_object(key_name)
end

if err_code ~= nil then
    ngx.log(ngx.ERR, to_str('delete ks3 file error. key_name:',
        key_name, ', err_code:', err_code, ', err_msg:', err_msg))

    return nil, 'DeleteKS3Error', err_msg
end

已实现方法

  • delete_object     删除文件

TODO

完整实现所有api,参考金山云 ks3 API文档

基本功能是没有问题的,欢迎使用

lua-resty-ks3's People

Contributors

pengsven avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.