增加OSS
This commit is contained in:
26
target/aliyunoss.lua
Normal file
26
target/aliyunoss.lua
Normal file
@@ -0,0 +1,26 @@
|
||||
local aliyun_oss = {}
|
||||
aliyun_oss.__index = aliyun_oss
|
||||
|
||||
--[[
|
||||
创建一个新的 aliyun_oss 对象
|
||||
@return 返回一个新的 aliyun_oss 对象
|
||||
]]
|
||||
function aliyun_oss.new(db)
|
||||
local instance = setmetatable({}, aliyun_oss)
|
||||
if db == nil then
|
||||
instance.module = fw_aliyunoss.new()
|
||||
else
|
||||
instance.module = db
|
||||
end
|
||||
|
||||
return instance
|
||||
end
|
||||
|
||||
function aliyun_oss:put(endpoint,access_key_id, access_key_secret,bucket_name,object_name,data)
|
||||
return self.module:put(endpoint,access_key_id, access_key_secret,bucket_name,object_name,data)
|
||||
end
|
||||
function aliyun_oss:self()
|
||||
return self.module:self()
|
||||
end
|
||||
|
||||
return aliyun_sdk
|
||||
@@ -1,30 +1,30 @@
|
||||
local aliyun_sdk = {}
|
||||
aliyun_sdk.__index = aliyun_sdk
|
||||
|
||||
--[[
|
||||
创建一个新的 fw_aliyun_sdk 对象
|
||||
@return 返回一个新的 fw_aliyun_sdk 对象
|
||||
]]
|
||||
function aliyun_sdk.new(db)
|
||||
local instance = setmetatable({}, aliyun_sdk)
|
||||
if db == nil then
|
||||
instance.module = fw_aliyunsdk.new()
|
||||
else
|
||||
instance.module = db
|
||||
end
|
||||
|
||||
return instance
|
||||
end
|
||||
|
||||
function aliyun_sdk:set(access_key_id, access_key_secret)
|
||||
return self.module:set(access_key_id, access_key_secret)
|
||||
end
|
||||
|
||||
function aliyun_sdk:exec(domain, version, parameter)
|
||||
return self.module:exec(domain, version, parameter)
|
||||
end
|
||||
function aliyun_sdk:self()
|
||||
return self.module:self()
|
||||
end
|
||||
|
||||
return aliyun_sdk
|
||||
local aliyun_sdk = {}
|
||||
aliyun_sdk.__index = aliyun_sdk
|
||||
|
||||
--[[
|
||||
创建一个新的 fw_aliyun_sdk 对象
|
||||
@return 返回一个新的 fw_aliyun_sdk 对象
|
||||
]]
|
||||
function aliyun_sdk.new(db)
|
||||
local instance = setmetatable({}, aliyun_sdk)
|
||||
if db == nil then
|
||||
instance.module = fw_aliyunsdk.new()
|
||||
else
|
||||
instance.module = db
|
||||
end
|
||||
|
||||
return instance
|
||||
end
|
||||
|
||||
function aliyun_sdk:set(access_key_id, access_key_secret)
|
||||
return self.module:set(access_key_id, access_key_secret)
|
||||
end
|
||||
|
||||
function aliyun_sdk:exec(domain, version, parameter)
|
||||
return self.module:exec(domain, version, parameter)
|
||||
end
|
||||
function aliyun_sdk:self()
|
||||
return self.module:self()
|
||||
end
|
||||
|
||||
return aliyun_sdk
|
||||
|
||||
Reference in New Issue
Block a user