Switch to using the dep tool and update all the dependencies

This commit is contained in:
Nick Craig-Wood 2017-05-11 15:39:54 +01:00
parent 5135ff73cb
commit 98c2d2c41b
5321 changed files with 4483201 additions and 5922 deletions

View file

@ -0,0 +1,15 @@
<div class="toggle" style="display: none">
<div class="collapsed">
<p class="exampleHeading toggleButton"><span class="text">Internal call graph</span></p>
</div>
<div class="expanded">
<p class="exampleHeading toggleButton"><span class="text">Internal call graph</span></p>
<p>
This viewer shows the portion of the internal call
graph of this package that is reachable from this function.
See the <a href='#pkg-callgraph'>package's call
graph</a> for more information.
</p>
<ul style="margin-left: 0.5in" id="callgraph-{{.Index}}" class="treeview"></ul>
</div>
</div>

View file

@ -0,0 +1,53 @@
<!--
Copyright 2010 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<style type='text/css'>@import "/doc/codewalk/codewalk.css";</style>
<script type="text/javascript" src="/doc/codewalk/codewalk.js"></script>
<div id="codewalk-main">
<div class="left" id="code-column">
<div id='sizer'></div>
<div id="code-area">
<div id="code-header" align="center">
<select id="code-selector">
{{range .File}}
<option value="/doc/codewalk/?fileprint=/{{urlquery .}}">{{html .}}</option>
{{end}}
</select>
</div>
<div id="code">
<iframe class="code-display" name="code-display" id="code-display"></iframe>
</div>
</div>
<div id="code-options" class="setting">
<span>code on <a id="set-code-left" class="selected" href="#">left</a> &bull; <a id="set-code-right" href="#">right</a></span>
<span>code width <span id="code-column-width">70%</span></span>
<span>filepaths <a id="show-filepaths" class="selected" href="#">shown</a> &bull; <a id="hide-filepaths" href="#">hidden</a></span>
</div>
</div>
<div class="right" id="comment-column">
<div id="comment-area">
{{range .Step}}
<div class="comment first last">
<a class="comment-link" href="/doc/codewalk/?fileprint=/{{urlquery .File}}&amp;lo={{urlquery .Lo}}&amp;hi={{urlquery .Hi}}#mark" target="code-display"></a>
<div class="comment-title">{{html .Title}}</div>
<div class="comment-text">
{{with .Err}}
ERROR LOADING FILE: {{html .}}<br/><br/>
{{end}}
{{.XML}}
</div>
<div class="comment-text file-name"><span class="path-file">{{html .}}</span></div>
</div>
{{end}}
</div>
<div id="comment-options" class="setting">
<a id="prev-comment" href="#"><span class="hotkey">p</span>revious step</a>
&bull;
<a id="next-comment" href="#"><span class="hotkey">n</span>ext step</a>
</div>
</div>
</div>

View file

@ -0,0 +1,16 @@
<!--
Copyright 2010 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<table class="layout">
{{range .}}
<tr>
{{$name_html := html .Name}}
<td><a href="{{$name_html}}">{{$name_html}}</a></td>
<td width="25">&nbsp;</td>
<td>{{html .Title}}</td>
</tr>
{{end}}
</table>

View file

@ -0,0 +1,31 @@
<!--
Copyright 2009 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<p>
<table class="layout">
<tr>
<th align="left">File</th>
<td width="25">&nbsp;</td>
<th align="right">Bytes</th>
<td width="25">&nbsp;</td>
<th align="left">Modified</th>
</tr>
<tr>
<td><a href="..">..</a></td>
</tr>
{{range .}}
<tr>
{{$name_html := fileInfoName . | html}}
<td align="left"><a href="{{$name_html}}">{{$name_html}}</a></td>
<td></td>
<td align="right">{{html .Size}}</td>
<td></td>
<td align="left">{{fileInfoTime . | html}}</td>
</tr>
{{end}}
</table>
</p>

View file

@ -0,0 +1,9 @@
<!--
Copyright 2009 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<p>
<span class="alert" style="font-size:120%">{{html .}}</span>
</p>

View file

@ -0,0 +1,30 @@
<div id="example_{{.Name}}" class="toggle">
<div class="collapsed">
<p class="exampleHeading toggleButton"><span class="text">Example{{example_suffix .Name}}</span></p>
</div>
<div class="expanded">
<p class="exampleHeading toggleButton"><span class="text">Example{{example_suffix .Name}}</span></p>
{{with .Doc}}<p>{{html .}}</p>{{end}}
{{$output := .Output}}
{{with .Play}}
<div class="play">
<div class="input"><textarea class="code">{{html .}}</textarea></div>
<div class="output"><pre>{{html $output}}</pre></div>
<div class="buttons">
<a class="run" title="Run this code [shift-enter]">Run</a>
<a class="fmt" title="Format this code">Format</a>
{{if $.Share}}
<a class="share" title="Share this code">Share</a>
{{end}}
</div>
</div>
{{else}}
<p>Code:</p>
<pre class="code">{{.Code}}</pre>
{{with .Output}}
<p>Output:</p>
<pre class="output">{{html .}}</pre>
{{end}}
{{end}}
</div>
</div>

View file

@ -0,0 +1,162 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#375EAB">
{{with .Tabtitle}}
<title>{{html .}} - Amazon Web Services - Go SDK</title>
{{else}}
<title>Amazon Web Services - Go SDK</title>
{{end}}
<link type="text/css" rel="stylesheet" href="/sdk-for-go/api/lib/godoc/style.css">
<link rel="stylesheet" href="/sdk-for-go/api/lib/godoc/jquery.treeview.css">
<script type="text/javascript" src="/sdk-for-go/api/lib/godoc/jquery.js"></script>
<script type="text/javascript" src="/sdk-for-go/api/lib/godoc/jquery.treeview.js"></script>
<script type="text/javascript" src="/sdk-for-go/api/lib/godoc/jquery.treeview.edit.js"></script>
<script type="text/javascript" src="https://media.amazonwebservices.com/js/sitecatalyst/s_code.min.js"></script>
<script type="text/javascript">
// Documentation Service Name
s.prop66 = 'AWS SDK for Go';
s.eVar66 = 'D=c66';
// Documentation Guide Name
s.prop65 = 'API Reference';
s.eVar65 = 'D=c65';
var s_code = s.t();
if (s_code) document.write(s_code);
</script>
<script type="text/javascript">
window.onload = function() {
var a = document.getElementById('feedback-link');
a.href = "https://docs.aws.amazon.com/forms/aws-doc-feedback?hidden_service_name=awssdkgo&topic_url=" + document.URL
};
</script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'aws/aws-sdk-go'
};
</script>
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
<script type="text/javascript" src="/sdk-for-go/api/lib/godoc/godocs.js"></script>
<script type="text/javascript">window.initFuncs = [];</script>
<script type="text/javascript">
var navOldStyle = {};
var pageOldStyle = {};
var divOldStyle = {};
var which = true;
function showMobileNav() {
if(which === false) return;
var nav = document.getElementById("pkglist");
var page = document.getElementById("page");
var div = window.frames["pkglist"].document.getElementById("mobile_container");
navOldStyle.display = nav.style.display;
navOldStyle.height = nav.style.height;
navOldStyle.width = nav.style.width;
navOldStyle.textAlign = nav.style.textAlign;
nav.style.display = "inline";
nav.style.height = "100%";
nav.style.width = "100%";
nav.style.textAlign = "center";
pageOldStyle.display = page.style.display;
page.style.display = "none";
divOldStyle.fontSize = div.style.fontSize;
divOldStyle.lineHeight = div.style.lineHeight;
divOldStyle.display = div.style.display;
div.style.fontSize = "x-large";
div.style.lineHeight = "150%";
div.style.display = "inline-block";
which = false;
}
function hideMobileNav() {
if(which == true) return;
var nav = document.getElementById("pkglist");
var page = document.getElementById("page");
var div = window.frames["pkglist"].document.getElementById("mobile_container");
nav.style.display = navOldStyle.display;
nav.style.height = navOldStyle.height;
nav.style.width = navOldStyle.width;
nav.style.textAlign = navOldStyle.textAlign;
page.style.display = pageOldStyle.display;
div.style.fontSize = divOldStyle.fontSize;
div.style.lineHeight = divOldStyle.lineHeight;
div.style.display = divOldStyle.display;
which = true;
}
function toggleMobileNav() {
if (which === true) {
showMobileNav();
} else {
hideMobileNav();
}
}
$(window).resize(function() {
if($('#fixed #topbar #mobile-nav').css('display') == "none") {
hideMobileNav();
}
})
</script>
</head>
<body>
<!-- used by search indexer -->
<div id="product_name" style="display:none;">AWS SDK for Go</div>
<div id="guide_name" style="display:none;">API Reference</div>
<div id='lowframe' style="position: fixed; bottom: 0; left: 0; height: 0; width: 100%; border-top: thin solid grey; background-color: white; overflow: auto;">
...
</div><!-- #lowframe -->
<div id="fixed">
<div id="topbar"{{if .Title}} class="wide"{{end}}>
<div style="display:inline-block; color:white; padding-top:2px;">
<a href="/sdk-for-go/api" id="title" class="title">AWS SDK for Go API Reference</a>
</div>
<div id="mobile-nav" onclick="toggleMobileNav()"></div>
<div class="top_link">
<a id="feedback-link" class="title" href="">Feedback</a>
</div>
<div class="top_link">
<a class="title" href="https://aws.amazon.com/blogs/developer/category/go/">Blog</a>
</div>
<div class="top_link">
<a class="title" href="http://aws.amazon.com/sdk-for-go/">Developer Guide</a>
</div>
</div>
<iframe name="pkglist" id="pkglist" src="/sdk-for-go/api/pkglist.html" class="pkg-dir"></iframe>
<div id="page"{{if .Title}} class="wide"{{end}}>
<div class="container">
{{/* The Table of Contents is automatically inserted in this <div>.
Do not delete this <div>. */}}
{{ if not .NoTOC }}
<div id="nav"></div>
{{ end }}
<div id="pkg-nav">
</div>
{{/* Body is HTML-escaped elsewhere */}}
{{printf "%s" .Body}}
<div id="body" class="container-body"> </div>
</div>
</div>
</div><!-- .container -->
</div><!-- #page -->
</body>
</html>

View file

@ -0,0 +1,571 @@
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/* A little code to ease navigation of these documents.
*
* On window load we:
* + Bind search box hint placeholder show/hide events (bindSearchEvents)
* + Generate a table of contents (generateTOC)
* + Bind foldable sections (bindToggles)
* + Bind links to foldable sections (bindToggleLinks)
*/
(function() {
'use strict';
// Mobile-friendly topbar menu
$(function() {
var menu = $('#menu');
var menuButton = $('#menu-button');
var menuButtonArrow = $('#menu-button-arrow');
menuButton.click(function(event) {
menu.toggleClass('menu-visible');
menuButtonArrow.toggleClass('vertical-flip');
event.preventDefault();
return false;
});
});
function bindSearchEvents() {
var search = $('#search');
if (search.length === 0) {
return; // no search box
}
function clearInactive() {
if (search.is('.inactive')) {
search.val('');
search.removeClass('inactive');
}
}
function restoreInactive() {
if (search.val() !== '') {
return;
}
search.val(search.attr('placeholder'));
search.addClass('inactive');
}
search.on('focus', clearInactive);
search.on('blur', restoreInactive);
restoreInactive();
}
/* Generates a table of contents: looks for h2 and h3 elements and generates
* links. "Decorates" the element with id=="nav" with this table of contents.
*/
function generateTOC() {
if ($('#manual-nav').length > 0) {
return;
}
var nav = $('#nav');
if (nav.length === 0) {
return;
}
var toc_items = [];
$(nav).nextAll('h2, h3').each(function() {
var node = this;
if (node.id == '')
node.id = 'tmp_' + toc_items.length;
var link = $('<a/>').attr('href', '#' + node.id).text($(node).text());
var item;
if ($(node).is('h2')) {
item = $('<dt/>');
} else { // h3
item = $('<dd class="indent"/>');
}
item.append(link);
toc_items.push(item);
});
if (toc_items.length <= 1) {
return;
}
var dl1 = $('<dl/>');
var dl2 = $('<dl/>');
var split_index = (toc_items.length / 2) + 1;
if (split_index < 8) {
split_index = toc_items.length;
}
for (var i = 0; i < split_index; i++) {
dl1.append(toc_items[i]);
}
for (/* keep using i */; i < toc_items.length; i++) {
dl2.append(toc_items[i]);
}
var tocTable = $('<table class="unruled"/>').appendTo(nav);
var tocBody = $('<tbody/>').appendTo(tocTable);
var tocRow = $('<tr/>').appendTo(tocBody);
// 1st column
$('<td class="first"/>').appendTo(tocRow).append(dl1);
// 2nd column
$('<td/>').appendTo(tocRow).append(dl2);
}
function bindToggle(el) {
$('.toggleButton', el).click(function() {
if ($(el).is('.toggle')) {
$(el).addClass('toggleVisible').removeClass('toggle');
} else {
$(el).addClass('toggle').removeClass('toggleVisible');
}
});
}
function bindToggles(selector) {
$(selector).each(function(i, el) {
bindToggle(el);
});
}
function bindToggleLink(el, prefix) {
$(el).click(function() {
var href = $(el).attr('href');
var i = href.indexOf('#'+prefix);
if (i < 0) {
return;
}
var id = '#' + prefix + href.slice(i+1+prefix.length);
if ($(id).is('.toggle')) {
$(id).find('.toggleButton').first().click();
}
});
}
function bindToggleLinks(selector, prefix) {
$(selector).each(function(i, el) {
bindToggleLink(el, prefix);
});
}
function setupDropdownPlayground() {
if (!$('#page').is('.wide')) {
return; // don't show on front page
}
var button = $('#playgroundButton');
var div = $('#playground');
var setup = false;
button.toggle(function() {
button.addClass('active');
div.show();
if (setup) {
return;
}
setup = true;
playground({
'codeEl': $('.code', div),
'outputEl': $('.output', div),
'runEl': $('.run', div),
'fmtEl': $('.fmt', div),
'shareEl': $('.share', div),
'shareRedirect': '//play.golang.org/p/'
});
},
function() {
button.removeClass('active');
div.hide();
});
button.show();
$('#menu').css('min-width', '+=60');
}
function setupInlinePlayground() {
'use strict';
// Set up playground when each element is toggled.
$('div.play').each(function (i, el) {
// Set up playground for this example.
var setup = function() {
var code = $('.code', el);
playground({
'codeEl': code,
'outputEl': $('.output', el),
'runEl': $('.run', el),
'fmtEl': $('.fmt', el),
'shareEl': $('.share', el),
'shareRedirect': '//play.golang.org/p/'
});
// Make the code textarea resize to fit content.
var resize = function() {
code.height(0);
var h = code[0].scrollHeight;
code.height(h+20); // minimize bouncing.
code.closest('.input').height(h);
};
code.on('keydown', resize);
code.on('keyup', resize);
code.keyup(); // resize now.
};
// If example already visible, set up playground now.
if ($(el).is(':visible')) {
setup();
return;
}
// Otherwise, set up playground when example is expanded.
var built = false;
$(el).closest('.toggle').click(function() {
// Only set up once.
if (!built) {
setup();
built = true;
}
});
});
}
// fixFocus tries to put focus to div#page so that keyboard navigation works.
function fixFocus() {
var page = $('div#page');
var topbar = $('div#topbar');
page.css('outline', 0); // disable outline when focused
page.attr('tabindex', -1); // and set tabindex so that it is focusable
$(window).resize(function (evt) {
// only focus page when the topbar is at fixed position (that is, it's in
// front of page, and keyboard event will go to the former by default.)
// by focusing page, keyboard event will go to page so that up/down arrow,
// space, etc. will work as expected.
if (topbar.css('position') == "fixed")
page.focus();
}).resize();
}
function toggleHash() {
var hash = $(window.location.hash);
if (hash.is('.toggle')) {
hash.find('.toggleButton').first().click();
}
}
function personalizeInstallInstructions() {
var prefix = '?download=';
var s = window.location.search;
if (s.indexOf(prefix) != 0) {
// No 'download' query string; bail.
return;
}
var filename = s.substr(prefix.length);
var filenameRE = /^go1\.\d+(\.\d+)?([a-z0-9]+)?\.([a-z0-9]+)(-[a-z0-9]+)?(-osx10\.[68])?\.([a-z.]+)$/;
$('.downloadFilename').text(filename);
$('.hideFromDownload').hide();
var m = filenameRE.exec(filename);
if (!m) {
// Can't interpret file name; bail.
return;
}
var os = m[3];
var ext = m[6];
if (ext != 'tar.gz') {
$('#tarballInstructions').hide();
}
if (os != 'darwin' || ext != 'pkg') {
$('#darwinPackageInstructions').hide();
}
if (os != 'windows') {
$('#windowsInstructions').hide();
$('.testUnix').show();
$('.testWindows').hide();
} else {
if (ext != 'msi') {
$('#windowsInstallerInstructions').hide();
}
if (ext != 'zip') {
$('#windowsZipInstructions').hide();
}
$('.testUnix').hide();
$('.testWindows').show();
}
var download = "https://storage.googleapis.com/golang/" + filename;
var message = $('<p class="downloading">'+
'Your download should begin shortly. '+
'If it does not, click <a>this link</a>.</p>');
message.find('a').attr('href', download);
message.insertAfter('#nav');
window.location = download;
}
$(document).ready(function() {
bindSearchEvents();
generateTOC();
bindToggles(".toggle");
bindToggles(".toggleVisible");
bindToggleLinks(".exampleLink", "example_");
bindToggleLinks(".overviewLink", "");
bindToggleLinks(".examplesLink", "");
bindToggleLinks(".indexLink", "");
setupDropdownPlayground();
setupInlinePlayground();
fixFocus();
setupTypeInfo();
setupCallgraphs();
toggleHash();
personalizeInstallInstructions();
// godoc.html defines window.initFuncs in the <head> tag, and root.html and
// codewalk.js push their on-page-ready functions to the list.
// We execute those functions here, to avoid loading jQuery until the page
// content is loaded.
for (var i = 0; i < window.initFuncs.length; i++) window.initFuncs[i]();
});
// -- analysis ---------------------------------------------------------
// escapeHTML returns HTML for s, with metacharacters quoted.
// It is safe for use in both elements and attributes
// (unlike the "set innerText, read innerHTML" trick).
function escapeHTML(s) {
return s.replace(/&/g, '&amp;').
replace(/\"/g, '&quot;').
replace(/\'/g, '&#39;').
replace(/</g, '&lt;').
replace(/>/g, '&gt;');
}
// makeAnchor returns HTML for an <a> element, given an anchorJSON object.
function makeAnchor(json) {
var html = escapeHTML(json.Text);
if (json.Href != "") {
html = "<a href='" + escapeHTML(json.Href) + "'>" + html + "</a>";
}
return html;
}
function showLowFrame(html) {
var lowframe = document.getElementById('lowframe');
lowframe.style.height = "200px";
lowframe.innerHTML = "<p style='text-align: left;'>" + html + "</p>\n" +
"<div onclick='hideLowFrame()' style='position: absolute; top: 0; right: 0; cursor: pointer;'>✘</div>"
};
document.hideLowFrame = function() {
var lowframe = document.getElementById('lowframe');
lowframe.style.height = "0px";
}
// onClickCallers is the onclick action for the 'func' tokens of a
// function declaration.
document.onClickCallers = function(index) {
var data = document.ANALYSIS_DATA[index]
if (data.Callers.length == 1 && data.Callers[0].Sites.length == 1) {
document.location = data.Callers[0].Sites[0].Href; // jump to sole caller
return;
}
var html = "Callers of <code>" + escapeHTML(data.Callee) + "</code>:<br/>\n";
for (var i = 0; i < data.Callers.length; i++) {
var caller = data.Callers[i];
html += "<code>" + escapeHTML(caller.Func) + "</code>";
var sites = caller.Sites;
if (sites != null && sites.length > 0) {
html += " at line ";
for (var j = 0; j < sites.length; j++) {
if (j > 0) {
html += ", ";
}
html += "<code>" + makeAnchor(sites[j]) + "</code>";
}
}
html += "<br/>\n";
}
showLowFrame(html);
};
// onClickCallees is the onclick action for the '(' token of a function call.
document.onClickCallees = function(index) {
var data = document.ANALYSIS_DATA[index]
if (data.Callees.length == 1) {
document.location = data.Callees[0].Href; // jump to sole callee
return;
}
var html = "Callees of this " + escapeHTML(data.Descr) + ":<br/>\n";
for (var i = 0; i < data.Callees.length; i++) {
html += "<code>" + makeAnchor(data.Callees[i]) + "</code><br/>\n";
}
showLowFrame(html);
};
// onClickTypeInfo is the onclick action for identifiers declaring a named type.
document.onClickTypeInfo = function(index) {
var data = document.ANALYSIS_DATA[index];
var html = "Type <code>" + data.Name + "</code>: " +
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<small>(size=" + data.Size + ", align=" + data.Align + ")</small><br/>\n";
html += implementsHTML(data);
html += methodsetHTML(data);
showLowFrame(html);
};
// implementsHTML returns HTML for the implements relation of the
// specified TypeInfoJSON value.
function implementsHTML(info) {
var html = "";
if (info.ImplGroups != null) {
for (var i = 0; i < info.ImplGroups.length; i++) {
var group = info.ImplGroups[i];
var x = "<code>" + escapeHTML(group.Descr) + "</code> ";
for (var j = 0; j < group.Facts.length; j++) {
var fact = group.Facts[j];
var y = "<code>" + makeAnchor(fact.Other) + "</code>";
if (fact.ByKind != null) {
html += escapeHTML(fact.ByKind) + " type " + y + " implements " + x;
} else {
html += x + " implements " + y;
}
html += "<br/>\n";
}
}
}
return html;
}
// methodsetHTML returns HTML for the methodset of the specified
// TypeInfoJSON value.
function methodsetHTML(info) {
var html = "";
if (info.Methods != null) {
for (var i = 0; i < info.Methods.length; i++) {
html += "<code>" + makeAnchor(info.Methods[i]) + "</code><br/>\n";
}
}
return html;
}
// onClickComm is the onclick action for channel "make" and "<-"
// send/receive tokens.
document.onClickComm = function(index) {
var ops = document.ANALYSIS_DATA[index].Ops
if (ops.length == 1) {
document.location = ops[0].Op.Href; // jump to sole element
return;
}
var html = "Operations on this channel:<br/>\n";
for (var i = 0; i < ops.length; i++) {
html += makeAnchor(ops[i].Op) + " by <code>" + escapeHTML(ops[i].Fn) + "</code><br/>\n";
}
if (ops.length == 0) {
html += "(none)<br/>\n";
}
showLowFrame(html);
};
$(window).load(function() {
// Scroll window so that first selection is visible.
// (This means we don't need to emit id='L%d' spans for each line.)
// TODO(adonovan): ideally, scroll it so that it's under the pointer,
// but I don't know how to get the pointer y coordinate.
var elts = document.getElementsByClassName("selection");
if (elts.length > 0) {
elts[0].scrollIntoView()
}
});
// setupTypeInfo populates the "Implements" and "Method set" toggle for
// each type in the package doc.
function setupTypeInfo() {
for (var i in document.ANALYSIS_DATA) {
var data = document.ANALYSIS_DATA[i];
var el = document.getElementById("implements-" + i);
if (el != null) {
// el != null => data is TypeInfoJSON.
if (data.ImplGroups != null) {
el.innerHTML = implementsHTML(data);
el.parentNode.parentNode.style.display = "block";
}
}
var el = document.getElementById("methodset-" + i);
if (el != null) {
// el != null => data is TypeInfoJSON.
if (data.Methods != null) {
el.innerHTML = methodsetHTML(data);
el.parentNode.parentNode.style.display = "block";
}
}
}
}
function setupCallgraphs() {
if (document.CALLGRAPH == null) {
return
}
document.getElementById("pkg-callgraph").style.display = "block";
var treeviews = document.getElementsByClassName("treeview");
for (var i = 0; i < treeviews.length; i++) {
var tree = treeviews[i];
if (tree.id == null || tree.id.indexOf("callgraph-") != 0) {
continue;
}
var id = tree.id.substring("callgraph-".length);
$(tree).treeview({collapsed: true, animated: "fast"});
document.cgAddChildren(tree, tree, [id]);
tree.parentNode.parentNode.style.display = "block";
}
}
document.cgAddChildren = function(tree, ul, indices) {
if (indices != null) {
for (var i = 0; i < indices.length; i++) {
var li = cgAddChild(tree, ul, document.CALLGRAPH[indices[i]]);
if (i == indices.length - 1) {
$(li).addClass("last");
}
}
}
$(tree).treeview({animated: "fast", add: ul});
}
// cgAddChild adds an <li> element for document.CALLGRAPH node cgn to
// the parent <ul> element ul. tree is the tree's root <ul> element.
function cgAddChild(tree, ul, cgn) {
var li = document.createElement("li");
ul.appendChild(li);
li.className = "closed";
var code = document.createElement("code");
if (cgn.Callees != null) {
$(li).addClass("expandable");
// Event handlers and innerHTML updates don't play nicely together,
// hence all this explicit DOM manipulation.
var hitarea = document.createElement("div");
hitarea.className = "hitarea expandable-hitarea";
li.appendChild(hitarea);
li.appendChild(code);
var childUL = document.createElement("ul");
li.appendChild(childUL);
childUL.setAttribute('style', "display: none;");
var onClick = function() {
document.cgAddChildren(tree, childUL, cgn.Callees);
hitarea.removeEventListener('click', onClick)
};
hitarea.addEventListener('click', onClick);
} else {
li.appendChild(code);
}
code.innerHTML += "&nbsp;" + makeAnchor(cgn.Func);
return li
}
})();

View file

@ -0,0 +1,9 @@
<div class="toggle" style="display: none">
<div class="collapsed">
<p class="exampleHeading toggleButton"><span class="text">Implements</span></p>
</div>
<div class="expanded">
<p class="exampleHeading toggleButton"><span class="text">Implements</span></p>
<div style="margin-left: 1in" id='implements-{{.Index}}'>...</div>
</div>
</div>

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,57 @@
/* https://github.com/jzaefferer/jquery-treeview/blob/master/jquery.treeview.css */
/* License: MIT. */
.treeview, .treeview ul {
padding: 0;
margin: 0;
list-style: none;
}
.treeview ul {
background-color: white;
margin-top: 4px;
}
.treeview .hitarea {
height: 16px;
width: 16px;
margin-left: -16px;
float: left;
cursor: pointer;
}
/* fix for IE6 */
* html .hitarea {
display: inline;
float:none;
}
.treeview li {
margin: 0;
padding: 3px 0pt 3px 16px;
}
.treeview a.selected {
background-color: #eee;
}
#treecontrol { margin: 1em 0; display: none; }
.treeview .hover { color: red; cursor: pointer; }
.treeview li.collapsable, .treeview li.expandable { background-position: 0 -176px; }
.treeview .expandable-hitarea { background-position: -80px -3px; }
.treeview li.last { background-position: 0 -1766px }
.treeview li.lastCollapsable { background-position: 0 -111px }
.treeview li.lastExpandable { background-position: -32px -67px }
.treeview div.lastCollapsable-hitarea, .treeview div.lastExpandable-hitarea { background-position: 0; }
.treeview .placeholder {
height: 16px;
width: 16px;
display: block;
}
.filetree li { padding: 3px 0 2px 16px; }
.filetree span.folder, .filetree span.file { padding: 1px 0 1px 16px; display: block; }

View file

@ -0,0 +1,39 @@
/* https://github.com/jzaefferer/jquery-treeview/blob/master/jquery.treeview.edit.js */
/* License: MIT. */
(function($) {
var CLASSES = $.treeview.classes;
var proxied = $.fn.treeview;
$.fn.treeview = function(settings) {
settings = $.extend({}, settings);
if (settings.add) {
return this.trigger("add", [settings.add]);
}
if (settings.remove) {
return this.trigger("remove", [settings.remove]);
}
return proxied.apply(this, arguments).bind("add", function(event, branches) {
$(branches).prev()
.removeClass(CLASSES.last)
.removeClass(CLASSES.lastCollapsable)
.removeClass(CLASSES.lastExpandable)
.find(">.hitarea")
.removeClass(CLASSES.lastCollapsableHitarea)
.removeClass(CLASSES.lastExpandableHitarea);
$(branches).find("li").andSelf().prepareBranches(settings).applyClasses(settings, $(this).data("toggler"));
}).bind("remove", function(event, branches) {
var prev = $(branches).prev();
var parent = $(branches).parent();
$(branches).remove();
prev.filter(":last-child").addClass(CLASSES.last)
.filter("." + CLASSES.expandable).replaceClass(CLASSES.last, CLASSES.lastExpandable).end()
.find(">.hitarea").replaceClass(CLASSES.expandableHitarea, CLASSES.lastExpandableHitarea).end()
.filter("." + CLASSES.collapsable).replaceClass(CLASSES.last, CLASSES.lastCollapsable).end()
.find(">.hitarea").replaceClass(CLASSES.collapsableHitarea, CLASSES.lastCollapsableHitarea);
if (parent.is(":not(:has(>))") && parent[0] != this) {
parent.parent().removeClass(CLASSES.collapsable).removeClass(CLASSES.expandable)
parent.siblings(".hitarea").andSelf().remove();
}
});
};
})(jQuery);

View file

@ -0,0 +1,256 @@
/*
* Treeview 1.4.1 - jQuery plugin to hide and show branches of a tree
*
* http://bassistance.de/jquery-plugins/jquery-plugin-treeview/
* http://docs.jquery.com/Plugins/Treeview
*
* Copyright (c) 2007 Jörn Zaefferer
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* Revision: $Id: jquery.treeview.js 5759 2008-07-01 07:50:28Z joern.zaefferer $
*
*/
;(function($) {
// TODO rewrite as a widget, removing all the extra plugins
$.extend($.fn, {
swapClass: function(c1, c2) {
var c1Elements = this.filter('.' + c1);
this.filter('.' + c2).removeClass(c2).addClass(c1);
c1Elements.removeClass(c1).addClass(c2);
return this;
},
replaceClass: function(c1, c2) {
return this.filter('.' + c1).removeClass(c1).addClass(c2).end();
},
hoverClass: function(className) {
className = className || "hover";
return this.hover(function() {
$(this).addClass(className);
}, function() {
$(this).removeClass(className);
});
},
heightToggle: function(animated, callback) {
animated ?
this.animate({ height: "toggle" }, animated, callback) :
this.each(function(){
jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ]();
if(callback)
callback.apply(this, arguments);
});
},
heightHide: function(animated, callback) {
if (animated) {
this.animate({ height: "hide" }, animated, callback);
} else {
this.hide();
if (callback)
this.each(callback);
}
},
prepareBranches: function(settings) {
if (!settings.prerendered) {
// mark last tree items
this.filter(":last-child:not(ul)").addClass(CLASSES.last);
// collapse whole tree, or only those marked as closed, anyway except those marked as open
this.filter((settings.collapsed ? "" : "." + CLASSES.closed) + ":not(." + CLASSES.open + ")").find(">ul").hide();
}
// return all items with sublists
return this.filter(":has(>ul)");
},
applyClasses: function(settings, toggler) {
// TODO use event delegation
this.filter(":has(>ul):not(:has(>a))").find(">span").unbind("click.treeview").bind("click.treeview", function(event) {
// don't handle click events on children, eg. checkboxes
if ( this == event.target )
toggler.apply($(this).next());
}).add( $("a", this) ).hoverClass();
if (!settings.prerendered) {
// handle closed ones first
this.filter(":has(>ul:hidden)")
.addClass(CLASSES.expandable)
.replaceClass(CLASSES.last, CLASSES.lastExpandable);
// handle open ones
this.not(":has(>ul:hidden)")
.addClass(CLASSES.collapsable)
.replaceClass(CLASSES.last, CLASSES.lastCollapsable);
// create hitarea if not present
var hitarea = this.find("div." + CLASSES.hitarea);
if (!hitarea.length)
hitarea = this.prepend("<div class=\"" + CLASSES.hitarea + "\"/>").find("div." + CLASSES.hitarea);
hitarea.removeClass().addClass(CLASSES.hitarea).each(function() {
var classes = "";
$.each($(this).parent().attr("class").split(" "), function() {
classes += this + "-hitarea ";
});
$(this).addClass( classes );
})
}
// apply event to hitarea
this.find("div." + CLASSES.hitarea).click( toggler );
},
treeview: function(settings) {
settings = $.extend({
cookieId: "treeview"
}, settings);
if ( settings.toggle ) {
var callback = settings.toggle;
settings.toggle = function() {
return callback.apply($(this).parent()[0], arguments);
};
}
// factory for treecontroller
function treeController(tree, control) {
// factory for click handlers
function handler(filter) {
return function() {
// reuse toggle event handler, applying the elements to toggle
// start searching for all hitareas
toggler.apply( $("div." + CLASSES.hitarea, tree).filter(function() {
// for plain toggle, no filter is provided, otherwise we need to check the parent element
return filter ? $(this).parent("." + filter).length : true;
}) );
return false;
};
}
// click on first element to collapse tree
$("a:eq(0)", control).click( handler(CLASSES.collapsable) );
// click on second to expand tree
$("a:eq(1)", control).click( handler(CLASSES.expandable) );
// click on third to toggle tree
$("a:eq(2)", control).click( handler() );
}
// handle toggle event
function toggler() {
$(this)
.parent()
// swap classes for hitarea
.find(">.hitarea")
.swapClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea )
.swapClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea )
.end()
// swap classes for parent li
.swapClass( CLASSES.collapsable, CLASSES.expandable )
.swapClass( CLASSES.lastCollapsable, CLASSES.lastExpandable )
// find child lists
.find( ">ul" )
// toggle them
.heightToggle( settings.animated, settings.toggle );
if ( settings.unique ) {
$(this).parent()
.siblings()
// swap classes for hitarea
.find(">.hitarea")
.replaceClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea )
.replaceClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea )
.end()
.replaceClass( CLASSES.collapsable, CLASSES.expandable )
.replaceClass( CLASSES.lastCollapsable, CLASSES.lastExpandable )
.find( ">ul" )
.heightHide( settings.animated, settings.toggle );
}
}
this.data("toggler", toggler);
function serialize() {
function binary(arg) {
return arg ? 1 : 0;
}
var data = [];
branches.each(function(i, e) {
data[i] = $(e).is(":has(>ul:visible)") ? 1 : 0;
});
$.cookie(settings.cookieId, data.join(""), settings.cookieOptions );
}
function deserialize() {
var stored = $.cookie(settings.cookieId);
if ( stored ) {
var data = stored.split("");
branches.each(function(i, e) {
$(e).find(">ul")[ parseInt(data[i]) ? "show" : "hide" ]();
});
}
}
// add treeview class to activate styles
this.addClass("treeview");
// prepare branches and find all tree items with child lists
var branches = this.find("li").prepareBranches(settings);
switch(settings.persist) {
case "cookie":
var toggleCallback = settings.toggle;
settings.toggle = function() {
serialize();
if (toggleCallback) {
toggleCallback.apply(this, arguments);
}
};
deserialize();
break;
case "location":
var current = this.find("a").filter(function() {
return this.href.toLowerCase() == location.href.toLowerCase();
});
if ( current.length ) {
// TODO update the open/closed classes
var items = current.addClass("selected").parents("ul, li").add( current.next() ).show();
if (settings.prerendered) {
// if prerendered is on, replicate the basic class swapping
items.filter("li")
.swapClass( CLASSES.collapsable, CLASSES.expandable )
.swapClass( CLASSES.lastCollapsable, CLASSES.lastExpandable )
.find(">.hitarea")
.swapClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea )
.swapClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea );
}
}
break;
}
branches.applyClasses(settings, toggler);
// if control option is set, create the treecontroller and show it
if ( settings.control ) {
treeController(this, settings.control);
$(settings.control).show();
}
return this;
}
});
// classes used by the plugin
// need to be styled via external stylesheet, see first example
$.treeview = {};
var CLASSES = ($.treeview.classes = {
open: "open",
closed: "closed",
expandable: "expandable",
expandableHitarea: "expandable-hitarea",
lastExpandableHitarea: "lastExpandable-hitarea",
collapsable: "collapsable",
collapsableHitarea: "collapsable-hitarea",
lastCollapsableHitarea: "lastCollapsable-hitarea",
lastCollapsable: "lastCollapsable",
lastExpandable: "lastExpandable",
last: "last",
hitarea: "hitarea"
});
})(jQuery);

