go-fastdfs/api.html
2019-11-28 14:40:34 +08:00

743 lines
21 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE HTML>
<html lang="" >
<head>
<meta charset="UTF-8">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>管理API · GitBook</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="description" content="">
<meta name="generator" content="GitBook 3.2.3">
<link rel="stylesheet" href="gitbook/style.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
<meta name="HandheldFriendly" content="true"/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
<link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
<link rel="next" href="QA.html" />
<link rel="prev" href="breakpoint.html" />
</head>
<body>
<div class="book">
<div class="book-summary">
<div id="book-search-input" role="search">
<input type="text" placeholder="Type to search" />
</div>
<nav role="navigation">
<ul class="summary">
<li class="chapter " data-level="1.1" data-path="./">
<a href="./#vision">
愿景
</a>
</li>
<li class="chapter " data-level="1.2" data-path="./">
<a href="./#background">
背景
</a>
<ul class="articles">
<li class="chapter " data-level="1.2.1" data-path="./">
<a href="./#what">
go-fastdfs是什么
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.3" data-path="./">
<a href="./#character">
特性
</a>
<ul class="articles">
<li class="chapter " data-level="1.3.1" data-path="./">
<a href="./#advantage">
go-fastdfs优点
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.4" data-path="install.html">
<a href="install.html">
安装
</a>
<ul class="articles">
<li class="chapter " data-level="1.4.1" data-path="install.html">
<a href="install.html#quick">
极速体验
</a>
</li>
<li class="chapter " data-level="1.4.2" data-path="install.html">
<a href="install.html#docker">
Docker体验
</a>
</li>
<li class="chapter " data-level="1.4.3" data-path="install.html">
<a href="install.html#compiler_install">
编译安装
</a>
</li>
<li class="chapter " data-level="1.4.4" data-path="install.html">
<a href="install.html#small-cluster">
小集群安装
</a>
</li>
<li class="chapter " data-level="1.4.5" data-path="install.html">
<a href="install.html#big-cluster">
海量集群安装(推荐)
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.5" data-path="authentication.html">
<a href="authentication.html">
认证
</a>
<ul class="articles">
<li class="chapter " data-level="1.5.1" data-path="authentication.html">
<a href="authentication.html#fingerprint">
按文件指纹认证
</a>
</li>
<li class="chapter " data-level="1.5.2" data-path="authentication.html">
<a href="authentication.html#google">
按google认证码认证
</a>
</li>
<li class="chapter " data-level="1.5.3" data-path="authentication.html">
<a href="authentication.html#custom">
用户自定义认证
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.6" data-path="usage.html">
<a href="usage.html">
语言"SDK"
</a>
<ul class="articles">
<li class="chapter " data-level="1.6.1" data-path="usage.html">
<a href="usage.html#description">
统一说明(重要)
</a>
</li>
<li class="chapter " data-level="1.6.2" data-path="usage.html">
<a href="usage.html#cmdline">
命令行上传
</a>
</li>
<li class="chapter " data-level="1.6.3" data-path="usage.html">
<a href="usage.html#web">
浏览器上传
</a>
</li>
<li class="chapter " data-level="1.6.4" data-path="usage.html">
<a href="usage.html#python">
Python语言
</a>
</li>
<li class="chapter " data-level="1.6.5" data-path="usage.html">
<a href="usage.html#go">
GO使用
</a>
</li>
<li class="chapter " data-level="1.6.6" data-path="usage.html">
<a href="usage.html#java">
Java语言
</a>
<ul class="articles">
<li class="chapter " data-level="1.6.6.1" data-path="usage.html">
<a href="usage.html#java-stream">
Java流上传
</a>
</li>
</ul>
</li>
</ul>
</li>
<li class="chapter " data-level="1.7" data-path="breakpoint.html">
<a href="breakpoint.html#go">
断点续传"SDK"
</a>
<ul class="articles">
<li class="chapter " data-level="1.7.1" data-path="breakpoint.html">
<a href="breakpoint.html#go">
GO
</a>
</li>
<li class="chapter " data-level="1.7.2" data-path="breakpoint.html">
<a href="breakpoint.html#js">
Javascript
</a>
</li>
</ul>
</li>
<li class="chapter active" data-level="1.8" data-path="api.html">
<a href="api.html">
管理API
</a>
</li>
<li class="chapter " data-level="1.9" data-path="QA.html">
<a href="QA.html">
问题汇总
</a>
<ul class="articles">
<li class="chapter " data-level="1.9.1" data-path="QA.html">
<a href="QA.html">
常见问题
</a>
</li>
<li class="chapter " data-level="1.9.2" data-path="QA.html">
<a href="QA.html">
维护问题
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.10" data-path="upgrade.html">
<a href="upgrade.html">
更新历史
</a>
</li>
<li class="divider"></li>
<li>
<a href="https://www.gitbook.com" target="blank" class="gitbook-link">
Published with GitBook
</a>
</li>
</ul>
</nav>
</div>
<div class="book-body">
<div class="body-inner">
<div class="book-header" role="navigation">
<!-- Title -->
<h1>
<i class="fa fa-circle-o-notch fa-spin"></i>
<a href="." >管理API</a>
</h1>
</div>
<div class="page-wrapper" tabindex="-1" role="main">
<div class="page-inner">
<div id="book-search-results">
<div class="search-noresults">
<section class="normal markdown-section">
<h2 id="api&#x901A;&#x7528;&#x8BF4;&#x660E;">API&#x901A;&#x7528;&#x8BF4;&#x660E;</h2>
<pre><code>&#x4E00;&#x3001;&#x7EDF;&#x4E00;&#x4F7F;&#x7528;POST&#x8BF7;&#x6C42;
&#x4E8C;&#x3001;&#x8FD4;&#x56DE;&#x683C;&#x5F0F;&#x7EDF;&#x4E00;&#x4E3A;json
&#x3000;&#x3000;&#x683C;&#x5F0F;&#x5982;&#x4E0B;
{
&quot;status&quot;:&quot;ok&quot;,
&quot;message&quot;:&quot;&quot;,
&quot;data&quot;:{}
}
&#x4E8C;&#x3001;url&#x4E2D;&#x7684;group&#x53EA;&#x6709;&#x5728;support_group_manage&#x8BBE;&#x7F6E;&#x4E3A;true&#x624D;&#x6709;&#x3002;
&#x4F8B;&#x5982;&#xFF1A;
http://10.1.5.9:8080/group/reload
&#x9ED8;&#x8BA4;&#xFF1A;
http://10.1.5.9:8080/reload
&#x8BF4;&#x660E;&#xFF1A;url&#x4E2D;&#x7684;group&#x4E3A;cfg.json&#x4E2D;&#x7684;group&#x53C2;&#x6570;&#x503C;&#x3002;
</code></pre><h2 id="&#x914D;&#x7F6E;&#x7BA1;&#x7406;api">&#x914D;&#x7F6E;&#x7BA1;&#x7406;API</h2>
<pre><code>http://10.1.5.9:8080/group/reload
&#x53C2;&#x6570;&#xFF1A;
action: set(&#x4FEE;&#x6539;&#x53C2;&#x6570;),get&#x83B7;&#x53D6;&#x53C2;&#x6570;,reload&#x91CD;&#x65B0;&#x52A0;&#x8F7D;&#x53C2;&#x6570;
cfg:json&#x53C2;&#x6570;&#x3000;&#x4E0E; action=set&#x914D;&#x5408;&#x5B8C;&#x6210;&#x53C2;&#x6570;&#x8BBE;&#x7F6E;
</code></pre><h2 id="&#x6587;&#x4EF6;&#x7EDF;&#x8BA1;&#x4FE1;&#x606F;api">&#x6587;&#x4EF6;&#x7EDF;&#x8BA1;&#x4FE1;&#x606F;API</h2>
<pre><code>http://10.1.50.90:8080/group/stat
</code></pre><h2 id="&#x6587;&#x4EF6;&#x4E0A;&#x4F20;api">&#x6587;&#x4EF6;&#x4E0A;&#x4F20;API</h2>
<pre><code>http://10.1.50.90:8080/group/upload
&#x53C2;&#x6570;&#xFF1A;
file:&#x4E0A;&#x4F20;&#x7684;&#x6587;&#x4EF6;
scene:&#x573A;&#x666F;
output:&#x8F93;&#x51FA;
path:&#x81EA;&#x5B9A;&#x4E49;&#x8DEF;&#x5F84;
&#x5177;&#x4F53;&#x8BF7;&#x53C2;&#x9605;&#x793A;&#x4F8B;&#x4EE3;&#x7801;&#xFF08;&#x7528;&#x6D4F;&#x89C8;&#x5668;&#x8BBF;&#x95EE;http://127.0.0.1:8080&#xFF09;
</code></pre><h2 id="&#x6587;&#x4EF6;&#x79D2;&#x4F20;">&#x6587;&#x4EF6;&#x79D2;&#x4F20;</h2>
<pre><code>http://10.1.50.90:8080/group/upload
&#x53C2;&#x6570;&#xFF1A;
md5:&#x6587;&#x4EF6;&#x7684;&#x6458;&#x8981;
&#x6458;&#x8981;&#x7B97;&#x6CD5;&#x8981;&#x4E0E;cfg.json&#x4E2D;&#x914D;&#x7F6E;&#x7684;&#x4E00;&#x6837;
&#x4F8B;&#x5B50;&#xFF1A;http://127.0.0.1:8080/upload?md5=430a71f5c5e093a105452819cc48cc9c&amp;output=json
</code></pre><h2 id="&#x6587;&#x4EF6;&#x5220;&#x9664;">&#x6587;&#x4EF6;&#x5220;&#x9664;</h2>
<pre><code>http://10.1.50.90:8080/group/delete
&#x53C2;&#x6570;&#xFF1A;
md5:&#x6587;&#x4EF6;&#x7684;&#x6458;&#x8981;&#xFF08;md5|sha1&#xFF09; &#x89C6;&#x914D;&#x7F6E;&#x5B9A;
path:&#x6587;&#x4EF6;&#x8DEF;&#x5F84;
md5&#x4E0E;path&#x4E8C;&#x9009;&#x4E00;
&#x8BF4;&#x660E;&#xFF1A;md5&#x6216;path&#x90FD;&#x662F;&#x4E0A;&#x4F20;&#x6587;&#x4EF6;&#x65F6;&#x8FD4;&#x56DE;&#x7684;&#x4FE1;&#x606F;&#xFF0C;&#x8981;&#x4EE5;json&#x65B9;&#x5F0F;&#x8FD4;&#x56DE;&#x624D;&#x80FD;&#x770B;&#x5230;&#xFF08;&#x53C2;&#x9605;&#x6D4F;&#x89C8;&#x5668;&#x4E0A;&#x4F20;&#xFF09;
http://127.0.0.1:8080/delete?md5=430a71f5c5e093a105452819cc48cc9c
</code></pre><h2 id="&#x6587;&#x4EF6;&#x4FE1;&#x606F;">&#x6587;&#x4EF6;&#x4FE1;&#x606F;</h2>
<pre><code>http://10.1.50.90:8080/group/get_file_info
&#x53C2;&#x6570;&#xFF1A;
md5:&#x6587;&#x4EF6;&#x7684;&#x6458;&#x8981;&#xFF08;md5|sha1&#xFF09; &#x89C6;&#x914D;&#x7F6E;&#x5B9A;
path:&#x6587;&#x4EF6;&#x8DEF;&#x5F84;
md5&#x4E0E;path&#x4E8C;&#x9009;&#x4E00;
&#x8BF4;&#x660E;&#xFF1A;md5&#x6216;path&#x90FD;&#x662F;&#x4E0A;&#x4F20;&#x6587;&#x4EF6;&#x65F6;&#x8FD4;&#x56DE;&#x7684;&#x4FE1;&#x606F;&#xFF0C;&#x8981;&#x4EE5;json&#x65B9;&#x5F0F;&#x8FD4;&#x56DE;&#x624D;&#x80FD;&#x770B;&#x5230;&#xFF08;&#x53C2;&#x9605;&#x6D4F;&#x89C8;&#x5668;&#x4E0A;&#x4F20;&#xFF09;
&#x4F8B;&#x5B50;&#xFF1A;http://127.0.0.1:8080/get_file_info?md5=430a71f5c5e093a105452819cc48cc9c
</code></pre><h2 id="&#x6587;&#x4EF6;&#x5217;&#x8868;">&#x6587;&#x4EF6;&#x5217;&#x8868;</h2>
<pre><code>http://10.1.50.90:8080/group/list_dir
&#x53C2;&#x6570;&#xFF1A;
dir&#xFF1A;&#x8981;&#x67E5;&#x770B;&#x6587;&#x4EF6;&#x5217;&#x8868;&#x7684;&#x76EE;&#x5F55;&#x540D;
&#x4F8B;&#x5B50;&#xFF1A;http://127.0.0.1:8080/list_dir?dir=default
</code></pre><h2 id="&#x4FEE;&#x590D;&#x7EDF;&#x8BA1;&#x4FE1;&#x606F;">&#x4FEE;&#x590D;&#x7EDF;&#x8BA1;&#x4FE1;&#x606F;</h2>
<pre><code>http://10.1.50.90:8080/group/repair_stat
&#x53C2;&#x6570;&#xFF1A;
date:&#x8981;&#x4FEE;&#x590D;&#x7684;&#x65E5;&#x671F;&#xFF0C;&#x683C;&#x5F0F;&#x5982;&#xFF1A;20190725
&#x4F8B;&#x5B50;&#xFF1A;http://127.0.0.1:8080/repair_stat?date=20190725
</code></pre><h2 id="&#x540C;&#x6B65;&#x5931;&#x8D25;&#x4FEE;&#x590D;">&#x540C;&#x6B65;&#x5931;&#x8D25;&#x4FEE;&#x590D;</h2>
<pre><code>http://10.1.50.90:8080/group/repair
&#x53C2;&#x6570;&#xFF1A;
force:&#x662F;&#x5426;&#x5F3A;&#x884C;&#x4FEE;&#x590D;(0|1)
&#x4F8B;&#x5B50;&#xFF1A;http://127.0.0.1:8080/repair?force=1
</code></pre><h2 id="&#x4ECE;&#x6587;&#x4EF6;&#x76EE;&#x5F55;&#x4E2D;&#x4FEE;&#x590D;&#x5143;&#x6570;&#x636E;&#xFF08;&#x6027;&#x80FD;&#x8F83;&#x5DEE;&#xFF09;">&#x4ECE;&#x6587;&#x4EF6;&#x76EE;&#x5F55;&#x4E2D;&#x4FEE;&#x590D;&#x5143;&#x6570;&#x636E;&#xFF08;&#x6027;&#x80FD;&#x8F83;&#x5DEE;&#xFF09;</h2>
<pre><code>http://10.1.50.90:8080/group/repair_fileinfo
&#x9700;&#x8981;&#x5F00;&#x542F;&#x642C;&#x8FC1;&#x529F;&#x80FD;&#xFF0C;&#x4FEE;&#x6539;cfg.json&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x4E2D;&#x7684; enable_migrate &#x8BBE;&#x4E3A;true
</code></pre>
</section>
</div>
<div class="search-results">
<div class="has-results">
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
<ul class="search-results-list"></ul>
</div>
<div class="no-results">
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
</div>
</div>
</div>
</div>
</div>
</div>
<a href="breakpoint.html#js" class="navigation navigation-prev " aria-label="Previous page: Javascript">
<i class="fa fa-angle-left"></i>
</a>
<a href="QA.html" class="navigation navigation-next " aria-label="Next page: 问题汇总">
<i class="fa fa-angle-right"></i>
</a>
</div>
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"管理API","level":"1.8","depth":1,"next":{"title":"问题汇总","level":"1.9","depth":1,"path":"QA.md","ref":"QA.md","articles":[{"title":"常见问题","level":"1.9.1","depth":2,"path":"QA.md","ref":"QA.md","articles":[]},{"title":"维护问题","level":"1.9.2","depth":2,"path":"QA.md","ref":"QA.md","articles":[]}]},"previous":{"title":"Javascript","level":"1.7.2","depth":2,"anchor":"#js","path":"breakpoint.md","ref":"breakpoint.md#js","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["livereload"],"pluginsConfig":{"livereload":{},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"api.md","mtime":"2019-08-23T03:25:24.133Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-11-28T06:39:40.626Z"},"basePath":".","book":{"language":""}});
});
</script>
</div>
<script src="gitbook/gitbook.js"></script>
<script src="gitbook/theme.js"></script>
<script src="gitbook/gitbook-plugin-livereload/plugin.js"></script>
<script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
<script src="gitbook/gitbook-plugin-search/search.js"></script>
<script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
<script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
<script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
<script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
</body>
</html>