Documentation

Overview

    Package transport provides utility methods for creating authenticated transports to Google's HTTP and gRPC APIs. It is intended to be used in conjunction with google.golang.org/api/option.

    This package is not intended for use by end developers. Use the google.golang.org/api/option package to configure API clients.

    Example (ApplicationDefaultCredentials)
    Output:
    
    
    Example (WithCredentialsFile)
    Output:
    
    

    Index

    Examples

    Constants

    This section is empty.

    Variables

    This section is empty.

    Functions

    func Creds

    func Creds(ctx context.Context, opts ...option.ClientOption) (*google.Credentials, error)

      Creds constructs a google.Credentials from the information in the options, or obtains the default credentials in the same way as google.FindDefaultCredentials.

      func DialGRPC

      func DialGRPC(ctx context.Context, opts ...option.ClientOption) (*grpc.ClientConn, error)

        DialGRPC returns a GRPC connection for use communicating with a Google cloud service, configured with the given ClientOptions.

        func DialGRPCInsecure

        func DialGRPCInsecure(ctx context.Context, opts ...option.ClientOption) (*grpc.ClientConn, error)

          DialGRPCInsecure returns an insecure GRPC connection for use communicating with fake or mock Google cloud service implementations, such as emulators. The connection is configured with the given ClientOptions.

          func NewHTTPClient

          func NewHTTPClient(ctx context.Context, opts ...option.ClientOption) (*http.Client, string, error)

            NewHTTPClient returns an HTTP client for use communicating with a Google cloud service, configured with the given ClientOptions. It also returns the endpoint for the service as specified in the options.

            Types

            This section is empty.

            Directories

            Path Synopsis
            Package bytestream provides a client for any service that exposes a ByteStream API.
            Package bytestream provides a client for any service that exposes a ByteStream API.
            Package cert contains certificate tools for Google API clients.
            Package cert contains certificate tools for Google API clients.
            Package grpc supports network connections to GRPC servers.
            Package grpc supports network connections to GRPC servers.
            Package http supports network connections to HTTP servers.
            Package http supports network connections to HTTP servers.
            internal
            dca
            Package dca contains utils for implementing Device Certificate Authentication according to https://google.aip.dev/auth/4114 The overall logic for DCA is as follows: 1.
            Package dca contains utils for implementing Device Certificate Authentication according to https://google.aip.dev/auth/4114 The overall logic for DCA is as follows: 1.