View file

@ -0,0 +1,9 @@
<div class="toggle" style="display: none">
<div class="collapsed">
<p class="exampleHeading toggleButton"><span class="text">Method set</span></p>
</div>
<div class="expanded">
<p class="exampleHeading toggleButton"><span class="text">Method set</span></p>
<div style="margin-left: 1in" id='methodset-{{.Index}}'>...</div>
</div>
</div>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>godoc</ShortName>
<Description>The Go Programming Language</Description>
<Tags>go golang</Tags>
<Contact />
<Url type="text/html" template="{{.BaseURL}}/search?q={searchTerms}" />
<Image height="15" width="16" type="image/x-icon">/favicon.ico</Image>
<OutputEncoding>UTF-8</OutputEncoding>
<InputEncoding>UTF-8</InputEncoding>
</OpenSearchDescription>

View file

@ -0,0 +1,116 @@
{{$info := .}}{{$filtered := .IsFiltered}}{{/*
---------------------------------------
*/}}{{if $filtered}}{{range .PAst}}{{range .Decls}}{{node $info .}}
{{end}}{{end}}{{else}}{{with .PAst}}{{range $filename, $ast := .}}{{$filename}}:
{{node $ $ast}}{{end}}{{end}}{{end}}{{/*
---------------------------------------
*/}}{{if and $filtered (not (or .PDoc .PAst))}}No match found.
{{end}}{{with .PDoc}}{{if $.IsMain}}COMMAND DOCUMENTATION
{{comment_text .Doc " " "\t"}}
{{else}}{{if not $filtered}}PACKAGE DOCUMENTATION
package {{.Name}}
import "{{.ImportPath}}"
{{comment_text .Doc " " "\t"}}
{{example_text $ "" " "}}{{end}}{{/*
---------------------------------------
*/}}{{with .Consts}}{{if not $filtered}}CONSTANTS
{{end}}{{range .}}{{node $ .Decl}}
{{comment_text .Doc " " "\t"}}
{{end}}{{end}}{{/*
---------------------------------------
*/}}{{with .Vars}}{{if not $filtered}}VARIABLES
{{end}}{{range .}}{{node $ .Decl}}
{{comment_text .Doc " " "\t"}}
{{end}}{{end}}{{/*
---------------------------------------
*/}}{{with .Funcs}}{{if not $filtered}}FUNCTIONS
{{end}}{{range .}}{{node $ .Decl}}
{{comment_text .Doc " " "\t"}}
{{example_text $ .Name " "}}{{end}}{{end}}{{/*
---------------------------------------
*/}}{{with .Types}}{{if not $filtered}}TYPES
{{end}}{{range .}}{{$tname := .Name}}{{node $ .Decl}}
{{comment_text .Doc " " "\t"}}
{{/*
---------------------------------------
*/}}{{if .Consts}}{{range .Consts}}{{node $ .Decl}}
{{comment_text .Doc " " "\t"}}
{{end}}{{end}}{{/*
---------------------------------------
*/}}{{if .Vars}}{{range .Vars}}{{node $ .Decl}}
{{comment_text .Doc " " "\t"}}
{{range $name := .Names}}{{example_text $ $name " "}}{{end}}{{end}}{{end}}{{/*
---------------------------------------
*/}}{{if .Funcs}}{{range .Funcs}}{{node $ .Decl}}
{{comment_text .Doc " " "\t"}}
{{example_text $ .Name " "}}{{end}}{{end}}{{/*
---------------------------------------
*/}}{{if .Methods}}{{range .Methods}}{{node $ .Decl}}
{{comment_text .Doc " " "\t"}}
{{$name := printf "%s_%s" $tname .Name}}{{example_text $ $name " "}}{{end}}{{end}}{{/*
---------------------------------------
*/}}{{end}}{{end}}{{/*
---------------------------------------
*/}}{{if and $filtered (not (or .Consts (or .Vars (or .Funcs .Types))))}}No match found.
{{end}}{{/*
---------------------------------------
*/}}{{end}}{{/*
---------------------------------------
*/}}{{with $.Notes}}
{{range $marker, $content := .}}
{{$marker}}S
{{range $content}}{{comment_text .Body " " "\t"}}
{{end}}{{end}}{{end}}{{end}}{{/*
---------------------------------------
*/}}{{if not $filtered}}{{with .Dirs}}SUBDIRECTORIES
{{if $.DirFlat}}{{range .List}}{{if .HasPkg}}
{{.Path}}{{end}}{{end}}
{{else}}{{range .List}}
{{repeat `. ` .Depth}}{{.Name}}{{end}}
{{end}}{{end}}{{/*
---------------------------------------
*/}}{{end}}{{/*
Make sure there is no newline at the end of this file.
perl -i -pe 'chomp if eof' package.txt
*/}}

View file

@ -0,0 +1,244 @@
<!--
Copyright 2009 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<!--
Note: Static (i.e., not template-generated) href and id
attributes start with "pkg-" to make it impossible for
them to conflict with generated attributes (some of which
correspond to Go identifiers).
-->
{{with .PDoc}}
<script type='text/javascript'>
document.ANALYSIS_DATA = {{$.AnalysisData}};
document.CALLGRAPH = {{$.CallGraph}};
</script>
{{if $.IsMain}}
{{/* command documentation */}}
{{comment_html .Doc}}
{{else}}
{{/* package documentation */}}
<div id="short-nav">
<dl>
<dd><code>import "github.com/aws/aws-sdk-go/{{html .ImportPath}}"</code></dd>
</dl>
<dl>
<dd><a href="#pkg-overview" class="overviewLink">Overview</a></dd>
<dd><a href="#pkg-index" class="indexLink">Index</a></dd>
{{if $.Examples}}
<dd><a href="#pkg-examples" class="examplesLink">Examples</a></dd>
{{end}}
</dl>
</div>
<!-- The package's Name is printed as title by the top-level template -->
<div id="pkg-overview" class="toggleVisible">
<div class="collapsed">
<h2 class="toggleButton" title="Click to show Overview section">Overview ▹</h2>
</div>
<div class="expanded">
<h2 class="toggleButton" title="Click to hide Overview section">Overview ▾</h2>
{{comment_html .Doc}}
</div>
</div>
{{example_html $ ""}}
<div id="pkg-index" class="toggleVisible">
<div class="collapsed">
<h2 class="toggleButton" title="Click to show Index section">Index ▹</h2>
</div>
<div class="expanded">
<h2 class="toggleButton" title="Click to hide Index section">Index ▾</h2>
<!-- Table of contents for API; must be named manual-nav to turn off auto nav. -->
<div id="manual-nav">
<dl>
{{if .Consts}}
<dd><a href="#pkg-constants">Constants</a></dd>
{{end}}
{{if .Vars}}
<dd><a href="#pkg-variables">Variables</a></dd>
{{end}}
{{range .Funcs}}
{{$name_html := html .Name}}
<dd><a href="#{{$name_html}}">{{node_html $ .Decl false | sanitize}}</a></dd>
{{end}}
{{range .Types}}
{{$tname_html := html .Name}}
<dd><a href="#{{$tname_html}}">type {{$tname_html}}</a></dd>
{{range .Funcs}}
{{$name_html := html .Name}}
<dd>&nbsp; &nbsp; <a href="#{{$name_html}}">{{node_html $ .Decl false | sanitize}}</a></dd>
{{end}}
{{range .Methods}}
{{$name_html := html .Name}}
<dd>&nbsp; &nbsp; <a href="#{{$tname_html}}.{{$name_html}}">{{node_html $ .Decl false | sanitize}}</a></dd>
{{end}}
{{end}}
{{if $.Notes}}
{{range $marker, $item := $.Notes}}
<dd><a href="#pkg-note-{{$marker}}">{{noteTitle $marker | html}}s</a></dd>
{{end}}
{{end}}
</dl>
</div><!-- #manual-nav -->
{{if $.Examples}}
<div id="pkg-examples">
<h4>Examples</h4>
<dl>
{{range $.Examples}}
<dd><a class="exampleLink" href="#example_{{.Name}}">{{example_name .Name}}</a></dd>
{{end}}
</dl>
</div>
{{end}}
{{with .Filenames}}
<h4>Package files</h4>
<p>
<span style="font-size:90%">
{{range .}}
<a href="{{.|githubFileLink|html}}">{{.|filename|html}}</a>
{{end}}
</span>
</p>
{{end}}
</div><!-- .expanded -->
</div><!-- #pkg-index -->
<div id="pkg-callgraph" class="toggle" style="display: none">
<div class="collapsed">
<h2 class="toggleButton" title="Click to show Internal Call Graph section">Internal call graph ▹</h2>
</div> <!-- .expanded -->
<div class="expanded">
<h2 class="toggleButton" title="Click to hide Internal Call Graph section">Internal call graph ▾</h2>
<p>
In the call graph viewer below, each node
is a function belonging to this package
and its children are the functions it
calls&mdash;perhaps dynamically.
</p>
<p>
The root nodes are the entry points of the
package: functions that may be called from
outside the package.
There may be non-exported or anonymous
functions among them if they are called
dynamically from another package.
</p>
<p>
Click a node to visit that function's source code.
From there you can visit its callers by
clicking its declaring <code>func</code>
token.
</p>
<p>
Functions may be omitted if they were
determined to be unreachable in the
particular programs or tests that were
analyzed.
</p>
<!-- Zero means show all package entry points. -->
<ul style="margin-left: 0.5in" id="callgraph-0" class="treeview"></ul>
</div>
</div> <!-- #pkg-callgraph -->
{{with .Consts}}
<h2 id="pkg-constants">Constants</h2>
{{range .}}
<pre>{{node_html $ .Decl true}}</pre>
{{comment_html .Doc}}
{{end}}
{{end}}
{{with .Vars}}
<h2 id="pkg-variables">Variables</h2>
{{range .}}
<pre>{{node_html $ .Decl true}}</pre>
{{comment_html .Doc}}
{{end}}
{{end}}
{{range .Funcs}}
{{/* Name is a string - no need for FSet */}}
{{$name_html := html .Name}}
<h2 id="{{$name_html}}">func <a href="{{posLink_url $ .Decl}}">{{$name_html}}</a></h2>
<pre>{{node_html $ .Decl true}}</pre>
{{comment_html .Doc}}
{{example_html $ .Name}}
{{callgraph_html $ "" .Name}}
{{end}}
{{range .Types}}
{{$tname := .Name}}
{{$tname_html := html .Name}}
<h2 id="{{$tname_html}}">type <a href="{{posLink_url $ .Decl}}">{{$tname_html}}</a></h2>
<pre>{{node_html $ .Decl true}}</pre>
{{comment_html .Doc}}
{{range .Consts}}
<pre>{{node_html $ .Decl true}}</pre>
{{comment_html .Doc}}
{{end}}
{{range .Vars}}
<pre>{{node_html $ .Decl true}}</pre>
{{comment_html .Doc}}
{{end}}
{{example_html $ $tname}}
{{implements_html $ $tname}}
{{methodset_html $ $tname}}
{{range .Funcs}}
{{$name_html := html .Name}}
<h3 id="{{$name_html}}">func <a href="{{posLink_url $ .Decl}}">{{$name_html}}</a></h3>
<pre>{{node_html $ .Decl true}}</pre>
{{comment_html .Doc}}
{{example_html $ .Name}}
{{callgraph_html $ "" .Name}}
{{end}}
{{range .Methods}}
{{$name_html := html .Name}}
<h3 id="{{$tname_html}}.{{$name_html}}">func ({{html .Recv}}) <a href="{{posLink_url $ .Decl}}">{{$name_html}}</a></h3>
<pre>{{node_html $ .Decl true}}</pre>
{{comment_html .Doc}}
{{$name := printf "%s_%s" $tname .Name}}
{{example_html $ $name}}
{{callgraph_html $ .Recv .Name}}
{{end}}
{{end}}
{{end}}
{{with $.Notes}}
{{range $marker, $content := .}}
<h2 id="pkg-note-{{$marker}}">{{noteTitle $marker | html}}s</h2>
<ul style="list-style: none; padding: 0;">
{{range .}}
<li><a href="{{posLink_url $ .}}">&#x261e;</a> {{html .Body}}</li>
{{end}}
</ul>
{{end}}
{{end}}
{{end}}
{{with .PAst}}
{{range $filename, $ast := .}}
<a href="{{$filename|srcLink|html}}">{{$filename|filename|html}}</a>:<pre>{{node_html $ $ast false}}</pre>
{{end}}
{{end}}
{{with .Dirs}}
{{if eq $.Dirname "/src"}}
<div id="manual-nav">
<dl>
<dt><a href="#stdlib">Standard library</a></dt>
<dt><a href="#other">Other packages</a></dt>
<dd><a href="#subrepo">Sub-repositories</a></dd>
<dd><a href="#community">Community</a></dd>
</dl>
</div>
<h2 id="stdlib">Standard library</h2>
{{end}}
{{end}}

View file

@ -0,0 +1,281 @@
<!--
Copyright 2009 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<!--
Note: Static (i.e., not template-generated) href and id
attributes start with "pkg-" to make it impossible for
them to conflict with generated attributes (some of which
correspond to Go identifiers).
-->
{{with .PDoc}}
<script type='text/javascript'>
document.ANALYSIS_DATA = {{$.AnalysisData}};
document.CALLGRAPH = {{$.CallGraph}};
</script>
{{if $.IsMain}}
{{/* command documentation */}}
{{comment_html .Doc}}
{{else}}
{{/* package documentation */}}
<div id="short-nav">
<dl>
<dd><code>import "github.com/aws/aws-sdk-go/{{html .ImportPath}}"</code></dd>
</dl>
<dl>
<dd><a href="#pkg-overview" class="overviewLink">Overview</a></dd>
{{if .Consts}}
<dd><a href="#pkg-constants" class="examplesLink">Constants</a></dd>
{{end}}
{{if $.Examples}}
<dd><a href="#pkg-examples" class="examplesLink">Examples</a></dd>
{{end}}
</dl>
</div>
<!-- The package's Name is printed as title by the top-level template -->
<div id="pkg-overview" class="toggleVisible">
<div class="collapsed">
<h2 class="toggleButton" title="Click to show Overview section">Overview ▹</h2>
</div>
<div class="expanded">
<h2 class="toggleButton" title="Click to hide Overview section">Overview ▾</h2>
{{comment_html .Doc}}
<p>
{{if ne $.IfaceLink ""}}
The stub package, <a href={{$.IfaceLink}}>{{$.PDoc.Name}}iface</a>, can be used to provide alternative implementations of service clients,
such as mocking the client for testing.
{{end}}
</p?>
</div>
</div>
{{example_html $ ""}}
<div id="pkg-operations" class="toggle">
<div class="collapsed">
<h2 class="toggleButton" title="Click to show Index section">Operations ▹</h2>
</div>
<div class="expanded">
<h2 class="toggleButton" title="Click to hide Index section">Operations ▾</h2>
<!-- Table of contents for API; must be named manual-nav to turn off auto nav. -->
<div id="manual-nav">
<dl>
{{range .Funcs -}}
{{$name_html := html .Name}}
<dd><a href="#{{$name_html}}">{{node_html $ .Decl false | sanitize}}</a></dd>
{{end -}}
{{range .Types -}}
{{$tname_html := html .Name -}}
{{range .Funcs -}}
{{ $name_html := html .Name -}}
<dd><a href="#{{$name_html}}">{{node_html $ .Decl false | sanitize}}</a></dd>
{{end -}}
{{range .Methods -}}
{{if (and (ne .Name "String") (ne .Name "GoString")) -}}
{{ if (not (is_setter $.PDoc.Name .)) -}}
{{ if (not (is_paginator .)) -}}
{{ if (ne .Name "Validate") -}}
{{ $name_html := html .Name -}}
{{ if not (is_op_deprecated $.PDoc.Name .Name) -}}
<dd><a href="#{{$tname_html}}.{{$name_html}}">{{client_html $ .Decl false | sanitize}}</a></dd>
{{ end -}}
{{ end -}}
{{ end -}}
{{ end -}}
{{ end -}}
{{ end -}}
{{if $.Notes -}}
{{range $marker, $item := $.Notes -}}
<dd><a href="#pkg-note-{{$marker}}">{{noteTitle $marker | html}}s</a></dd>
{{end -}}
{{ end -}}
{{ end -}}
</dl>
</div><!-- #manual-nav -->
</div><!-- .expanded -->
</div><!-- #pkg-index -->
{{ if $.HasPaginators -}}
<div id="pkg-pagination " class="toggle">
<div class="collapsed">
<h2 class="toggleButton" title="Click to show Index section">Paginators ▹</h2>
</div>
<div class="expanded">
<h2 class="toggleButton" title="Click to hide Index section">Paginators ▾</h2>
{{range .Types -}}
{{ $tname_html := html .Name -}}
{{range .Methods -}}
{{if is_paginator . -}}
{{$name_html := html .Name}}
<dd><a href="#{{$tname_html}}.{{$name_html}}">{{client_html $ .Decl false | sanitize}}</a></dd>
{{end -}}
{{ end -}}
{{ end -}}
</div>
</div>
{{ end -}}
<div id="pkg-types" class="toggle">
<div class="collapsed">
<h2 class="toggleButton" title="Click to show Index section">Types ▹</h2>
</div>
<div class="expanded">
<h2 class="toggleButton" title="Click to hide Index section">Types ▾</h2>
{{ if .Vars -}}
<dd><a href="#pkg-variables">Variables</a></dd>
{{ end -}}
<dl>
{{ range .Types -}}
{{ $tname_html := html .Name -}}
<dt><a href="#{{$tname_html}}">type {{$tname_html}}</a></dd>
{{ range .Methods -}}
{{ if is_setter $.PDoc.Name . -}}
{{ $name_html := html .Name -}}
<dd><a href="#{{$tname_html}}.{{$name_html}}">{{name_only_html $ . | sanitize}}</a></dd>
{{ end -}}
{{ end -}}
{{ end -}}
</dl>
</div>
</div>
{{ if $.Examples -}}
<div id="pkg-examples" class="toggle">
<div class="collapsed">
<h2 class="toggleButton" title="Click to show Index section">Examples ▹</h2>
</div>
<div class="expanded">
<h2 class="toggleButton" title="Click to hide Index section">Examples ▾</h2>
<div id="pkg-examples">
<dl>
{{ range $.Examples -}}
<dd><a class="exampleLink" href="#example_{{.Name}}">{{example_name .Name}}</a></dd>
{{ end -}}
</dl>
</div>
</div>
</div>
{{ end -}}
<div id="pkg-callgraph" class="toggle" style="display: none">
<div class="collapsed">
<h2 class="toggleButton" title="Click to show Internal Call Graph section">Internal call graph ▹</h2>
</div> <!-- .expanded -->
<div class="expanded">
<h2 class="toggleButton" title="Click to hide Internal Call Graph section">Internal call graph ▾</h2>
<p>
In the call graph viewer below, each node
is a function belonging to this package
and its children are the functions it
calls&mdash;perhaps dynamically.
</p>
<p>
The root nodes are the entry points of the
package: functions that may be called from
outside the package.
There may be non-exported or anonymous
functions among them if they are called
dynamically from another package.
</p>
<p>
Click a node to visit that function's source code.
From there you can visit its callers by
clicking its declaring <code>func</code>
token.
</p>
<p>
Functions may be omitted if they were
determined to be unreachable in the
particular programs or tests that were
analyzed.
</p>
<!-- Zero means show all package entry points. -->
<ul style="margin-left: 0.5in" id="callgraph-0" class="treeview"></ul>
</div>
</div> <!-- #pkg-callgraph -->
{{ with .Consts -}}
<div id="pkg-consts" class="toggle">
<div class="collapsed">
<h2 class="toggleButton" title="Click to show Index section">Constants ▹</h2>
</div>
<div class="expanded">
<h2 class="toggleButton" title="Click to hide Index section">Constants ▾</h2>
{{ range . -}}
<pre>{{node_html $ .Decl true}}</pre>
{{ comment_html .Doc -}}
{{ end -}}
</div>
</div>
{{ end -}}
{{ with .Vars -}}
<h2 id="pkg-variables">Variables</h2>
{{ range . -}}
<pre>{{node_html $ .Decl true}}</pre>
{{ comment_html .Doc -}}
{{ end -}}
{{ end -}}
{{ range .Funcs -}}
{{/* Name is a string - no need for FSet */ -}}
{{ $name_html := html .Name -}}
<h2 id="{{$name_html}}">func <a href="{{posLink_url $ .Decl}}">{{$name_html}}</a></h2>
<pre>{{node_html $ .Decl true}}</pre>
{{comment_html .Doc}}
{{example_html $ .Name}}
{{callgraph_html $ "" .Name}}
{{ end -}}
{{ range .Types -}}
{{$tname := .Name -}}
{{$tname_html := html .Name -}}
<h2 id="{{$tname_html}}">type <a href="{{posLink_url $ .Decl}}">{{$tname_html}}</a></h2>
<pre>{{node_html $ .Decl true}}</pre>
{{comment_html .Doc}}
{{ range .Consts -}}
<pre>{{node_html $ .Decl true}}</pre>
{{ comment_html .Doc -}}
{{ end -}}
{{ range .Vars -}}
<pre>{{node_html $ .Decl true}}</pre>
{{comment_html .Doc}}
{{ end -}}
{{ example_html $ $tname -}}
{{ implements_html $ $tname -}}
{{ methodset_html $ $tname -}}
{{ range .Funcs -}}
{{ $name_html := html .Name -}}
<h3 id="{{$name_html}}">func <a href="{{posLink_url $ .Decl}}">{{$name_html}}</a></h3>
<pre>{{node_html $ .Decl true}}</pre>
{{comment_html .Doc}}
{{example_html $ .Name}}
{{callgraph_html $ "" .Name}}
{{ end -}}
{{ range .Methods -}}
{{ $name_html := html .Name -}}
{{ if is_op_deprecated $.PDoc.Name .Name -}}
<h3 id="{{$tname_html}}.{{$name_html}}">func ({{html .Recv}}) <a href="{{posLink_url $ .Decl}}">{{$name_html}}</a><div class="deprecated">Deprecated</div></h3>
{{ else }}
<h3 id="{{$tname_html}}.{{$name_html}}">func ({{html .Recv}}) <a href="{{posLink_url $ .Decl}}">{{$name_html}}</a></h3>
{{ end -}}
<pre>{{node_html $ .Decl true}}</pre>
{{comment_html .Doc}}
{{$name := printf "%s_%s" $tname .Name}}
{{example_html $ $name}}
{{callgraph_html $ .Recv .Name}}
{{ end -}}
{{ end -}}
{{ end -}}
{{ with $.Notes -}}
{{ range $marker, $content := . -}}
<h2 id="pkg-note-{{$marker}}">{{noteTitle $marker | html}}s</h2>
<ul style="list-style: none; padding: 0;">
{{ range . -}}
<li><a href="{{posLink_url $ .}}">&#x261e;</a> {{html .Body}}</li>
{{ end -}}
</ul>
{{ end -}}
{{ end -}}
{{ end -}}
{{ with .PAst -}}
{{ range $filename, $ast := . -}}
<a href="{{$filename|srcLink|html}}">{{$filename|filename|html}}</a>:<pre>{{node_html $ $ast false}}</pre>
{{ end -}}
{{ end -}}

