Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseRequest

type BaseRequest struct {
	Secret    []byte `json:"secret"`
	AccountID string `json:"account_id"`
}

    BaseRequest defines fields included in all requests.

    func (*BaseRequest) Validate

    func (r *BaseRequest) Validate() error

      Validate checks that the request is structurally valid.

      type BaseResponse

      type BaseResponse struct {
      	ErrorCode    int    `json:"error_code,omitempty"`
      	ErrorMessage string `json:"error_message,omitempty"`
      }

        BaseResponse defines optional fields included in all responses.

        type GetIDTokenRequest

        type GetIDTokenRequest struct {
        	BaseRequest
        
        	Audience string `json:"audience"`
        }

          GetIDTokenRequest is parameters for GetIDToken RPC call.

          func (*GetIDTokenRequest) Validate

          func (r *GetIDTokenRequest) Validate() error

            Validate checks that the request is structurally valid.

            type GetIDTokenResponse

            type GetIDTokenResponse struct {
            	BaseResponse
            
            	IDToken string `json:"id_token"`
            	Expiry  int64  `json:"expiry"`
            }

              GetIDTokenResponse is returned by GetIDToken RPC call.

              type GetOAuthTokenRequest

              type GetOAuthTokenRequest struct {
              	BaseRequest
              
              	Scopes []string `json:"scopes"`
              }

                GetOAuthTokenRequest is parameters for GetOAuthToken RPC call.

                func (*GetOAuthTokenRequest) Validate

                func (r *GetOAuthTokenRequest) Validate() error

                  Validate checks that the request is structurally valid.

                  type GetOAuthTokenResponse

                  type GetOAuthTokenResponse struct {
                  	BaseResponse
                  
                  	AccessToken string `json:"access_token"`
                  	Expiry      int64  `json:"expiry"`
                  }

                    GetOAuthTokenResponse is returned by GetOAuthToken RPC call.