blob: f8fb23596827973372e3379830200403ee568607 [file] [log] [blame]
<section class="hero-banner">
<div class="container clearfix">
<div class="quote-box">
<h1>google-cloud</h1>
<p>Google Cloud Client Libraries for Go
- an idiomatic, intuitive, and natural way for Go developers to
integrate with Google Cloud Platform services, like Cloud Datastore
and Cloud Storage.</p>
</div>
<div class="quote-box--supplementary">
<pre class="skip-highlight"><code class="subtle--blue">$</code> go get <strong>cloud.google.com/go</strong></pre>
</div>
</div><!-- end of .container -->
</section><!-- end of .hero-banner -->
<section class="block featuring">
<div class="container">
<ul class="featuring-links">
<li>
<a href="https://godoc.org/cloud.google.com/go" title="google-cloud-go docs" class="btn btn-docs">
<img src="src/images/icon-lang-go-godoc.ico" alt="Godoc icon" />
Read the Docs
</a>
</li>
<li>
<a href="https://github.com/googleapis/google-cloud-go" title="google-cloud on GitHub" class="ext-link">
<img src="src/images/icon-link-github.svg" alt="GitHub icon" />
GitHub
</a>
</li>
<li>
<a href="https://github.com/googleapis/google-cloud-go/issues" title="google-cloud issues on Github" class="ext-link">
<img src="src/images/icon-link-github.svg" alt="GitHub icon" />
Issues
</a>
</li>
<li>
<a href="http://stackoverflow.com/questions/tagged/google-cloud-platform+go" title="google-cloud on StackOverflow" class="ext-link">
<img src="src/images/icon-link-stackoverflow.svg" alt="StackOverflow icon" />
StackOverflow
</a>
</li>
</ul>
</div><!-- end of .container -->
</section><!-- end of .featuring -->
<section class="block about">
<div class="container clearfix">
<div class="quote-box">
<h3 class="block-title">What are they?</h3>
<p>The Google Cloud Client Libraries for Go significantly reduce the boilerplate
code you have to write to access Google Cloud APIs. The packages provide high-level API
abstractions so they're easier to understand. They embrace the
idioms of Go, works well with the standard library, and
integrate better with your codebase.
All this means you spend more time creating code that matters
to you.</p>
<p>The clients are configured to access Google Cloud Platform
services and authenticate (OAuth 2.0) automatically on your behalf.
With the standard <code>go get</code> and a private key, you are up and ready
to go.
</div>
<div class="quote-box--supplementary">
<h4>Read an object from Cloud Storage</h4>
<div hljs hljs-language="go">
ctx := context.Background()
client, err := storage.NewClient(ctx)
if err != nil { ... }
obj := client.Bucket("bucket").Object("object")
r, err := obj.NewReader(ctx)
if err != nil { ... }
defer r.Close()
body, err := ioutil.ReadAll(r)
if err != nil { ... }
</div>
</div><!-- end of .container -->
</section><!-- end of .featuring -->
<section class="block">
<div class="container clearfix">
<h3 class="block-title">FAQ</h3>
<h4>What is the relationship between the google-cloud library and the gcloud command-line tool?</h4>
<p>Both the gcloud command-line tool and google-cloud library are a part
of the Google Cloud SDK: a collection of tools and libraries that enable
you to easily create and manage resources on the Google Cloud Platform.
The gcloud command-line tool can be used to manage both your development
workflow and your Google Cloud Platform resources while the google-cloud
library is the Google Cloud Client Library for Go.</p>
</div>
</section> <!-- end of FAQ -->