v.io: v.io/x/ref/services/internal/restsigner/signer/v1 Index | Files

package signer

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)

Index

Package Files

signer-gen.go

Constants

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

OAuth2 scopes used by this API.

type PublicKey Uses

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 Uses

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

type PublicKeyCall Uses

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

func (*PublicKeyCall) Context Uses

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 Uses

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 Uses

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 Uses

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 Uses

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

func New Uses

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

func (*Service) PublicKey Uses

func (s *Service) PublicKey() *PublicKeyCall

PublicKey:

func (*Service) Sign Uses

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

Sign:

type SignCall Uses

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

func (*SignCall) Context Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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.