tlog

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2022 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, opts ...ClientOption) (*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, opts ...ClientOption) (*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) SetTransport

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

SetTransport changes the transport on the client

type ClientOption added in v0.2.0

type ClientOption func(*runtime.ClientOperation)

ClientOption is the option for Client methods

type ClientService

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

	GetLogProof(params *GetLogProofParams, opts ...ClientOption) (*GetLogProofOK, 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 describes a response with status code -1, 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 describes a response with status code 200, 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 timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewGetLogInfoParamsWithContext

func NewGetLogInfoParamsWithContext(ctx context.Context) *GetLogInfoParams

NewGetLogInfoParamsWithContext creates a new GetLogInfoParams object with 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 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 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) SetDefaults added in v0.2.0

func (o *GetLogInfoParams) SetDefaults()

SetDefaults hydrates default values in the get log info params (not the query body).

All values with no default are reset to their zero value.

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) WithDefaults added in v0.2.0

func (o *GetLogInfoParams) WithDefaults() *GetLogInfoParams

WithDefaults hydrates default values in the get log info params (not the query body).

All values with no default are reset to their zero value.

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 describes a response with status code 400, 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 describes a response with status code -1, 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 describes a response with status code 200, 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


	   Default: 1
	*/
	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 timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewGetLogProofParamsWithContext

func NewGetLogProofParamsWithContext(ctx context.Context) *GetLogProofParams

NewGetLogProofParamsWithContext creates a new GetLogProofParams object with 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 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 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) SetDefaults added in v0.2.0

func (o *GetLogProofParams) SetDefaults()

SetDefaults hydrates default values in the get log proof params (not the query body).

All values with no default are reset to their zero value.

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) WithDefaults added in v0.2.0

func (o *GetLogProofParams) WithDefaults() *GetLogProofParams

WithDefaults hydrates default values in the get log proof params (not the query body).

All values with no default are reset to their zero value.

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.

Jump to

Keyboard shortcuts

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