README

Auto generated client for the signer service.

The service is implemented using Cloud Endpoints
https://cloud.google.com/endpoints/

The signer-api.json file is auto generated from the server implementation.

The signer-gen.go file is generated using
google.golang.org/api/google-api-go-generator:

google-api-go-generator -api_json_file=signer-api.json -output=signer-gen.go -api_pkg_base=v.io/x/ref/services/internal/restsigner

Expand ▾ Collapse ▴

Documentation

Overview

    Package signer provides access to the .

    Usage example:

    import "v.io/x/ref/services/internal/restsigner/signer/v1"
    ...
    signerService, err := signer.New(oauthHttpClient)
    

    Index

    Constants

    View Source
    const (
    	// View your email address
    	UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.email"
    )

      OAuth2 scopes used by this API.

      Variables

      This section is empty.

      Functions

      This section is empty.

      Types

      type PublicKey

      type PublicKey struct {
      	Base64 string `json:"base64,omitempty"`
      
      	// ServerResponse contains the HTTP response code and headers from the
      	// server.
      	googleapi.ServerResponse `json:"-"`
      
      	// ForceSendFields is a list of field names (e.g. "Base64") to
      	// unconditionally include in API requests. By default, fields with
      	// empty values are omitted from API requests. However, any non-pointer,
      	// non-interface field appearing in ForceSendFields will be sent to the
      	// server regardless of whether the field is empty or not. This may be
      	// used to include empty fields in Patch requests.
      	ForceSendFields []string `json:"-"`
      
      	// NullFields is a list of field names (e.g. "Base64") to include in API
      	// requests with the JSON null value. By default, fields with empty
      	// values are omitted from API requests. However, any field with an
      	// empty value appearing in NullFields will be sent to the server as
      	// null. It is an error if a field in this list has a non-empty value.
      	// This may be used to include null fields in Patch requests.
      	NullFields []string `json:"-"`
      }

      func (*PublicKey) MarshalJSON

      func (s *PublicKey) MarshalJSON() ([]byte, error)

      type PublicKeyCall

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

      func (*PublicKeyCall) Context

      func (c *PublicKeyCall) Context(ctx context.Context) *PublicKeyCall

        Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

        func (*PublicKeyCall) Do

        func (c *PublicKeyCall) Do(opts ...googleapi.CallOption) (*PublicKey, error)

          Do executes the "signer.publicKey" call. Exactly one of *PublicKey or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *PublicKey.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

          func (*PublicKeyCall) Fields

          func (c *PublicKeyCall) Fields(s ...googleapi.Field) *PublicKeyCall

            Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

            func (*PublicKeyCall) Header

            func (c *PublicKeyCall) Header() http.Header

              Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

              type Service

              type Service struct {
              	BasePath  string // API endpoint base URL
              	UserAgent string // optional additional User-Agent fragment
              	// contains filtered or unexported fields
              }

              func New

              func New(client *http.Client) (*Service, error)

              func (*Service) PublicKey

              func (s *Service) PublicKey() *PublicKeyCall

                PublicKey:

                func (*Service) Sign

                func (s *Service) Sign(base64 string) *SignCall

                  Sign:

                  type SignCall

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

                  func (*SignCall) Context

                  func (c *SignCall) Context(ctx context.Context) *SignCall

                    Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

                    func (*SignCall) Do

                    func (c *SignCall) Do(opts ...googleapi.CallOption) (*VSignature, error)

                      Do executes the "signer.sign" call. Exactly one of *VSignature or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *VSignature.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

                      func (*SignCall) Fields

                      func (c *SignCall) Fields(s ...googleapi.Field) *SignCall

                        Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

                        func (*SignCall) Header

                        func (c *SignCall) Header() http.Header

                          Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

                          type VSignature

                          type VSignature struct {
                          	R string `json:"r,omitempty"`
                          
                          	S string `json:"s,omitempty"`
                          
                          	// ServerResponse contains the HTTP response code and headers from the
                          	// server.
                          	googleapi.ServerResponse `json:"-"`
                          
                          	// ForceSendFields is a list of field names (e.g. "R") to
                          	// unconditionally include in API requests. By default, fields with
                          	// empty values are omitted from API requests. However, any non-pointer,
                          	// non-interface field appearing in ForceSendFields will be sent to the
                          	// server regardless of whether the field is empty or not. This may be
                          	// used to include empty fields in Patch requests.
                          	ForceSendFields []string `json:"-"`
                          
                          	// NullFields is a list of field names (e.g. "R") to include in API
                          	// requests with the JSON null value. By default, fields with empty
                          	// values are omitted from API requests. However, any field with an
                          	// empty value appearing in NullFields will be sent to the server as
                          	// null. It is an error if a field in this list has a non-empty value.
                          	// This may be used to include null fields in Patch requests.
                          	NullFields []string `json:"-"`
                          }

                          func (*VSignature) MarshalJSON

                          func (s *VSignature) MarshalJSON() ([]byte, error)

                          Source Files