client

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

README

How to create service account

Documentation

Index

Constants

View Source
const ReadOnlyScopes = "https://www.googleapis.com/auth/spreadsheets.readonly"
View Source
const ReadWriteScopes = "https://www.googleapis.com/auth/spreadsheets"

Variables

This section is empty.

Functions

func CreateMockClient

func CreateMockClient(summeries ...ResponseSummery) *http.Client

func NewMockClient

func NewMockClient(fn RoundTripFunc) *http.Client

NewMockClient returns *http.Client with Transport replaced to avoid making real calls

func NewReadClient

func NewReadClient(ctx context.Context, clientCredentialsJson string) (*http.Client, error)

NewReadClient creates a http client to access non-public spreedsheets. Account will only have read access

func NewReadWriteClient

func NewReadWriteClient(ctx context.Context, clientCredentialsJson string) (*http.Client, error)

func NewServiceAccountClient

func NewServiceAccountClient(ctx context.Context, clientCredentials []byte, scopes string) (*http.Client, error)

Types

type ResponseSummery

type ResponseSummery struct {
	ResponseCode int
	ResponseBody string
}

type RoundTripFunc

type RoundTripFunc func(req *http.Request) *http.Response

RoundTripFunc .

func (RoundTripFunc) RoundTrip

func (f RoundTripFunc) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip .

Jump to

Keyboard shortcuts

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