View file

@ -0,0 +1,25 @@
<html>
<head>
<link type="text/css" rel="stylesheet" href="/sdk-for-go/api/lib/godoc/style.css">
</head>
<body>
<div style="overflow-x:hidden;text-align:center;">
<div id="mobile_container">
<div id="mobile_only">
<ul class="packages" style="line-height:1.25;font-size:larger;padding-left:60px"> <a href="https://aws.amazon.com/blogs/developer/category/go/">Blog</a>
</ul>
<ul class="packages" style="line-height:1.25;font-size:larger;padding-left:60px">
<a href="https://aws.amazon.com/forms/aws-doc-feedback?hidden_service_name=godoc&hidden_file_name=godoc&hidden_guide_name=godoc&hidden_api_version=HEAD">Feedback</a>
</ul>
</div>
<ul class="packages" >
{{range .List}}
<li style="padding-left: {{multiply (add .Depth 1) 20}}px;">
<a target="_parent" href="{{srcLink .Path}}/">{{html .Name}}</a>
</li>
{{end}}
</ul>
</div>
</div>
</body>
</html>

View file

@ -0,0 +1,18 @@
<!--
Copyright 2009 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
{{with .Alert}}
<p>
<span class="alert" style="font-size:120%">{{html .}}</span>
</p>
{{end}}
{{with .Alt}}
<p>
<span class="alert" style="font-size:120%">Did you mean: </span>
{{range .Alts}}
<a href="search?q={{urlquery .}}" style="font-size:120%">{{html .}}</a>
{{end}}
</p>
{{end}}

