pubkey

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2026 License: Apache-2.0 Imports: 12 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithAcceptApplicationJSON added in v1.3.7

func WithAcceptApplicationJSON(r *runtime.ClientOperation)

WithAcceptApplicationJSON sets the Accept header to "application/json".

func WithAcceptApplicationxPemFile added in v1.3.7

func WithAcceptApplicationxPemFile(r *runtime.ClientOperation)

WithAcceptApplicationxPemFile sets the Accept header to "application/x-pem-file".

Types

type Client

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

Client for pubkey API.

func (*Client) GetPublicKey

func (a *Client) GetPublicKey(params *GetPublicKeyParams, opts ...ClientOption) (*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.

This method does not support injected context. However, timeout and opentracing contexts are honored whenever enabled.

If you need to pass a specific context, use Client.GetPublicKeyContext instead.

func (*Client) GetPublicKeyContext added in v1.5.4

func (a *Client) GetPublicKeyContext(ctx context.Context, params *GetPublicKeyParams, opts ...ClientOption) (*GetPublicKeyOK, error)

GetPublicKeyContext 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.

Do not use the deprecated [GetPublicKeyParams.Context] with this method: it would be ignored.

func (*Client) SetTransport

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

SetTransport changes the transport on the client

type ClientOption

type ClientOption func(*runtime.ClientOperation)

ClientOption may be used to customize the behavior of Client methods.

func WithAccept added in v1.3.7

func WithAccept(mime string) ClientOption

WithAccept allows the client to force the Accept header to negotiate a specific Producer from the server.

You may use this option to set arbitrary extensions to your MIME media type.

type ClientService

type ClientService interface {

	// GetPublicKey retrieve the public key that can be used to validate the signed tree head.
	GetPublicKey(params *GetPublicKeyParams, opts ...ClientOption) (*GetPublicKeyOK, error)

	// GetPublicKeyContext retrieve the public key that can be used to validate the signed tree head.
	GetPublicKeyContext(ctx context.Context, params *GetPublicKeyParams, opts ...ClientOption) (*GetPublicKeyOK, error)

	SetTransport(transport runtime.ContextualTransport)
}

ClientService is the interface for Client methods.

func New

New creates a new pubkey API client.

func NewClientWithBasicAuth added in v1.3.7

func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService

New creates a new pubkey API client with basic auth credentials.

It takes the following parameters: - host: http host (github.com). - basePath: any base path for the API client ("/v1", "/v3"). - scheme: http scheme ("http", "https"). - user: user for basic authentication header. - password: password for basic authentication header.

func NewClientWithBearerToken added in v1.3.7

func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService

New creates a new pubkey API client with a bearer token for authentication.

It takes the following parameters: - host: http host (github.com). - basePath: any base path for the API client ("/v1", "/v3"). - scheme: http scheme ("http", "https"). - bearerToken: bearer token for Bearer authentication header.

type GetPublicKeyDefault

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

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

func (*GetPublicKeyDefault) IsClientError added in v0.12.1

func (o *GetPublicKeyDefault) IsClientError() bool

IsClientError returns true when this get public key default response has a 4xx status code

func (*GetPublicKeyDefault) IsCode added in v0.12.1

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

IsCode returns true when this get public key default response a status code equal to that given

func (*GetPublicKeyDefault) IsRedirect added in v0.12.1

func (o *GetPublicKeyDefault) IsRedirect() bool

IsRedirect returns true when this get public key default response has a 3xx status code

func (*GetPublicKeyDefault) IsServerError added in v0.12.1

func (o *GetPublicKeyDefault) IsServerError() bool

IsServerError returns true when this get public key default response has a 5xx status code

func (*GetPublicKeyDefault) IsSuccess added in v0.12.1

func (o *GetPublicKeyDefault) IsSuccess() bool

IsSuccess returns true when this get public key default response has a 2xx status code

func (*GetPublicKeyDefault) String added in v0.12.1

func (o *GetPublicKeyDefault) String() string

type GetPublicKeyOK

type GetPublicKeyOK struct {
	Payload string
}

GetPublicKeyOK describes a response with status code 200, with default header values.

The public key

func NewGetPublicKeyOK

func NewGetPublicKeyOK() *GetPublicKeyOK

NewGetPublicKeyOK creates a GetPublicKeyOK with default headers values

func (*GetPublicKeyOK) Code added in v1.1.0

func (o *GetPublicKeyOK) Code() int

Code gets the status code for the get public key o k response

func (*GetPublicKeyOK) Error

func (o *GetPublicKeyOK) Error() string

func (*GetPublicKeyOK) GetPayload

func (o *GetPublicKeyOK) GetPayload() string

func (*GetPublicKeyOK) IsClientError added in v0.12.1

func (o *GetPublicKeyOK) IsClientError() bool

IsClientError returns true when this get public key o k response has a 4xx status code

func (*GetPublicKeyOK) IsCode added in v0.12.1

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

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

func (*GetPublicKeyOK) IsRedirect added in v0.12.1

func (o *GetPublicKeyOK) IsRedirect() bool

IsRedirect returns true when this get public key o k response has a 3xx status code

func (*GetPublicKeyOK) IsServerError added in v0.12.1

func (o *GetPublicKeyOK) IsServerError() bool

IsServerError returns true when this get public key o k response has a 5xx status code

func (*GetPublicKeyOK) IsSuccess added in v0.12.1

func (o *GetPublicKeyOK) IsSuccess() bool

IsSuccess returns true when this get public key o k response has a 2xx status code

func (*GetPublicKeyOK) String added in v0.12.1

func (o *GetPublicKeyOK) String() string

type GetPublicKeyParams

type GetPublicKeyParams struct {

	// TreeID.
	//
	// The tree ID of the tree you wish to get a public key for
	TreeID *string

	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 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 NewGetPublicKeyParamsWithContext deprecated

func NewGetPublicKeyParamsWithContext(ctx context.Context) *GetPublicKeyParams

NewGetPublicKeyParamsWithContext creates a new GetPublicKeyParams object with the ability to set a context for a request.

Deprecated: use the operation call with context to pass the context instead of GetPublicKeyParams.

func NewGetPublicKeyParamsWithHTTPClient

func NewGetPublicKeyParamsWithHTTPClient(client *http.Client) *GetPublicKeyParams

NewGetPublicKeyParamsWithHTTPClient creates a new GetPublicKeyParams object with 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 ability to set a timeout on a request.

func (*GetPublicKeyParams) SetContext deprecated

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

SetContext adds the context to the get public key params.

Deprecated: use the operation call with context to pass the context instead of GetPublicKeyParams.

func (*GetPublicKeyParams) SetDefaults

func (o *GetPublicKeyParams) SetDefaults()

SetDefaults hydrates default values in the get public key params (not the query body).

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

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

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

SetTreeID adds the treeId to the get public key params.

func (*GetPublicKeyParams) WithContext deprecated

WithContext adds the context to the get public key params.

Deprecated: use the operation call with context to pass the context instead of GetPublicKeyParams.

func (*GetPublicKeyParams) WithDefaults

func (o *GetPublicKeyParams) WithDefaults() *GetPublicKeyParams

WithDefaults hydrates default values in the get public key params (not the query body).

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

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

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

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

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) (any, 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