#pragma once
#include "basemodule.h"
#include "oss_c_sdk/oss_api.h"
namespace module
{
	/// <summary>
	/// AliyunOSS
	/// </summary>
	class aliyun_oss :public module::base{
	public:
		aliyun_oss();
		~aliyun_oss() override;


		std::string updata(const std::string& endpoint,const std::string& access_key_id,const std::string& access_key_secret,const std::string& bucket_name,const std::string& object_name,const std::string_view& data);
		std::string upfile(const std::string& endpoint,const std::string& access_key_id,const std::string& access_key_secret,const std::string& bucket_name,const std::string& object_name,const std::string& filename,const std::string& content_type);
		static void regist(sol::state* lua);
	private:
		// 通过 imodule 继承
		virtual void regist_global(const char* name, sol::state* lua);
		virtual void delete_global() { delete this; }
	};
}