View file

@ -0,0 +1,54 @@
QUERY
{{.Query}}
{{with .Alert}}{{.}}
{{end}}{{/* .Alert */}}{{/*
---------------------------------------
*/}}{{with .Alt}}DID YOU MEAN
{{range .Alts}} {{.}}
{{end}}
{{end}}{{/* .Alt */}}{{/*
---------------------------------------
*/}}{{with .Pak}}PACKAGE {{$.Query}}
{{range .}} {{pkgLink .Pak.Path}}
{{end}}
{{end}}{{/* .Pak */}}{{/*
---------------------------------------
*/}}{{range $key, $val := .Idents}}{{if $val}}{{$key.Name}}
{{range $val}} {{.Path}}.{{.Name}}
{{end}}
{{end}}{{end}}{{/* .Idents */}}{{/*
---------------------------------------
*/}}{{with .Hit}}{{with .Decls}}PACKAGE-LEVEL DECLARATIONS
{{range .}}package {{.Pak.Name}}
{{range $file := .Files}}{{range .Groups}}{{range .}} {{srcLink $file.File.Path}}:{{infoLine .}}{{end}}
{{end}}{{end}}{{/* .Files */}}
{{end}}{{end}}{{/* .Decls */}}{{/*
---------------------------------------
*/}}{{with .Others}}LOCAL DECLARATIONS AND USES
{{range .}}package {{.Pak.Name}}
{{range $file := .Files}}{{range .Groups}}{{range .}} {{srcLink $file.File.Path}}:{{infoLine .}}
{{end}}{{end}}{{end}}{{/* .Files */}}
{{end}}{{end}}{{/* .Others */}}{{end}}{{/* .Hit */}}{{/*
---------------------------------------
*/}}{{if .Textual}}{{if .Complete}}{{.Found}} TEXTUAL OCCURRENCES{{else}}MORE THAN {{.Found}} TEXTUAL OCCURRENCES{{end}}
{{range .Textual}}{{len .Lines}} {{srcLink .Filename}}
{{end}}{{if not .Complete}}... ...
{{end}}{{end}}

