code stringlengths 10 1.34M | language stringclasses 1
value |
|---|---|
// 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.
package packet
import (
"crypto"
"crypto/rand"
"io"
"time"
)
// Config collects a number of parameters along with sensible defaults.
// A nil *Config is v... | Go |
// Copyright 2011 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.
package packet
import (
"code.google.com/p/go.crypto/openpgp/elgamal"
"code.google.com/p/go.crypto/openpgp/errors"
"crypto/dsa"
"crypto/rsa"
"crypto/sha1"... | Go |
// Copyright 2011 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.
package packet
import (
"encoding/binary"
"io"
)
// LiteralData represents an encrypted file. See RFC 4880, section 5.9.
type LiteralData struct {
IsBinary... | Go |
// Copyright 2011 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.
package packet
import (
"code.google.com/p/go.crypto/openpgp/errors"
"compress/flate"
"compress/zlib"
"io"
"strconv"
)
// Compressed represents a compres... | Go |
// Copyright 2011 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.
package packet
import (
"code.google.com/p/go.crypto/openpgp/elgamal"
"code.google.com/p/go.crypto/openpgp/errors"
"crypto/rsa"
"encoding/binary"
"io"
"m... | Go |
// Copyright 2011 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.
package packet
import (
"io"
"io/ioutil"
"strings"
)
// UserId contains text that is intended to represent the name and email
// address of the key holder.... | Go |
// Copyright 2011 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.
package packet
import (
"code.google.com/p/go.crypto/openpgp/errors"
"code.google.com/p/go.crypto/openpgp/s2k"
"crypto"
"crypto/dsa"
"crypto/rsa"
"encodi... | Go |
// Copyright 2011 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.
package packet
import (
"code.google.com/p/go.crypto/openpgp/errors"
"crypto/cipher"
"crypto/sha1"
"crypto/subtle"
"hash"
"io"
"strconv"
)
// Symmetric... | Go |
// 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.
// OpenPGP CFB Mode. http://tools.ietf.org/html/rfc4880#section-13.9
package packet
import (
"crypto/cipher"
)
type ocfbEncrypter struct {
b cipher.B... | Go |
// Copyright 2011 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.
package packet
import (
"bytes"
"code.google.com/p/go.crypto/openpgp/elgamal"
"code.google.com/p/go.crypto/openpgp/errors"
"code.google.com/p/go.crypto/ope... | Go |
// Copyright 2011 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.
package packet
import (
"code.google.com/p/go.crypto/openpgp/errors"
"code.google.com/p/go.crypto/openpgp/s2k"
"crypto"
"encoding/binary"
"io"
"strconv"
... | Go |
// Copyright 2011 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.
package packet
import (
"bytes"
"code.google.com/p/go.crypto/openpgp/errors"
"code.google.com/p/go.crypto/openpgp/s2k"
"crypto/cipher"
"io"
"strconv"
)
... | Go |
// Copyright 2011 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.
// Package packet implements parsing and serialization of OpenPGP packets, as
// specified in RFC 4880.
package packet
import (
"code.google.com/p/go.crypto/c... | Go |
// 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.
/*
Implementation adapted from Needham and Wheeler's paper:
http://www.cix.co.uk/~klockstone/xtea.pdf
A precalculated look up table is used during encryptio... | Go |
// 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.
// Package xtea implements XTEA encryption, as defined in Needham and Wheeler's
// 1997 technical report, "Tea extensions."
package xtea
// For details, see ht... | Go |
// Copyright 2010 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... | Go |
package imp3
type Imp3 struct{}
| Go |
package imp_four
type Imp4 struct{}
| Go |
package imp1
type Imp1 struct{}
| Go |
package imp2
type Imp2 struct{}
| Go |
// An example package with an interface.
package user
// Random bunch of imports to test mockgen.
import "io"
import (
btz "bytes"
"hash"
"log"
"os"
)
// Dependencies outside the standard library.
import (
"gomock.googlecode.com/hg/sample/imp1"
renamed2 "gomock.googlecode.com/hg/sample/imp2"
. "gomock.googleco... | Go |
// Copyright 2010 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... | Go |
// Copyright 2010 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... | Go |
// Copyright 2011 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... | Go |
// Copyright 2010 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... | Go |
/*
try to handle all kinds of makefiles with this tool
*/
package main
import (
"os"
"os/exec"
"flag"
"fmt"
"strings"
"syscall"
"encoding/xml"
"io/ioutil"
)
func main(){
// fmt.Println(os.Args[:])
flag.Parse()
if (flag.NArg() > 2){
fmt.Println(" I only take two argements mostly")
syscall.Exit(1)
}
v... | Go |
package rwxun
import (
"fmt"
"net/http"
"rwxun/controller/sign"
"net/url"
)
func init() {
http.HandleFunc("/", root)
http.HandleFunc("/sign", sign.Home)
http.HandleFunc("/sign/signupform", sign.Signupform)
http.HandleFunc("/sign/signup", sign.Signup)
http.HandleFunc("/sign/signinform", sign.Signinform)
htt... | Go |
package sign
import (
"fmt"
"html/template"
"net/http"
"errors"
"strings"
"time"
"appengine"
"appengine/datastore"
"rwxun/util"
)
type User struct {
User string
Psw string
Time time.Time
SessionCookieKey string
SessionExpire time.Time
}
var cacheTPL = make(map[string]... | Go |
package util
import (
"crypto/md5"
"fmt"
)
func Md5(s string) string {
h := md5.New()
if _,err := h.Write([]byte(s)); err == nil {
return fmt.Sprintf("%x", h.Sum(nil))
}
return ""
}
| Go |
// Package adexchangeseller provides access to the Ad Exchange Seller API.
//
// See https://developers.google.com/adsense/management/
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/adexchangeseller/v1"
// ...
// adexchangesellerService, err := adexchangeseller.New(oauthHttpClient)
pack... | Go |
// Package gan provides access to the Google Affiliate Network API.
//
// See https://developers.google.com/affiliate-network/
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/gan/v1beta1"
// ...
// ganService, err := gan.New(oauthHttpClient)
package gan
import (
"bytes"
"code.google.c... | Go |
// Package adsense provides access to the AdSense Management API.
//
// See https://developers.google.com/adsense/management/
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/adsense/v1.2"
// ...
// adsenseService, err := adsense.New(oauthHttpClient)
package adsense
import (
"bytes"
"c... | Go |
// Package adsense provides access to the AdSense Management API.
//
// See https://developers.google.com/adsense/management/
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/adsense/v1.1"
// ...
// adsenseService, err := adsense.New(oauthHttpClient)
package adsense
import (
"bytes"
"c... | Go |
// Package adsense provides access to the AdSense Management API.
//
// See https://developers.google.com/adsense/management/
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/adsense/v1"
// ...
// adsenseService, err := adsense.New(oauthHttpClient)
package adsense
import (
"bytes"
"cod... | Go |
// Package moderator provides access to the Moderator API.
//
// See http://code.google.com/apis/moderator/v1/using_rest.html
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/moderator/v1"
// ...
// moderatorService, err := moderator.New(oauthHttpClient)
package moderator
import (
"byte... | Go |
// Package storage provides access to the Cloud Storage API.
//
// See https://developers.google.com/storage/docs/json_api/
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/storage/v1beta1"
// ...
// storageService, err := storage.New(oauthHttpClient)
package storage
import (
"bytes"
"... | Go |
// Package shopping provides access to the Search API For Shopping.
//
// See https://developers.google.com/shopping-search/v1/getting_started
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/shopping/v1"
// ...
// shoppingService, err := shopping.New(oauthHttpClient)
package shopping
im... | Go |
// Package adexchangebuyer provides access to the Ad Exchange Buyer API.
//
// See https://developers.google.com/ad-exchange/buyer-rest
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/adexchangebuyer/v1.2"
// ...
// adexchangebuyerService, err := adexchangebuyer.New(oauthHttpClient)
pack... | Go |
// Package adexchangebuyer provides access to the Ad Exchange Buyer API.
//
// See https://developers.google.com/ad-exchange/buyer-rest
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/adexchangebuyer/v1.1"
// ...
// adexchangebuyerService, err := adexchangebuyer.New(oauthHttpClient)
pack... | Go |
// Package adexchangebuyer provides access to the Ad Exchange Buyer API.
//
// See https://developers.google.com/ad-exchange/buyer-rest
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/adexchangebuyer/v1"
// ...
// adexchangebuyerService, err := adexchangebuyer.New(oauthHttpClient)
packag... | Go |
// Package siteverification provides access to the Google Site Verification API.
//
// See http://code.google.com/apis/siteverification/
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/siteverification/v1"
// ...
// siteverificationService, err := siteverification.New(oauthHttpClient)
pa... | Go |
// Package compute provides access to the Compute Engine API.
//
// See https://developers.google.com/compute/docs/reference/v1beta13
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/compute/v1beta13"
// ...
// computeService, err := compute.New(oauthHttpClient)
package compute
import (
... | Go |
// Package compute provides access to the Compute Engine API.
//
// See https://developers.google.com/compute/docs/reference/v1beta14
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/compute/v1beta14"
// ...
// computeService, err := compute.New(oauthHttpClient)
package compute
import (
... | Go |
// Package compute provides access to the Compute Engine API.
//
// See https://developers.google.com/compute/docs/reference/v1beta12
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/compute/v1beta12"
// ...
// computeService, err := compute.New(oauthHttpClient)
package compute
import (
... | Go |
// Package youtube provides access to the YouTube Data API.
//
// See https://developers.google.com/youtube/v3
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/youtube/v3"
// ...
// youtubeService, err := youtube.New(oauthHttpClient)
package youtube
import (
"bytes"
"code.google.com/p/... | Go |
// Package youtube provides access to the YouTube API.
//
// See https://developers.google.com/youtube
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/youtube/v3alpha"
// ...
// youtubeService, err := youtube.New(oauthHttpClient)
package youtube
import (
"bytes"
"code.google.com/p/goo... | Go |
// Package discovery provides access to the APIs Discovery Service.
//
// See https://developers.google.com/discovery/
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/discovery/v1"
// ...
// discoveryService, err := discovery.New(oauthHttpClient)
package discovery
import (
"bytes"
"co... | Go |
// Package analytics provides access to the Google Analytics API.
//
// See https://developers.google.com/analytics/
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/analytics/v3"
// ...
// analyticsService, err := analytics.New(oauthHttpClient)
package analytics
import (
"bytes"
"code... | Go |
// Package analytics provides access to the Google Analytics API.
//
// See https://developers.google.com/analytics/
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/analytics/v2.4"
// ...
// analyticsService, err := analytics.New(oauthHttpClient)
package analytics
import (
"bytes"
"co... | Go |
// Package translate provides access to the Translate API.
//
// See http://code.google.com/apis/language/translate/v2/using_rest.html
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/translate/v2"
// ...
// translateService, err := translate.New(oauthHttpClient)
package translate
import... | Go |
// Package oauth2 provides access to the Google OAuth2 API.
//
// See https://developers.google.com/accounts/docs/OAuth2
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/oauth2/v1"
// ...
// oauth2Service, err := oauth2.New(oauthHttpClient)
package oauth2
import (
"bytes"
"code.google.... | Go |
// Package oauth2 provides access to the Google OAuth2 API.
//
// See https://developers.google.com/accounts/docs/OAuth2
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/oauth2/v2"
// ...
// oauth2Service, err := oauth2.New(oauthHttpClient)
package oauth2
import (
"bytes"
"code.google.... | Go |
// Package reseller provides access to the Enterprise Apps Reseller API.
//
// See https://developers.google.com/google-apps/reseller/
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/reseller/v1"
// ...
// resellerService, err := reseller.New(oauthHttpClient)
package reseller
import (
... | Go |
// Package reseller provides access to the Enterprise Apps Reseller API.
//
// See https://developers.google.com/google-apps/reseller/
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/reseller/v1sandbox"
// ...
// resellerService, err := reseller.New(oauthHttpClient)
package reseller
imp... | Go |
// Package calendar provides access to the Calendar API.
//
// See https://developers.google.com/google-apps/calendar/firstapp
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/calendar/v3"
// ...
// calendarService, err := calendar.New(oauthHttpClient)
package calendar
import (
"bytes"
... | Go |
// Package latitude provides access to the Google Latitude API.
//
// See https://developers.google.com/latitude/v1/using
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/latitude/v1"
// ...
// latitudeService, err := latitude.New(oauthHttpClient)
package latitude
import (
"bytes"
"cod... | Go |
// Package freebase provides access to the Freebase API.
//
// See http://wiki.freebase.com/wiki/API
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/freebase/v1-sandbox"
// ...
// freebaseService, err := freebase.New(oauthHttpClient)
package freebase
import (
"bytes"
"fmt"
"net/http"... | Go |
// Package freebase provides access to the Freebase API.
//
// See http://wiki.freebase.com/wiki/API
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/freebase/v1"
// ...
// freebaseService, err := freebase.New(oauthHttpClient)
package freebase
import (
"bytes"
"code.google.com/p/google... | Go |
// Package freebase provides access to the Freebase API.
//
// See http://wiki.freebase.com/wiki/API
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/freebase/v1sandbox"
// ...
// freebaseService, err := freebase.New(oauthHttpClient)
package freebase
import (
"bytes"
"code.google.com/p... | Go |
// Package audit provides access to the Enterprise Audit API.
//
// See https://developers.google.com/google-apps/admin-audit/get_started
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/audit/v1"
// ...
// auditService, err := audit.New(oauthHttpClient)
package audit
import (
"bytes"
... | Go |
// Package plus provides access to the Google+ API.
//
// See https://developers.google.com/+/history/
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/plus/v1moments"
// ...
// plusService, err := plus.New(oauthHttpClient)
package plus
import (
"bytes"
"code.google.com/p/google-api-go... | Go |
// Package plus provides access to the Google+ API.
//
// See https://developers.google.com/+/api/
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/plus/v1"
// ...
// plusService, err := plus.New(oauthHttpClient)
package plus
import (
"bytes"
"code.google.com/p/google-api-go-client/goo... | Go |
// Package tasks provides access to the Tasks API.
//
// See http://code.google.com/apis/tasks/v1/using.html
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/tasks/v1"
// ...
// tasksService, err := tasks.New(oauthHttpClient)
package tasks
import (
"bytes"
"code.google.com/p/google-api... | Go |
// Copyright 2011 Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"bytes"
"encoding/json"
"errors"
"flag"
"fmt"
"go/parser"
"go/printer"
"go/token"
"io/ioutil"
"log"
"net/http"
"net/url"
"os"
"... | Go |
// Package taskqueue provides access to the TaskQueue API.
//
// See https://developers.google.com/appengine/docs/python/taskqueue/rest
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/taskqueue/v1beta1"
// ...
// taskqueueService, err := taskqueue.New(oauthHttpClient)
package taskqueue
... | Go |
// Package taskqueue provides access to the TaskQueue API.
//
// See https://developers.google.com/appengine/docs/python/taskqueue/rest
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/taskqueue/v1beta2"
// ...
// taskqueueService, err := taskqueue.New(oauthHttpClient)
package taskqueue
... | Go |
// Package blogger provides access to the Blogger API.
//
// See https://developers.google.com/blogger/docs/3.0/getting_started
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/blogger/v3"
// ...
// bloggerService, err := blogger.New(oauthHttpClient)
package blogger
import (
"bytes"
"c... | Go |
// Package blogger provides access to the Blogger API.
//
// See https://developers.google.com/blogger/docs/2.0/json/getting_started
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/blogger/v2"
// ...
// bloggerService, err := blogger.New(oauthHttpClient)
package blogger
import (
"bytes... | Go |
// Package coordinate provides access to the Google Maps Coordinate API.
//
// See https://developers.google.com/coordinate/
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/coordinate/v1"
// ...
// coordinateService, err := coordinate.New(oauthHttpClient)
package coordinate
import (
"b... | Go |
// Package groupssettings provides access to the Groups Settings API.
//
// See https://developers.google.com/google-apps/groups-settings/get_started
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/groupssettings/v1"
// ...
// groupssettingsService, err := groupssettings.New(oauthHttpCli... | Go |
// Package urlshortener provides access to the URL Shortener API.
//
// See http://code.google.com/apis/urlshortener/v1/getting_started.html
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/urlshortener/v1"
// ...
// urlshortenerService, err := urlshortener.New(oauthHttpClient)
package ur... | Go |
// Package licensing provides access to the Enterprise License Manager API.
//
// See https://developers.google.com/google-apps/licensing/
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/licensing/v1"
// ...
// licensingService, err := licensing.New(oauthHttpClient)
package licensing
im... | Go |
// Package pagespeedonline provides access to the Page Speed Online API.
//
// See https://developers.google.com/speed/docs/insights/v1/getting_started
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/pagespeedonline/v1"
// ...
// pagespeedonlineService, err := pagespeedonline.New(oauthHt... | Go |
// Package dfareporting provides access to the DFA Reporting API.
//
// See https://developers.google.com/doubleclick-advertisers/reporting/
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/dfareporting/v1.1"
// ...
// dfareportingService, err := dfareporting.New(oauthHttpClient)
package ... | Go |
// Package dfareporting provides access to the DFA Reporting API.
//
// See https://developers.google.com/doubleclick-advertisers/reporting/
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/dfareporting/v1"
// ...
// dfareportingService, err := dfareporting.New(oauthHttpClient)
package df... | Go |
// Package androidpublisher provides access to the Google Play Android Developer API.
//
// See https://developers.google.com/android-publisher
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/androidpublisher/v1"
// ...
// androidpublisherService, err := androidpublisher.New(oauthHttpCli... | Go |
// Package books provides access to the Books API.
//
// See https://developers.google.com/books/docs/v1/getting_started
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/books/v1"
// ...
// booksService, err := books.New(oauthHttpClient)
package books
import (
"bytes"
"code.google.com/... | Go |
// Package prediction provides access to the Prediction API.
//
// See https://developers.google.com/prediction/docs/developer-guide
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/prediction/v1.3"
// ...
// predictionService, err := prediction.New(oauthHttpClient)
package prediction
im... | Go |
// Package prediction provides access to the Prediction API.
//
// See https://developers.google.com/prediction/docs/developer-guide
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/prediction/v1.2"
// ...
// predictionService, err := prediction.New(oauthHttpClient)
package prediction
im... | Go |
// Package prediction provides access to the Prediction API.
//
// See https://developers.google.com/prediction/docs/developer-guide
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/prediction/v1.5"
// ...
// predictionService, err := prediction.New(oauthHttpClient)
package prediction
im... | Go |
// Package prediction provides access to the Prediction API.
//
// See https://developers.google.com/prediction/docs/developer-guide
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/prediction/v1.4"
// ...
// predictionService, err := prediction.New(oauthHttpClient)
package prediction
im... | Go |
// Package orkut provides access to the Orkut API.
//
// See http://code.google.com/apis/orkut/v2/reference.html
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/orkut/v2"
// ...
// orkutService, err := orkut.New(oauthHttpClient)
package orkut
import (
"bytes"
"code.google.com/p/google... | Go |
package main
import (
"log"
"net/http"
orkut "code.google.com/p/google-api-go-client/orkut/v2"
)
func init() {
registerDemo("orkut", orkut.OrkutScope, orkutMain)
}
func orkutMain(client *http.Client, argv []string) {
orkutapi, _ := orkut.New(client)
myBadges, err := orkutapi.Badges.List("me").Do()
if err != ... | Go |
package main
import (
"fmt"
"log"
"net/http"
"os"
"strings"
urlshortener "code.google.com/p/google-api-go-client/urlshortener/v1"
)
func init() {
registerDemo("urlshortener", urlshortener.UrlshortenerScope, urlShortenerMain)
}
func urlShortenerMain(client *http.Client, argv []string) {
if len(argv) != 1 {
... | Go |
// Copyright 2011 Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"encoding/gob"
"errors"
"flag"
"fmt"
"io/ioutil"
"log"
"net/http"
"net/http/httptest"
"net/url"
"os"
"os/exec"
"path/filepath"
"... | Go |
package main
import (
"bytes"
"fmt"
"io"
"io/ioutil"
"net/http"
"os"
)
type logTransport struct {
rt http.RoundTripper
}
func (t *logTransport) RoundTrip(req *http.Request) (*http.Response, error) {
var buf bytes.Buffer
os.Stdout.Write([]byte("\n[request]\n"))
if req.Body != nil {
req.Body = ioutil.NopC... | Go |
package main
import (
"fmt"
"log"
"net/http"
"os"
storage "code.google.com/p/google-api-go-client/storage/v1beta1"
)
func init() {
registerDemo("storage", storage.DevstorageRead_writeScope, storageMain)
}
func storageMain(client *http.Client, argv []string) {
if len(argv) != 2 {
fmt.Fprintln(os.Stderr, "Us... | Go |
package main
import (
"fmt"
"log"
"net/http"
"os"
drive "code.google.com/p/google-api-go-client/drive/v2"
)
func init() {
registerDemo("drive", drive.DriveScope, driveMain)
}
func driveMain(client *http.Client, argv []string) {
if len(argv) != 1 {
fmt.Fprintln(os.Stderr, "Usage: drive filename (to upload a... | Go |
package main
import (
"log"
"net/http"
tasks "code.google.com/p/google-api-go-client/tasks/v1"
)
func init() {
registerDemo("tasks", tasks.TasksScope, tasksMain)
}
func tasksMain(client *http.Client, argv []string) {
taskapi, _ := tasks.New(client)
task, err := taskapi.Tasks.Insert("@default", &tasks.Task{
... | Go |
package main
import (
"fmt"
"log"
"net/http"
"os"
compute "code.google.com/p/google-api-go-client/compute/v1beta12"
)
func init() {
registerDemo("compute", compute.ComputeScope, computeMain)
}
func computeMain(client *http.Client, argv []string) {
if len(argv) != 2 {
fmt.Fprintln(os.Stderr, "Usage: compute... | Go |
// Package civicinfo provides access to the Google Civic Information API.
//
// See https://developers.google.com/civic-information
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/civicinfo/us_v1"
// ...
// civicinfoService, err := civicinfo.New(oauthHttpClient)
package civicinfo
import... | Go |
// Package webfonts provides access to the Google Fonts Developer API.
//
// See https://developers.google.com/fonts/docs/developer_api
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/webfonts/v1"
// ...
// webfontsService, err := webfonts.New(oauthHttpClient)
package webfonts
import (
... | Go |
// Package drive provides access to the Drive API.
//
// See https://developers.google.com/drive/
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/drive/v1"
// ...
// driveService, err := drive.New(oauthHttpClient)
package drive
import (
"bytes"
"code.google.com/p/google-api-go-client/... | Go |
// Package drive provides access to the Drive API.
//
// See https://developers.google.com/drive/
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/drive/v2"
// ...
// driveService, err := drive.New(oauthHttpClient)
package drive
import (
"bytes"
"code.google.com/p/google-api-go-client/... | Go |
// Package mirror provides access to the Google Mirror API.
//
// See https://developers.google.com/glass
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/mirror/v1"
// ...
// mirrorService, err := mirror.New(oauthHttpClient)
package mirror
import (
"bytes"
"code.google.com/p/google-ap... | Go |
// Package customsearch provides access to the CustomSearch API.
//
// See https://developers.google.com/custom-search/v1/using_rest
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/customsearch/v1"
// ...
// customsearchService, err := customsearch.New(oauthHttpClient)
package customsear... | Go |
// Package bigquery provides access to the BigQuery API.
//
// See https://code.google.com/apis/bigquery/docs/v2/
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/bigquery/v2beta1"
// ...
// bigqueryService, err := bigquery.New(oauthHttpClient)
package bigquery
import (
"bytes"
"fmt"
... | Go |
// Package bigquery provides access to the BigQuery API.
//
// See https://developers.google.com/bigquery/docs/overview
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/bigquery/v2"
// ...
// bigqueryService, err := bigquery.New(oauthHttpClient)
package bigquery
import (
"bytes"
"code.... | Go |
// Package youtubeanalytics provides access to the YouTube Analytics API.
//
// See http://developers.google.com/youtube/analytics/
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/youtubeanalytics/v1beta1"
// ...
// youtubeanalyticsService, err := youtubeanalytics.New(oauthHttpClient)
pa... | Go |
// Package youtubeanalytics provides access to the YouTube Analytics API.
//
// See http://developers.google.com/youtube/analytics/
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/youtubeanalytics/v1"
// ...
// youtubeanalyticsService, err := youtubeanalytics.New(oauthHttpClient)
package... | Go |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.