tlog

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2021 License: Apache-2.0 Imports: 11 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client for tlog API

func (*Client) GetLogInfo

func (a *Client) GetLogInfo(params *GetLogInfoParams) (*GetLogInfoOK, error)

GetLogInfo gets information about the current state of the transparency log

Returns the current root hash and size of the merkle tree used to store the log entries.

func (*Client) GetLogProof

func (a *Client) GetLogProof(params *GetLogProofParams) (*GetLogProofOK, error)

GetLogProof gets information required to generate a consistency proof for the transparency log

Returns a list of hashes for specified tree sizes that can be used to confirm the consistency of the transparency log

func (*Client) GetPublicKey

func (a *Client) GetPublicKey(params *GetPublicKeyParams) (*GetPublicKeyOK, error)

GetPublicKey retrieves the public key that can be used to validate the signed tree head

Returns the public key that can be used to validate the signed tree head

func (*Client) SetTransport

func (a *Client) SetTransport(transport runtime.ClientTransport)

SetTransport changes the transport on the client

type ClientService

type ClientService interface {
	GetLogInfo(params *GetLogInfoParams) (*GetLogInfoOK, error)

	GetLogProof(params *GetLogProofParams) (*GetLogProofOK, error)

	GetPublicKey(params *GetPublicKeyParams) (*GetPublicKeyOK, error)

	SetTransport(transport runtime.ClientTransport)
}

ClientService is the interface for Client methods

func New

func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService

New creates a new tlog API client.

type GetLogInfoDefault

type GetLogInfoDefault struct {
	Payload *models.Error
	// contains filtered or unexported fields
}

GetLogInfoDefault handles this case with default header values.

There was an internal error in the server while processing the request

func NewGetLogInfoDefault

func NewGetLogInfoDefault(code int) *GetLogInfoDefault

NewGetLogInfoDefault creates a GetLogInfoDefault with default headers values

func (*GetLogInfoDefault) Code

func (o *GetLogInfoDefault) Code() int

Code gets the status code for the get log info default response

func (*GetLogInfoDefault) Error

func (o *GetLogInfoDefault) Error() string

func (*GetLogInfoDefault) GetPayload

func (o *GetLogInfoDefault) GetPayload() *models.Error

type GetLogInfoOK

type GetLogInfoOK struct {
	Payload *models.LogInfo
}

GetLogInfoOK handles this case with default header values.

A JSON object with the root hash and tree size as properties

func NewGetLogInfoOK

func NewGetLogInfoOK() *GetLogInfoOK

NewGetLogInfoOK creates a GetLogInfoOK with default headers values

func (*GetLogInfoOK) Error

func (o *GetLogInfoOK) Error() string

func (*GetLogInfoOK) GetPayload

func (o *GetLogInfoOK) GetPayload() *models.LogInfo

type GetLogInfoParams