View file

@ -0,0 +1,64 @@
<!--
Copyright 2009 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
{{$query_url := urlquery .Query}}
{{if not .Idents}}
{{with .Pak}}
<h2 id="Packages">Package {{html $.Query}}</h2>
<p>
<table class="layout">
{{range .}}
{{$pkg_html := pkgLink .Pak.Path | html}}
<tr><td><a href="/{{$pkg_html}}">{{$pkg_html}}</a></td></tr>
{{end}}
</table>
</p>
{{end}}
{{end}}
{{with .Hit}}
{{with .Decls}}
<h2 id="Global">Package-level declarations</h2>
{{range .}}
{{$pkg_html := pkgLink .Pak.Path | html}}
<h3 id="Global_{{$pkg_html}}">package <a href="/{{$pkg_html}}">{{html .Pak.Name}}</a></h3>
{{range .Files}}
{{$file := .File.Path}}
{{range .Groups}}
{{range .}}
{{$line := infoLine .}}
<a href="{{queryLink $file $query_url $line | html}}">{{$file}}:{{$line}}</a>
{{infoSnippet_html .}}
{{end}}
{{end}}
{{end}}
{{end}}
{{end}}
{{with .Others}}
<h2 id="Local">Local declarations and uses</h2>
{{range .}}
{{$pkg_html := pkgLink .Pak.Path | html}}
<h3 id="Local_{{$pkg_html}}">package <a href="/{{$pkg_html}}">{{html .Pak.Name}}</a></h3>
{{range .Files}}
{{$file := .File.Path}}
<a href="{{queryLink $file $query_url 0 | html}}">{{$file}}</a>
<table class="layout">
{{range .Groups}}
<tr>
<td width="25"></td>
<th align="left" valign="top">{{index . 0 | infoKind_html}}</th>
<td align="left" width="4"></td>
<td>
{{range .}}
{{$line := infoLine .}}
<a href="{{queryLink $file $query_url $line | html}}">{{$line}}</a>
{{end}}
</td>
</tr>
{{end}}
</table>
{{end}}
{{end}}
{{end}}
{{end}}

View file

@ -0,0 +1,24 @@
<!--
Copyright 2009 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
{{range $key, $val := .Idents}}
{{if $val}}
<h2 id="{{$key.Name}}">{{$key.Name}}</h2>
{{range $val}}
{{$pkg_html := pkgLink .Path | html}}
{{if eq "Packages" $key.Name}}
<a href="/{{$pkg_html}}">{{html .Path}}</a>
{{else}}
{{$doc_html := docLink .Path .Name| html}}
<a href="/{{$pkg_html}}">{{html .Package}}</a>.<a href="{{$doc_html}}">{{.Name}}</a>
{{end}}
{{if .Doc}}
<p>{{comment_html .Doc}}</p>
{{else}}
<p><em>No documentation available</em></p>
{{end}}
{{end}}
{{end}}
{{end}}

View file

@ -0,0 +1,42 @@
<!--
Copyright 2009 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
{{$query_url := urlquery .Query}}
{{with .Textual}}
{{if $.Complete}}
<h2 id="Textual">{{html $.Found}} textual occurrences</h2>
{{else}}
<h2 id="Textual">More than {{html $.Found}} textual occurrences</h2>
<p>
<span class="alert" style="font-size:120%">Not all files or lines containing "{{html $.Query}}" are shown.</span>
</p>
{{end}}
<p>
<table class="layout">
{{range .}}
{{$file := .Filename}}
<tr>
<td align="left" valign="top">
<a href="{{queryLink $file $query_url 0}}">{{$file}}</a>:
</td>
<td align="left" width="4"></td>
<th align="left" valign="top">{{len .Lines}}</th>
<td align="left" width="4"></td>
<td align="left">
{{range .Lines}}
<a href="{{queryLink $file $query_url .}}">{{html .}}</a>
{{end}}
{{if not $.Complete}}
...
{{end}}
</td>
</tr>
{{end}}
{{if not $.Complete}}
<tr><td align="left">...</td></tr>
{{end}}
</table>
</p>
{{end}}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,82 @@
<html>
<head>
<body>
<h2> AWS SDK for Go </h2>
<p>
aws-sdk-go is the official AWS SDK for the Go programming language.
Checkout our release notes for information about the latest bug fixes, updates, and features added to the SDK.
</p>
<h3> Installing </h3>
<p>
If you are using Go 1.5 with the GO15VENDOREXPERIMENT=1 vendoring flag you can use the following to get the SDK as the SDK's runtime dependencies are vendored in the vendor folder.
</p>
<pre class="bash"> $ go get -u github.com/aws/aws-sdk-go </pre>
<p>
Otherwise you'll need to tell Go to get the SDK and all of its dependencies.
</p>
<pre> $ go get -u github.com/aws/aws-sdk-go/... </pre>
<h3> Configuring Credentials </h3>
<p>
Before using the SDK, ensure that you've configured credentials. The best way to configure credentials on a development machine is to use the ~/.aws/credentials file, which might look like:
</p>
<pre>
[default]
aws_access_key_id = AKID1234567890
aws_secret_access_key = MY-SECRET-KEY
</pre>
<p>
You can learn more about the credentials file from this blog post.
Alternatively, you can set the following environment variables:
</p>
<pre>
AWS_ACCESS_KEY_ID=AKID1234567890
AWS_SECRET_ACCESS_KEY=MY-SECRET-KEY
</pre>
<h4> AWS CLI config file (~/aws/config) </h4>
<p>
The AWS SDK for Go does not support the AWS CLI's config file. The SDK will not use any contents from this file. The SDK only supports the shared credentials file (~/aws/credentials). #384 tracks this feature request discussion.
</p>
<h3> Using the Go SDK </h3>
<p>
To use a service in the SDK, create a service variable by calling the New() function. Once you have a service client, you can call API operations which each return response data and a possible error.
To list a set of instance IDs from EC2, you could run:
</p>
<pre>
package main
import (
"fmt"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/ec2"
)
func main() {
// Create an EC2 service object in the "us-west-2" region
// Note that you can also configure your region globally by
// exporting the AWS_REGION environment variable
svc := ec2.New(session.New(), &aws.Config{Region: aws.String("us-west-2")})
// Call the DescribeInstances Operation
resp, err := svc.DescribeInstances(nil)
if err != nil {
panic(err)
}
// resp has all of the response data, pull out instance IDs:
fmt.Println("> Number of reservation sets: ", len(resp.Reservations))
for idx, res := range resp.Reservations {
fmt.Println(" > Number of instances: ", len(res.Instances))
for _, inst := range resp.Reservations[idx].Instances {
fmt.Println(" - Instance ID: ", *inst.InstanceId)
}
}
}
</pre>
</body>
</head>
</html>