tlog

package
v1.0.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 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

func (*GetLogInfoDefault) IsClientError added in v0.12.1

func (o *GetLogInfoDefault) IsClientError() bool

IsClientError returns true when this get log info default response has a 4xx status code

func (*GetLogInfoDefault) IsCode added in v0.12.1

func (o *GetLogInfoDefault) IsCode(code int) bool

IsCode returns true when this get log info default response a status code equal to that given

func (*GetLogInfoDefault) IsRedirect added in v0.12.1

func (o *GetLogInfoDefault) IsRedirect() bool

IsRedirect returns true when this get log info default response has a 3xx status code

func (*GetLogInfoDefault) IsServerError added in v0.12.1

func (o *GetLogInfoDefault) IsServerError() bool

IsServerError returns true when this get log info default response has a 5xx status code

func (*GetLogInfoDefault) IsSuccess added in v0.12.1

func (o *GetLogInfoDefault) IsSuccess() bool

IsSuccess returns true when this get log info default response has a 2xx status code

func (*GetLogInfoDefault) String added in v0.12.1

func (o *GetLogInfoDefault) String() string

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

func (*GetLogInfoOK) IsClientError added in v0.12.1

func (o *GetLogInfoOK) IsClientError() bool

IsClientError returns true when this get log info o k response has a 4xx status code

func (*GetLogInfoOK) IsCode added in v0.12.1

func (o *GetLogInfoOK) IsCode(code int) bool

IsCode returns true when this get log info o k response a status code equal to that given

func (*GetLogInfoOK) IsRedirect added in v0.12.1

func (o *GetLogInfoOK) IsRedirect() bool

IsRedirect returns true when this get log info o k response has a 3xx status code

func (*GetLogInfoOK) IsServerError added in v0.12.1

func (o *GetLogInfoOK) IsServerError() bool

IsServerError returns true when this get log info o k response has a 5xx status code

func (*GetLogInfoOK) IsSuccess added in v0.12.1

func (o *GetLogInfoOK) IsSuccess() bool

IsSuccess returns true when this get log info o k response has a 2xx status code

func (*GetLogInfoOK) String added in v0.12.1

func (o *GetLogInfoOK) String() string

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

func (*GetLogProofBadRequest) IsClientError added in v0.12.1

func (o *GetLogProofBadRequest) IsClientError() bool

IsClientError returns true when this get log proof bad request response has a 4xx status code

func (*GetLogProofBadRequest) IsCode added in v0.12.1

func (o *GetLogProofBadRequest) IsCode(code int) bool

IsCode returns true when this get log proof bad request response a status code equal to that given

func (*GetLogProofBadRequest) IsRedirect added in v0.12.1

func (o *GetLogProofBadRequest) IsRedirect() bool

IsRedirect returns true when this get log proof bad request response has a 3xx status code

func (*GetLogProofBadRequest) IsServerError added in v0.12.1

func (o *GetLogProofBadRequest) IsServerError() bool

IsServerError returns true when this get log proof bad request response has a 5xx status code

func (*GetLogProofBadRequest) IsSuccess added in v0.12.1

func (o *GetLogProofBadRequest) IsSuccess() bool

IsSuccess returns true when this get log proof bad request response has a 2xx status code

func (*GetLogProofBadRequest) String added in v0.12.1

func (o *GetLogProofBadRequest) String() string

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

func (*GetLogProofDefault) IsClientError added in v0.12.1

func (o *GetLogProofDefault) IsClientError() bool

IsClientError returns true when this get log proof default response has a 4xx status code

func (*GetLogProofDefault) IsCode added in v0.12.1

func (o *GetLogProofDefault) IsCode(code int) bool

IsCode returns true when this get log proof default response a status code equal to that given

func (*GetLogProofDefault) IsRedirect added in v0.12.1

func (o *GetLogProofDefault) IsRedirect() bool

IsRedirect returns true when this get log proof default response has a 3xx status code

func (*GetLogProofDefault) IsServerError added in v0.12.1

func (o *GetLogProofDefault) IsServerError() bool

IsServerError returns true when this get log proof default response has a 5xx status code

func (*GetLogProofDefault) IsSuccess added in v0.12.1

func (o *GetLogProofDefault) IsSuccess() bool

IsSuccess returns true when this get log proof default response has a 2xx status code

func (*GetLogProofDefault) String added in v0.12.1

func (o *GetLogProofDefault) String() string

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

func (*GetLogProofOK) IsClientError added in v0.12.1

func (o *GetLogProofOK) IsClientError() bool

IsClientError returns true when this get log proof o k response has a 4xx status code

func (*GetLogProofOK) IsCode added in v0.12.1

func (o *GetLogProofOK) IsCode(code int) bool

IsCode returns true when this get log proof o k response a status code equal to that given

func (*GetLogProofOK) IsRedirect added in v0.12.1

func (o *GetLogProofOK) IsRedirect() bool

IsRedirect returns true when this get log proof o k response has a 3xx status code

func (*GetLogProofOK) IsServerError added in v0.12.1

func (o *GetLogProofOK) IsServerError() bool

IsServerError returns true when this get log proof o k response has a 5xx status code

func (*GetLogProofOK) IsSuccess added in v0.12.1

func (o *GetLogProofOK) IsSuccess() bool

IsSuccess returns true when this get log proof o k response has a 2xx status code

func (*GetLogProofOK) String added in v0.12.1

func (o *GetLogProofOK) String() string

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

	/* TreeID.

	   The tree ID of the tree that you wish to prove consistency for
	*/
	TreeID *string

	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) SetTreeID added in v0.6.0

func (o *GetLogProofParams) SetTreeID(treeID *string)

SetTreeID adds the treeId 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) WithTreeID added in v0.6.0

func (o *GetLogProofParams) WithTreeID(treeID *string) *GetLogProofParams

WithTreeID adds the treeID 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