google

package
v0.0.0-...-50e51bf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2017 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Token() (*oauth2.Token, error)
	PutToken(*oauth2.Token) error
}

Cache specifies the methods that implement a Token cache.

type CacheFile

type CacheFile string

CacheFile implements Cache. Its value is the name of the file in which the Token is stored in JSON format.

func (CacheFile) PutToken

func (f CacheFile) PutToken(tok *oauth2.Token) error

PutToken stores the token in the token cache

func (CacheFile) Token

func (f CacheFile) Token() (*oauth2.Token, error)

Token retreives the token from the token cache

type CallbackStatus

type CallbackStatus struct {
	// contains filtered or unexported fields
}

CallbackStatus is returned from the oauth2 callback

type ClientConfig

type ClientConfig struct {
	ClientID     string   `json:"client_id"`
	ClientSecret string   `json:"client_secret"`
	RedirectURIs []string `json:"redirect_uris"`
	AuthURI      string   `json:"auth_uri"`
	TokenURI     string   `json:"token_uri"`
	ProjectID    string   `json:"project_id"`
}

ClientConfig is a data structure definition for the client_secrets.json file. The code unmarshals the JSON configuration file into this structure.

type Config

type Config struct {
	Installed ClientConfig `json:"installed"`
	Web       ClientConfig `json:"web"`
}

Config is a root-level configuration object.

type Google

type Google struct {
	// contains filtered or unexported fields
}

func New

func New() *Google

func (*Google) Get

func (g *Google) Get() ([]*models.Server, error)

func (*Google) Init

func (g *Google) Init() error

func (*Google) Start

func (g *Google) Start(n int) error

func (*Google) Stop

func (g *Google) Stop() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL