import "v.io/x/ref/services/internal/restsigner/signer/v1"
Package signer provides access to the .
Usage example:
import "v.io/x/ref/services/internal/restsigner/signer/v1" ... signerService, err := signer.New(oauthHttpClient)
const ( // View your email address UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.email" )
OAuth2 scopes used by this API.
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:"-"` }
type PublicKeyCall struct {
// contains filtered or unexported fields
}
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 (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 (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 (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 struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment // contains filtered or unexported fields }
func (s *Service) PublicKey() *PublicKeyCall
PublicKey:
Sign:
type SignCall struct {
// contains filtered or unexported fields
}
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 (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.
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
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 (s *VSignature) MarshalJSON() ([]byte, error)
Package signer imports 13 packages (graph) and is imported by 1 packages. Updated 2020-09-08. Refresh now. Tools for package owners.