type GetLogInfoParams struct {
	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

GetLogInfoParams contains all the parameters to send to the API endpoint for the get log info operation typically these are written to a http.Request

func NewGetLogInfoParams

func NewGetLogInfoParams() *GetLogInfoParams

NewGetLogInfoParams creates a new GetLogInfoParams object with the default values initialized.

func NewGetLogInfoParamsWithContext

func NewGetLogInfoParamsWithContext(ctx context.Context) *GetLogInfoParams

NewGetLogInfoParamsWithContext creates a new GetLogInfoParams object with the default values initialized, and the ability to set a context for a request

func NewGetLogInfoParamsWithHTTPClient

func NewGetLogInfoParamsWithHTTPClient(client *http.Client) *GetLogInfoParams

NewGetLogInfoParamsWithHTTPClient creates a new GetLogInfoParams object with the default values initialized, and the ability to set a custom HTTPClient for a request

func NewGetLogInfoParamsWithTimeout

func NewGetLogInfoParamsWithTimeout(timeout time.Duration) *GetLogInfoParams

NewGetLogInfoParamsWithTimeout creates a new GetLogInfoParams object with the default values initialized, and the ability to set a timeout on a request

func (*GetLogInfoParams) SetContext

func (o *GetLogInfoParams) SetContext(ctx context.Context)

SetContext adds the context to the get log info params

func (*GetLogInfoParams) SetHTTPClient

func (o *GetLogInfoParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the get log info params

func (*GetLogInfoParams) SetTimeout

func (o *GetLogInfoParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the get log info params

func (*GetLogInfoParams) WithContext

func (o *GetLogInfoParams) WithContext(ctx context.Context) *GetLogInfoParams

WithContext adds the context to the get log info params

func (*GetLogInfoParams) WithHTTPClient

func (o *GetLogInfoParams) WithHTTPClient(client *http.Client) *GetLogInfoParams

WithHTTPClient adds the HTTPClient to the get log info params

func (*GetLogInfoParams) WithTimeout

func (o *GetLogInfoParams) WithTimeout(timeout time.Duration) *GetLogInfoParams

WithTimeout adds the timeout to the get log info params

func (*GetLogInfoParams) WriteToRequest

func (o *GetLogInfoParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type GetLogInfoReader

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

GetLogInfoReader is a Reader for the GetLogInfo structure.

func (*GetLogInfoReader) ReadResponse

func (o *GetLogInfoReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type GetLogProofBadRequest

type GetLogProofBadRequest struct {
	Payload *models.Error
}

GetLogProofBadRequest handles this case with default header values.

The content supplied to the server was invalid

func NewGetLogProofBadRequest

func NewGetLogProofBadRequest() *GetLogProofBadRequest

NewGetLogProofBadRequest creates a GetLogProofBadRequest with default headers values

func (*GetLogProofBadRequest) Error

func (o *GetLogProofBadRequest) Error() string

func (*GetLogProofBadRequest) GetPayload

func (o *GetLogProofBadRequest) GetPayload() *models.Error

type GetLogProofDefault

type GetLogProofDefault struct {
	Payload *models.Error
	// contains filtered or unexported fields
}

GetLogProofDefault handles this case with default header values.

There was an internal error in the server while processing the request

func NewGetLogProofDefault

func NewGetLogProofDefault(code int) *GetLogProofDefault

NewGetLogProofDefault creates a GetLogProofDefault with default headers values

func (*GetLogProofDefault) Code

func (o *GetLogProofDefault) Code() int

Code gets the status code for the get log proof default response

func (*GetLogProofDefault) Error

func (o *GetLogProofDefault) Error() string

func (*GetLogProofDefault) GetPayload

func (o *GetLogProofDefault) GetPayload() *models.Error

type GetLogProofOK

type GetLogProofOK struct {
	Payload *models.ConsistencyProof
}

GetLogProofOK handles this case with default header values.

All hashes required to compute the consistency proof

func NewGetLogProofOK

func NewGetLogProofOK() *GetLogProofOK

NewGetLogProofOK creates a GetLogProofOK with default headers values

func (*GetLogProofOK) Error

func (o *GetLogProofOK) Error() string

func (*GetLogProofOK) GetPayload

func (o *GetLogProofOK) GetPayload() *models.ConsistencyProof

type GetLogProofParams

type GetLogProofParams struct {

	/*FirstSize
	  The size of the tree that you wish to prove consistency from (1 means the beginning of the log) Defaults to 1 if not specified


	*/
	FirstSize *int64
	/*LastSize
	  The size of the tree that you wish to prove consistency to

	*/
	LastSize int64

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

GetLogProofParams contains all the parameters to send to the API endpoint for the get log proof operation typically these are written to a http.Request

func NewGetLogProofParams

func NewGetLogProofParams() *GetLogProofParams

NewGetLogProofParams creates a new GetLogProofParams object with the default values initialized.

func NewGetLogProofParamsWithContext

func NewGetLogProofParamsWithContext(ctx context.Context) *GetLogProofParams

NewGetLogProofParamsWithContext creates a new GetLogProofParams object with the default values initialized, and the ability to set a context for a request

func NewGetLogProofParamsWithHTTPClient

func NewGetLogProofParamsWithHTTPClient(client *http.Client) *GetLogProofParams

NewGetLogProofParamsWithHTTPClient creates a new GetLogProofParams object with the default values initialized, and the ability to set a custom HTTPClient for a request

func NewGetLogProofParamsWithTimeout

func NewGetLogProofParamsWithTimeout(timeout time.Duration) *GetLogProofParams

NewGetLogProofParamsWithTimeout creates a new GetLogProofParams object with the default values initialized, and the ability to set a timeout on a request

func (*GetLogProofParams) SetContext

func (o *GetLogProofParams) SetContext(ctx context.Context)

SetContext adds the context to the get log proof params

func (*GetLogProofParams) SetFirstSize

func (o *GetLogProofParams) SetFirstSize(firstSize *int64)

SetFirstSize adds the firstSize to the get log proof params

func (*GetLogProofParams) SetHTTPClient

func (o *GetLogProofParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the get log proof params

func (*GetLogProofParams) SetLastSize

func (o *GetLogProofParams) SetLastSize(lastSize int64)

SetLastSize adds the lastSize to the get log proof params

func (*GetLogProofParams) SetTimeout

func (o *GetLogProofParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the get log proof params

func (*GetLogProofParams) WithContext

func (o *GetLogProofParams) WithContext(ctx context.Context) *GetLogProofParams

WithContext adds the context to the get log proof params

func (*GetLogProofParams) WithFirstSize

func (o *GetLogProofParams) WithFirstSize(firstSize *int64) *GetLogProofParams

WithFirstSize adds the firstSize to the get log proof params

func (*GetLogProofParams) WithHTTPClient

func (o *GetLogProofParams) WithHTTPClient(client *http.Client) *GetLogProofParams

WithHTTPClient adds the HTTPClient to the get log proof params

func (*GetLogProofParams) WithLastSize

func (o *GetLogProofParams) WithLastSize(lastSize int64) *GetLogProofParams

WithLastSize adds the lastSize to the get log proof params

func (*GetLogProofParams) WithTimeout

func (o *GetLogProofParams) WithTimeout(timeout time.Duration) *GetLogProofParams

WithTimeout adds the timeout to the get log proof params

func (*GetLogProofParams) WriteToRequest

func (o *GetLogProofParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type GetLogProofReader

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

GetLogProofReader is a Reader for the GetLogProof structure.

func (*GetLogProofReader) ReadResponse

func (o *GetLogProofReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type GetPublicKeyDefault

type GetPublicKeyDefault struct {
	Payload *models.Error
	// contains filtered or unexported fields
}

GetPublicKeyDefault handles this case with default header values.

There was an internal error in the server while processing the request

func NewGetPublicKeyDefault

func NewGetPublicKeyDefault(code int) *GetPublicKeyDefault

NewGetPublicKeyDefault creates a GetPublicKeyDefault with default headers values

func (*GetPublicKeyDefault) Code

func (o *GetPublicKeyDefault) Code() int

Code gets the status code for the get public key default response

func (*GetPublicKeyDefault) Error

func (o *GetPublicKeyDefault) Error() string

func (*GetPublicKeyDefault) GetPayload

func (o *GetPublicKeyDefault) GetPayload() *models.Error

type GetPublicKeyOK

type GetPublicKeyOK struct {
	Payload string
}

GetPublicKeyOK handles this case with default header values.

The public key

func NewGetPublicKeyOK

func NewGetPublicKeyOK() *GetPublicKeyOK

NewGetPublicKeyOK creates a GetPublicKeyOK with default headers values

func (*GetPublicKeyOK) Error

func (o *GetPublicKeyOK) Error() string

func (*GetPublicKeyOK) GetPayload

func (o *GetPublicKeyOK) GetPayload() string

type GetPublicKeyParams

type GetPublicKeyParams struct {
	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

GetPublicKeyParams contains all the parameters to send to the API endpoint for the get public key operation typically these are written to a http.Request

func NewGetPublicKeyParams

func NewGetPublicKeyParams() *GetPublicKeyParams

NewGetPublicKeyParams creates a new GetPublicKeyParams object with the default values initialized.

func NewGetPublicKeyParamsWithContext

func NewGetPublicKeyParamsWithContext(ctx context.Context) *GetPublicKeyParams

NewGetPublicKeyParamsWithContext creates a new GetPublicKeyParams object with the default values initialized, and the ability to set a context for a request

func NewGetPublicKeyParamsWithHTTPClient

func NewGetPublicKeyParamsWithHTTPClient(client *http.Client) *GetPublicKeyParams

NewGetPublicKeyParamsWithHTTPClient creates a new GetPublicKeyParams object with the default values initialized, and the ability to set a custom HTTPClient for a request

func NewGetPublicKeyParamsWithTimeout

func NewGetPublicKeyParamsWithTimeout(timeout time.Duration) *GetPublicKeyParams

NewGetPublicKeyParamsWithTimeout creates a new GetPublicKeyParams object with the default values initialized, and the ability to set a timeout on a request

func (*GetPublicKeyParams) SetContext

func (o *GetPublicKeyParams) SetContext(ctx context.Context)

SetContext adds the context to the get public key params

func (*GetPublicKeyParams) SetHTTPClient

func (o *GetPublicKeyParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the get public key params

func (*GetPublicKeyParams) SetTimeout

func (o *GetPublicKeyParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the get public key params

func (*GetPublicKeyParams) WithContext

WithContext adds the context to the get public key params

func (*GetPublicKeyParams) WithHTTPClient

func (o *GetPublicKeyParams) WithHTTPClient(client *http.Client) *GetPublicKeyParams

WithHTTPClient adds the HTTPClient to the get public key params

func (*GetPublicKeyParams) WithTimeout

func (o *GetPublicKeyParams) WithTimeout(timeout time.Duration) *GetPublicKeyParams

WithTimeout adds the timeout to the get public key params

func (*GetPublicKeyParams) WriteToRequest

func (o *GetPublicKeyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type GetPublicKeyReader

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

GetPublicKeyReader is a Reader for the GetPublicKey structure.

func (*GetPublicKeyReader) ReadResponse

func (o *GetPublicKeyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL