pfed

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package pfed provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.

Package pfed is the generated Go client for the Platform federation REST API: federations of peer instances and their membership, served under /pfed.

Role

Generated client, outside the modules: a public package for programs that call artifactweave. make generate writes client.gen.go from api/pfed.openapi.yaml with api/oapi-client-pfed.yaml; this doc.go is hand-written and make generate leaves it alone.

Inputs

  • api/pfed.openapi.yaml, which make bundle builds from api/src/pfed.
  • The server URL and the ClientOption values given to NewClient or NewClientWithResponses, such as WithHTTPClient.

Outputs

  • Client, with one method per operation; ClientWithResponses, which also decodes the responses; and the request and response models. Operations tagged handwritten are left out (decision 0002).

References

  • Decision 0002: docs/research/decisions/0002-spec-first-flat-crud-handwritten-item-paths.md.
  • Decision 0025: docs/research/decisions/0025-platform-federation-and-topology.md.
  • Research 16: docs/research/16-enterprise-products.md.
  • docs/implementation/api-description-conventions.md.
  • Plan: docs/implementation/plan.md#p1b-enterprise-products-specs-and-model.

Status

Implemented P1b. make generate rewrites client.gen.go whenever the document changes, and make verify-generate fails while it is stale.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAddFollowerJpdRequest

func NewAddFollowerJpdRequest(server string, body AddFollowerJpdJSONRequestBody) (*http.Request, error)

NewAddFollowerJpdRequest calls the generic AddFollowerJpd builder with application/json body

func NewAddFollowerJpdRequestWithBody

func NewAddFollowerJpdRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewAddFollowerJpdRequestWithBody constructs an http.Request for the AddFollowerJpd method, with any body, and a specified content type

func NewCreateFederationRequest

func NewCreateFederationRequest(server string, body CreateFederationJSONRequestBody) (*http.Request, error)

NewCreateFederationRequest calls the generic CreateFederation builder with application/json body

func NewCreateFederationRequestWithBody

func NewCreateFederationRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateFederationRequestWithBody constructs an http.Request for the CreateFederation method, with any body, and a specified content type

func NewDeleteFederationRequest

func NewDeleteFederationRequest(server string, id FederationId) (*http.Request, error)

NewDeleteFederationRequest constructs an http.Request for the DeleteFederation method

func NewDeleteFollowerJpdRequest

func NewDeleteFollowerJpdRequest(server string, id JpdId) (*http.Request, error)

NewDeleteFollowerJpdRequest constructs an http.Request for the DeleteFollowerJpd method

func NewGetFederationRequest

func NewGetFederationRequest(server string, id FederationId) (*http.Request, error)

NewGetFederationRequest constructs an http.Request for the GetFederation method

func NewGetFollowerJpdRequest

func NewGetFollowerJpdRequest(server string, id JpdId) (*http.Request, error)

NewGetFollowerJpdRequest constructs an http.Request for the GetFollowerJpd method

func NewListFederationsRequest

func NewListFederationsRequest(server string) (*http.Request, error)

NewListFederationsRequest constructs an http.Request for the ListFederations method

func NewListFollowerJpdsRequest

func NewListFollowerJpdsRequest(server string) (*http.Request, error)

NewListFollowerJpdsRequest constructs an http.Request for the ListFollowerJpds method

func NewUpdateFollowerJpdRequest

func NewUpdateFollowerJpdRequest(server string, id JpdId, body UpdateFollowerJpdJSONRequestBody) (*http.Request, error)

NewUpdateFollowerJpdRequest calls the generic UpdateFollowerJpd builder with application/json body

func NewUpdateFollowerJpdRequestWithBody

func NewUpdateFollowerJpdRequestWithBody(server string, id JpdId, contentType string, body io.Reader) (*http.Request, error)

NewUpdateFollowerJpdRequestWithBody constructs an http.Request for the UpdateFollowerJpd method, with any body, and a specified content type

Types

type AddFollowerJpdJSONRequestBody

type AddFollowerJpdJSONRequestBody = CreateJpdRequest

AddFollowerJpdJSONRequestBody defines body for AddFollowerJpd for application/json ContentType.

type AddFollowerJpdResponse

type AddFollowerJpdResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON201 the response for an HTTP 201 `application/json` response
	JSON201 *JpdResponse
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *ErrorResponse
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *ErrorResponse
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *ErrorResponse
	// JSON409 the response for an HTTP 409 `application/json` response
	JSON409 *ErrorResponse
	// JSON429 the response for an HTTP 429 `application/json` response
	JSON429 *TooManyRequests
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *ErrorResponse
	// JSON503 the response for an HTTP 503 `application/json` response
	JSON503 *ServiceUnavailable
	// Headers429 the parsed response headers for an HTTP 429 response
	Headers429 *AddFollowerJpdResponse429Headers
	// Headers503 the parsed response headers for an HTTP 503 response
	Headers503 *AddFollowerJpdResponse503Headers
}

func ParseAddFollowerJpdResponse

func ParseAddFollowerJpdResponse(rsp *http.Response) (*AddFollowerJpdResponse, error)

ParseAddFollowerJpdResponse parses an HTTP response from a AddFollowerJpdWithResponse call

func (AddFollowerJpdResponse) ContentType

func (r AddFollowerJpdResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (AddFollowerJpdResponse) GetBody

func (r AddFollowerJpdResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (AddFollowerJpdResponse) GetJSON201

func (r AddFollowerJpdResponse) GetJSON201() *JpdResponse

GetJSON201 returns the response for an HTTP 201 `application/json` response

func (AddFollowerJpdResponse) GetJSON400

func (r AddFollowerJpdResponse) GetJSON400() *ErrorResponse

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (AddFollowerJpdResponse) GetJSON401

func (r AddFollowerJpdResponse) GetJSON401() *ErrorResponse

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (AddFollowerJpdResponse) GetJSON403

func (r AddFollowerJpdResponse) GetJSON403() *ErrorResponse

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (AddFollowerJpdResponse) GetJSON409

func (r AddFollowerJpdResponse) GetJSON409() *ErrorResponse

GetJSON409 returns the response for an HTTP 409 `application/json` response

func (AddFollowerJpdResponse) GetJSON429

func (r AddFollowerJpdResponse) GetJSON429() *TooManyRequests

GetJSON429 returns the response for an HTTP 429 `application/json` response

func (AddFollowerJpdResponse) GetJSON500

func (r AddFollowerJpdResponse) GetJSON500() *ErrorResponse

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (AddFollowerJpdResponse) GetJSON503

GetJSON503 returns the response for an HTTP 503 `application/json` response

func (AddFollowerJpdResponse) Status

func (r AddFollowerJpdResponse) Status() string

Status returns HTTPResponse.Status

func (AddFollowerJpdResponse) StatusCode

func (r AddFollowerJpdResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AddFollowerJpdResponse429Headers

type AddFollowerJpdResponse429Headers struct {
	RateLimit       *string
	RateLimitPolicy *string
	RetryAfter      int
}

AddFollowerJpdResponse429Headers the declared response headers of an HTTP 429 response for AddFollowerJpd

type AddFollowerJpdResponse503Headers

type AddFollowerJpdResponse503Headers struct {
	RateLimit       *string
	RateLimitPolicy *string
	RetryAfter      int
}

AddFollowerJpdResponse503Headers the declared response headers of an HTTP 503 response for AddFollowerJpd

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) AddFollowerJpd

func (c *Client) AddFollowerJpd(ctx context.Context, body AddFollowerJpdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

AddFollowerJpd Add a follower instance

Adds a follower and establishes mutual trust with it by redeeming the follower's platform-federation pairing token over the peer protocol. The token is consumed; the resulting per-peer keys are sealed at rest. Administrators only.

Takes a body of the `application/json` content type.

Corresponds with POST /api/v1/jpd (the `AddFollowerJpd` operationId).

func (*Client) AddFollowerJpdWithBody

func (c *Client) AddFollowerJpdWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

AddFollowerJpdWithBody Add a follower instance

Adds a follower and establishes mutual trust with it by redeeming the follower's platform-federation pairing token over the peer protocol. The token is consumed; the resulting per-peer keys are sealed at rest. Administrators only.

Takes any type of body and a specified content type.

Corresponds with POST /api/v1/jpd (the `AddFollowerJpd` operationId).

func (*Client) CreateFederation

func (c *Client) CreateFederation(ctx context.Context, body CreateFederationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

CreateFederation Create a platform federation

Defines a federation on this controller that groups previously added follower instances. Every follower id in the connection group must already exist (POST /pfed/api/v1/jpd). The federation and its membership are recorded, but its entity types carry no data to synchronise. Identity replication between peers is configured through /access/api/v1/system/federation instead. Administrators only.

Takes a body of the `application/json` content type.

Corresponds with POST /api/v1/federations (the `CreateFederation` operationId).

func (*Client) CreateFederationWithBody

func (c *Client) CreateFederationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

CreateFederationWithBody Create a platform federation

Defines a federation on this controller that groups previously added follower instances. Every follower id in the connection group must already exist (POST /pfed/api/v1/jpd). The federation and its membership are recorded, but its entity types carry no data to synchronise. Identity replication between peers is configured through /access/api/v1/system/federation instead. Administrators only.

Takes any type of body and a specified content type.

Corresponds with POST /api/v1/federations (the `CreateFederation` operationId).

func (*Client) DeleteFederation

func (c *Client) DeleteFederation(ctx context.Context, id FederationId, reqEditors ...RequestEditorFn) (*http.Response, error)

DeleteFederation Delete a platform federation

Removes a federation. The follower instances stay registered and paired and can join another federation. Administrators only.

Corresponds with DELETE /api/v1/federations/{id} (the `DeleteFederation` operationId).

func (*Client) DeleteFollowerJpd

func (c *Client) DeleteFollowerJpd(ctx context.Context, id JpdId, reqEditors ...RequestEditorFn) (*http.Response, error)

DeleteFollowerJpd Remove a follower instance

Removes a follower from this controller and forgets its trust keys. It is also removed from every federation that listed it. Administrators only.

Corresponds with DELETE /api/v1/jpd/{id} (the `DeleteFollowerJpd` operationId).

func (*Client) GetFederation

func (c *Client) GetFederation(ctx context.Context, id FederationId, reqEditors ...RequestEditorFn) (*http.Response, error)

GetFederation Get a platform federation

Returns one federation with its connection group and entity types. Administrators only.

Corresponds with GET /api/v1/federations/{id} (the `GetFederation` operationId).

func (*Client) GetFollowerJpd

func (c *Client) GetFollowerJpd(ctx context.Context, id JpdId, reqEditors ...RequestEditorFn) (*http.Response, error)

GetFollowerJpd Get a follower instance

Returns the base URL of one follower. Administrators only.

Corresponds with GET /api/v1/jpd/{id} (the `GetFollowerJpd` operationId).

func (*Client) ListFederations

func (c *Client) ListFederations(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

ListFederations List platform federations

Returns every platform federation defined on this controller instance. Administrators only.

Corresponds with GET /api/v1/federations (the `ListFederations` operationId).

func (*Client) ListFollowerJpds

func (c *Client) ListFollowerJpds(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

ListFollowerJpds List follower instances

Returns every follower instance added to this controller. A follower is always a peer instance paired over the peer protocol. Administrators only.

Corresponds with GET /api/v1/jpd (the `ListFollowerJpds` operationId).

func (*Client) UpdateFollowerJpd

func (c *Client) UpdateFollowerJpd(ctx context.Context, id JpdId, body UpdateFollowerJpdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

UpdateFollowerJpd Update a follower instance

Replaces a follower's URL and re-pairs with it using a fresh pairing token, for example after the follower moved or to rotate the trust keys. Federations that reference the follower keep working. Administrators only.

Takes a body of the `application/json` content type.

Corresponds with PUT /api/v1/jpd/{id} (the `UpdateFollowerJpd` operationId).

func (*Client) UpdateFollowerJpdWithBody

func (c *Client) UpdateFollowerJpdWithBody(ctx context.Context, id JpdId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

UpdateFollowerJpdWithBody Update a follower instance

Replaces a follower's URL and re-pairs with it using a fresh pairing token, for example after the follower moved or to rotate the trust keys. Federations that reference the follower keep working. Administrators only.

Takes any type of body and a specified content type.

Corresponds with PUT /api/v1/jpd/{id} (the `UpdateFollowerJpd` operationId).

type ClientInterface

type ClientInterface interface {

	// ListFederations List platform federations
	//
	// Returns every platform federation defined on this controller instance. Administrators only.
	//
	// Corresponds with GET /api/v1/federations (the `ListFederations` operationId).
	ListFederations(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateFederationWithBody Create a platform federation
	//
	// Defines a federation on this controller that groups previously added follower instances. Every follower id in the connection group must already exist (POST /pfed/api/v1/jpd). The federation and its membership are recorded, but its entity types carry no data to synchronise. Identity replication between peers is configured through /access/api/v1/system/federation instead. Administrators only.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /api/v1/federations (the `CreateFederation` operationId).
	CreateFederationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateFederation Create a platform federation
	//
	// Defines a federation on this controller that groups previously added follower instances. Every follower id in the connection group must already exist (POST /pfed/api/v1/jpd). The federation and its membership are recorded, but its entity types carry no data to synchronise. Identity replication between peers is configured through /access/api/v1/system/federation instead. Administrators only.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /api/v1/federations (the `CreateFederation` operationId).
	CreateFederation(ctx context.Context, body CreateFederationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteFederation Delete a platform federation
	//
	// Removes a federation. The follower instances stay registered and paired and can join another federation. Administrators only.
	//
	// Corresponds with DELETE /api/v1/federations/{id} (the `DeleteFederation` operationId).
	DeleteFederation(ctx context.Context, id FederationId, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetFederation Get a platform federation
	//
	// Returns one federation with its connection group and entity types. Administrators only.
	//
	// Corresponds with GET /api/v1/federations/{id} (the `GetFederation` operationId).
	GetFederation(ctx context.Context, id FederationId, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListFollowerJpds List follower instances
	//
	// Returns every follower instance added to this controller. A follower is always a peer instance paired over the peer protocol. Administrators only.
	//
	// Corresponds with GET /api/v1/jpd (the `ListFollowerJpds` operationId).
	ListFollowerJpds(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AddFollowerJpdWithBody Add a follower instance
	//
	// Adds a follower and establishes mutual trust with it by redeeming the follower's platform-federation pairing token over the peer protocol. The token is consumed; the resulting per-peer keys are sealed at rest. Administrators only.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /api/v1/jpd (the `AddFollowerJpd` operationId).
	AddFollowerJpdWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AddFollowerJpd Add a follower instance
	//
	// Adds a follower and establishes mutual trust with it by redeeming the follower's platform-federation pairing token over the peer protocol. The token is consumed; the resulting per-peer keys are sealed at rest. Administrators only.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /api/v1/jpd (the `AddFollowerJpd` operationId).
	AddFollowerJpd(ctx context.Context, body AddFollowerJpdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteFollowerJpd Remove a follower instance
	//
	// Removes a follower from this controller and forgets its trust keys. It is also removed from every federation that listed it. Administrators only.
	//
	// Corresponds with DELETE /api/v1/jpd/{id} (the `DeleteFollowerJpd` operationId).
	DeleteFollowerJpd(ctx context.Context, id JpdId, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetFollowerJpd Get a follower instance
	//
	// Returns the base URL of one follower. Administrators only.
	//
	// Corresponds with GET /api/v1/jpd/{id} (the `GetFollowerJpd` operationId).
	GetFollowerJpd(ctx context.Context, id JpdId, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateFollowerJpdWithBody Update a follower instance
	//
	// Replaces a follower's URL and re-pairs with it using a fresh pairing token, for example after the follower moved or to rotate the trust keys. Federations that reference the follower keep working. Administrators only.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with PUT /api/v1/jpd/{id} (the `UpdateFollowerJpd` operationId).
	UpdateFollowerJpdWithBody(ctx context.Context, id JpdId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateFollowerJpd Update a follower instance
	//
	// Replaces a follower's URL and re-pairs with it using a fresh pairing token, for example after the follower moved or to rotate the trust keys. Federations that reference the follower keep working. Administrators only.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with PUT /api/v1/jpd/{id} (the `UpdateFollowerJpd` operationId).
	UpdateFollowerJpd(ctx context.Context, id JpdId, body UpdateFollowerJpdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) AddFollowerJpdWithBodyWithResponse

func (c *ClientWithResponses) AddFollowerJpdWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddFollowerJpdResponse, error)

AddFollowerJpdWithBodyWithResponse Add a follower instance

Adds a follower and establishes mutual trust with it by redeeming the follower's platform-federation pairing token over the peer protocol. The token is consumed; the resulting per-peer keys are sealed at rest. Administrators only.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /api/v1/jpd (the `AddFollowerJpd` operationId).

func (*ClientWithResponses) AddFollowerJpdWithResponse

func (c *ClientWithResponses) AddFollowerJpdWithResponse(ctx context.Context, body AddFollowerJpdJSONRequestBody, reqEditors ...RequestEditorFn) (*AddFollowerJpdResponse, error)

AddFollowerJpdWithResponse Add a follower instance

Adds a follower and establishes mutual trust with it by redeeming the follower's platform-federation pairing token over the peer protocol. The token is consumed; the resulting per-peer keys are sealed at rest. Administrators only.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /api/v1/jpd (the `AddFollowerJpd` operationId).

func (*ClientWithResponses) CreateFederationWithBodyWithResponse

func (c *ClientWithResponses) CreateFederationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateFederationResponse, error)

CreateFederationWithBodyWithResponse Create a platform federation

Defines a federation on this controller that groups previously added follower instances. Every follower id in the connection group must already exist (POST /pfed/api/v1/jpd). The federation and its membership are recorded, but its entity types carry no data to synchronise. Identity replication between peers is configured through /access/api/v1/system/federation instead. Administrators only.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /api/v1/federations (the `CreateFederation` operationId).

func (*ClientWithResponses) CreateFederationWithResponse

func (c *ClientWithResponses) CreateFederationWithResponse(ctx context.Context, body CreateFederationJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateFederationResponse, error)

CreateFederationWithResponse Create a platform federation

Defines a federation on this controller that groups previously added follower instances. Every follower id in the connection group must already exist (POST /pfed/api/v1/jpd). The federation and its membership are recorded, but its entity types carry no data to synchronise. Identity replication between peers is configured through /access/api/v1/system/federation instead. Administrators only.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /api/v1/federations (the `CreateFederation` operationId).

func (*ClientWithResponses) DeleteFederationWithResponse

func (c *ClientWithResponses) DeleteFederationWithResponse(ctx context.Context, id FederationId, reqEditors ...RequestEditorFn) (*DeleteFederationResponse, error)

DeleteFederationWithResponse Delete a platform federation

Removes a federation. The follower instances stay registered and paired and can join another federation. Administrators only.

Returns a wrapper object for the known response body format(s).

Corresponds with DELETE /api/v1/federations/{id} (the `DeleteFederation` operationId).

func (*ClientWithResponses) DeleteFollowerJpdWithResponse

func (c *ClientWithResponses) DeleteFollowerJpdWithResponse(ctx context.Context, id JpdId, reqEditors ...RequestEditorFn) (*DeleteFollowerJpdResponse, error)

DeleteFollowerJpdWithResponse Remove a follower instance

Removes a follower from this controller and forgets its trust keys. It is also removed from every federation that listed it. Administrators only.

Returns a wrapper object for the known response body format(s).

Corresponds with DELETE /api/v1/jpd/{id} (the `DeleteFollowerJpd` operationId).

func (*ClientWithResponses) GetFederationWithResponse

func (c *ClientWithResponses) GetFederationWithResponse(ctx context.Context, id FederationId, reqEditors ...RequestEditorFn) (*GetFederationResponse, error)

GetFederationWithResponse Get a platform federation

Returns one federation with its connection group and entity types. Administrators only.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/federations/{id} (the `GetFederation` operationId).

func (*ClientWithResponses) GetFollowerJpdWithResponse

func (c *ClientWithResponses) GetFollowerJpdWithResponse(ctx context.Context, id JpdId, reqEditors ...RequestEditorFn) (*GetFollowerJpdResponse, error)

GetFollowerJpdWithResponse Get a follower instance

Returns the base URL of one follower. Administrators only.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/jpd/{id} (the `GetFollowerJpd` operationId).

func (*ClientWithResponses) ListFederationsWithResponse

func (c *ClientWithResponses) ListFederationsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListFederationsResponse, error)

ListFederationsWithResponse List platform federations

Returns every platform federation defined on this controller instance. Administrators only.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/federations (the `ListFederations` operationId).

func (*ClientWithResponses) ListFollowerJpdsWithResponse

func (c *ClientWithResponses) ListFollowerJpdsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListFollowerJpdsResponse, error)

ListFollowerJpdsWithResponse List follower instances

Returns every follower instance added to this controller. A follower is always a peer instance paired over the peer protocol. Administrators only.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /api/v1/jpd (the `ListFollowerJpds` operationId).

func (*ClientWithResponses) UpdateFollowerJpdWithBodyWithResponse

func (c *ClientWithResponses) UpdateFollowerJpdWithBodyWithResponse(ctx context.Context, id JpdId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateFollowerJpdResponse, error)

UpdateFollowerJpdWithBodyWithResponse Update a follower instance

Replaces a follower's URL and re-pairs with it using a fresh pairing token, for example after the follower moved or to rotate the trust keys. Federations that reference the follower keep working. Administrators only.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with PUT /api/v1/jpd/{id} (the `UpdateFollowerJpd` operationId).

func (*ClientWithResponses) UpdateFollowerJpdWithResponse

func (c *ClientWithResponses) UpdateFollowerJpdWithResponse(ctx context.Context, id JpdId, body UpdateFollowerJpdJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateFollowerJpdResponse, error)

UpdateFollowerJpdWithResponse Update a follower instance

Replaces a follower's URL and re-pairs with it using a fresh pairing token, for example after the follower moved or to rotate the trust keys. Federations that reference the follower keep working. Administrators only.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with PUT /api/v1/jpd/{id} (the `UpdateFollowerJpd` operationId).

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {

	// ListFederationsWithResponse List platform federations
	//
	// Returns every platform federation defined on this controller instance. Administrators only.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/federations (the `ListFederations` operationId).
	ListFederationsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListFederationsResponse, error)

	// CreateFederationWithBodyWithResponse Create a platform federation
	//
	// Defines a federation on this controller that groups previously added follower instances. Every follower id in the connection group must already exist (POST /pfed/api/v1/jpd). The federation and its membership are recorded, but its entity types carry no data to synchronise. Identity replication between peers is configured through /access/api/v1/system/federation instead. Administrators only.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /api/v1/federations (the `CreateFederation` operationId).
	CreateFederationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateFederationResponse, error)

	// CreateFederationWithResponse Create a platform federation
	//
	// Defines a federation on this controller that groups previously added follower instances. Every follower id in the connection group must already exist (POST /pfed/api/v1/jpd). The federation and its membership are recorded, but its entity types carry no data to synchronise. Identity replication between peers is configured through /access/api/v1/system/federation instead. Administrators only.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /api/v1/federations (the `CreateFederation` operationId).
	CreateFederationWithResponse(ctx context.Context, body CreateFederationJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateFederationResponse, error)

	// DeleteFederationWithResponse Delete a platform federation
	//
	// Removes a federation. The follower instances stay registered and paired and can join another federation. Administrators only.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with DELETE /api/v1/federations/{id} (the `DeleteFederation` operationId).
	DeleteFederationWithResponse(ctx context.Context, id FederationId, reqEditors ...RequestEditorFn) (*DeleteFederationResponse, error)

	// GetFederationWithResponse Get a platform federation
	//
	// Returns one federation with its connection group and entity types. Administrators only.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/federations/{id} (the `GetFederation` operationId).
	GetFederationWithResponse(ctx context.Context, id FederationId, reqEditors ...RequestEditorFn) (*GetFederationResponse, error)

	// ListFollowerJpdsWithResponse List follower instances
	//
	// Returns every follower instance added to this controller. A follower is always a peer instance paired over the peer protocol. Administrators only.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/jpd (the `ListFollowerJpds` operationId).
	ListFollowerJpdsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListFollowerJpdsResponse, error)

	// AddFollowerJpdWithBodyWithResponse Add a follower instance
	//
	// Adds a follower and establishes mutual trust with it by redeeming the follower's platform-federation pairing token over the peer protocol. The token is consumed; the resulting per-peer keys are sealed at rest. Administrators only.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /api/v1/jpd (the `AddFollowerJpd` operationId).
	AddFollowerJpdWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddFollowerJpdResponse, error)

	// AddFollowerJpdWithResponse Add a follower instance
	//
	// Adds a follower and establishes mutual trust with it by redeeming the follower's platform-federation pairing token over the peer protocol. The token is consumed; the resulting per-peer keys are sealed at rest. Administrators only.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /api/v1/jpd (the `AddFollowerJpd` operationId).
	AddFollowerJpdWithResponse(ctx context.Context, body AddFollowerJpdJSONRequestBody, reqEditors ...RequestEditorFn) (*AddFollowerJpdResponse, error)

	// DeleteFollowerJpdWithResponse Remove a follower instance
	//
	// Removes a follower from this controller and forgets its trust keys. It is also removed from every federation that listed it. Administrators only.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with DELETE /api/v1/jpd/{id} (the `DeleteFollowerJpd` operationId).
	DeleteFollowerJpdWithResponse(ctx context.Context, id JpdId, reqEditors ...RequestEditorFn) (*DeleteFollowerJpdResponse, error)

	// GetFollowerJpdWithResponse Get a follower instance
	//
	// Returns the base URL of one follower. Administrators only.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /api/v1/jpd/{id} (the `GetFollowerJpd` operationId).
	GetFollowerJpdWithResponse(ctx context.Context, id JpdId, reqEditors ...RequestEditorFn) (*GetFollowerJpdResponse, error)

	// UpdateFollowerJpdWithBodyWithResponse Update a follower instance
	//
	// Replaces a follower's URL and re-pairs with it using a fresh pairing token, for example after the follower moved or to rotate the trust keys. Federations that reference the follower keep working. Administrators only.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PUT /api/v1/jpd/{id} (the `UpdateFollowerJpd` operationId).
	UpdateFollowerJpdWithBodyWithResponse(ctx context.Context, id JpdId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateFollowerJpdResponse, error)

	// UpdateFollowerJpdWithResponse Update a follower instance
	//
	// Replaces a follower's URL and re-pairs with it using a fresh pairing token, for example after the follower moved or to rotate the trust keys. Federations that reference the follower keep working. Administrators only.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PUT /api/v1/jpd/{id} (the `UpdateFollowerJpd` operationId).
	UpdateFollowerJpdWithResponse(ctx context.Context, id JpdId, body UpdateFollowerJpdJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateFollowerJpdResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type ConnectionGroup

type ConnectionGroup struct {
	// TargetJpdIds Required within this object. Ids of follower JPDs, each previously added with POST /pfed/api/v1/jpd. Duplicates are rejected.
	TargetJpdIds []string `json:"target_jpd_ids"`
}

ConnectionGroup The follower instances a federation sends to.

type CreateFederationJSONRequestBody

type CreateFederationJSONRequestBody = CreateFederationRequest

CreateFederationJSONRequestBody defines body for CreateFederation for application/json ContentType.

type CreateFederationRequest

type CreateFederationRequest struct {
	// ConnectionGroups Required within this object. Must contain exactly one key, source-jpd, mapping to the connection group that lists the followers. Any other key answers 400.
	ConnectionGroups map[string]ConnectionGroup `json:"connection_groups"`

	// Description Optional within this object. Free text describing what the federation is for.
	Description *string `json:"description,omitempty"`

	// Entities Required within this object. The entity types to federate. Must list all four types of the EntityConfig type enum, each once. The federation and its membership are recorded, but these types carry no data to synchronise. Identity replication between peers is configured through /access/api/v1/system/federation instead.
	Entities []EntityConfig `json:"entities"`

	// Name Required within this object. Unique name of the federation on this instance.
	Name string `json:"name"`
}

CreateFederationRequest A new platform federation on this (controller) instance. Only name, description and the follower ids are free choices; the connection group key and the entity list are fixed by the protocol.

type CreateFederationResponse

type CreateFederationResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON201 the response for an HTTP 201 `application/json` response
	JSON201 *FederationDetails
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *ErrorResponse
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *ErrorResponse
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *ErrorResponse
	// JSON409 the response for an HTTP 409 `application/json` response
	JSON409 *ErrorResponse
	// JSON429 the response for an HTTP 429 `application/json` response
	JSON429 *TooManyRequests
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *ErrorResponse
	// JSON503 the response for an HTTP 503 `application/json` response
	JSON503 *ServiceUnavailable
	// Headers429 the parsed response headers for an HTTP 429 response
	Headers429 *CreateFederationResponse429Headers
	// Headers503 the parsed response headers for an HTTP 503 response
	Headers503 *CreateFederationResponse503Headers
}

func ParseCreateFederationResponse

func ParseCreateFederationResponse(rsp *http.Response) (*CreateFederationResponse, error)

ParseCreateFederationResponse parses an HTTP response from a CreateFederationWithResponse call

func (CreateFederationResponse) ContentType

func (r CreateFederationResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (CreateFederationResponse) GetBody

func (r CreateFederationResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (CreateFederationResponse) GetJSON201

GetJSON201 returns the response for an HTTP 201 `application/json` response

func (CreateFederationResponse) GetJSON400

func (r CreateFederationResponse) GetJSON400() *ErrorResponse

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (CreateFederationResponse) GetJSON401

func (r CreateFederationResponse) GetJSON401() *ErrorResponse

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (CreateFederationResponse) GetJSON403

func (r CreateFederationResponse) GetJSON403() *ErrorResponse

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (CreateFederationResponse) GetJSON409

func (r CreateFederationResponse) GetJSON409() *ErrorResponse

GetJSON409 returns the response for an HTTP 409 `application/json` response

func (CreateFederationResponse) GetJSON429

func (r CreateFederationResponse) GetJSON429() *TooManyRequests

GetJSON429 returns the response for an HTTP 429 `application/json` response

func (CreateFederationResponse) GetJSON500

func (r CreateFederationResponse) GetJSON500() *ErrorResponse

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (CreateFederationResponse) GetJSON503

GetJSON503 returns the response for an HTTP 503 `application/json` response

func (CreateFederationResponse) Status

func (r CreateFederationResponse) Status() string

Status returns HTTPResponse.Status

func (CreateFederationResponse) StatusCode

func (r CreateFederationResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateFederationResponse429Headers

type CreateFederationResponse429Headers struct {
	RateLimit       *string
	RateLimitPolicy *string
	RetryAfter      int
}

CreateFederationResponse429Headers the declared response headers of an HTTP 429 response for CreateFederation

type CreateFederationResponse503Headers

type CreateFederationResponse503Headers struct {
	RateLimit       *string
	RateLimitPolicy *string
	RetryAfter      int
}

CreateFederationResponse503Headers the declared response headers of an HTTP 503 response for CreateFederation

type CreateJpdRequest

type CreateJpdRequest struct {
	// Id Required within this object. Label for the follower, unique on this controller; referenced from connection groups.
	Id string `json:"id"`

	// PairingToken Required within this object. Write-only. The pairing token issued by the follower for the platform-federation use case. Rejected with 400 when expired, already used or issued for another use case.
	PairingToken *string `json:"pairing_token,omitempty"`

	// Url Required within this object. Base URL of the follower instance.
	Url string `json:"url"`
}

CreateJpdRequest A follower instance to add to this controller. Obtain pairing_token on the follower with POST /access/api/v1/service_trust/pairing/platform-federation; the token is used once to establish mutual trust and is not stored.

type DeleteFederationResponse

type DeleteFederationResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *ErrorResponse
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *ErrorResponse
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *ErrorResponse
	// JSON429 the response for an HTTP 429 `application/json` response
	JSON429 *TooManyRequests
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *ErrorResponse
	// JSON503 the response for an HTTP 503 `application/json` response
	JSON503 *ServiceUnavailable
	// Headers429 the parsed response headers for an HTTP 429 response
	Headers429 *DeleteFederationResponse429Headers
	// Headers503 the parsed response headers for an HTTP 503 response
	Headers503 *DeleteFederationResponse503Headers
}

func ParseDeleteFederationResponse

func ParseDeleteFederationResponse(rsp *http.Response) (*DeleteFederationResponse, error)

ParseDeleteFederationResponse parses an HTTP response from a DeleteFederationWithResponse call

func (DeleteFederationResponse) ContentType

func (r DeleteFederationResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (DeleteFederationResponse) GetBody

func (r DeleteFederationResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (DeleteFederationResponse) GetJSON401

func (r DeleteFederationResponse) GetJSON401() *ErrorResponse

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (DeleteFederationResponse) GetJSON403

func (r DeleteFederationResponse) GetJSON403() *ErrorResponse

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (DeleteFederationResponse) GetJSON404

func (r DeleteFederationResponse) GetJSON404() *ErrorResponse

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (DeleteFederationResponse) GetJSON429

func (r DeleteFederationResponse) GetJSON429() *TooManyRequests

GetJSON429 returns the response for an HTTP 429 `application/json` response

func (DeleteFederationResponse) GetJSON500

func (r DeleteFederationResponse) GetJSON500() *ErrorResponse

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (DeleteFederationResponse) GetJSON503

GetJSON503 returns the response for an HTTP 503 `application/json` response

func (DeleteFederationResponse) Status

func (r DeleteFederationResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteFederationResponse) StatusCode

func (r DeleteFederationResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteFederationResponse429Headers

type DeleteFederationResponse429Headers struct {
	RateLimit       *string
	RateLimitPolicy *string
	RetryAfter      int
}

DeleteFederationResponse429Headers the declared response headers of an HTTP 429 response for DeleteFederation

type DeleteFederationResponse503Headers

type DeleteFederationResponse503Headers struct {
	RateLimit       *string
	RateLimitPolicy *string
	RetryAfter      int
}

DeleteFederationResponse503Headers the declared response headers of an HTTP 503 response for DeleteFederation

type DeleteFollowerJpdResponse

type DeleteFollowerJpdResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *ErrorResponse
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *ErrorResponse
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *ErrorResponse
	// JSON429 the response for an HTTP 429 `application/json` response
	JSON429 *TooManyRequests
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *ErrorResponse
	// JSON503 the response for an HTTP 503 `application/json` response
	JSON503 *ServiceUnavailable
	// Headers429 the parsed response headers for an HTTP 429 response
	Headers429 *DeleteFollowerJpdResponse429Headers
	// Headers503 the parsed response headers for an HTTP 503 response
	Headers503 *DeleteFollowerJpdResponse503Headers
}

func ParseDeleteFollowerJpdResponse

func ParseDeleteFollowerJpdResponse(rsp *http.Response) (*DeleteFollowerJpdResponse, error)

ParseDeleteFollowerJpdResponse parses an HTTP response from a DeleteFollowerJpdWithResponse call

func (DeleteFollowerJpdResponse) ContentType

func (r DeleteFollowerJpdResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (DeleteFollowerJpdResponse) GetBody

func (r DeleteFollowerJpdResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (DeleteFollowerJpdResponse) GetJSON401

func (r DeleteFollowerJpdResponse) GetJSON401() *ErrorResponse

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (DeleteFollowerJpdResponse) GetJSON403

func (r DeleteFollowerJpdResponse) GetJSON403() *ErrorResponse

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (DeleteFollowerJpdResponse) GetJSON404

func (r DeleteFollowerJpdResponse) GetJSON404() *ErrorResponse

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (DeleteFollowerJpdResponse) GetJSON429

GetJSON429 returns the response for an HTTP 429 `application/json` response

func (DeleteFollowerJpdResponse) GetJSON500

func (r DeleteFollowerJpdResponse) GetJSON500() *ErrorResponse

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (DeleteFollowerJpdResponse) GetJSON503

GetJSON503 returns the response for an HTTP 503 `application/json` response

func (DeleteFollowerJpdResponse) Status

func (r DeleteFollowerJpdResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteFollowerJpdResponse) StatusCode

func (r DeleteFollowerJpdResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteFollowerJpdResponse429Headers

type DeleteFollowerJpdResponse429Headers struct {
	RateLimit       *string
	RateLimitPolicy *string
	RetryAfter      int
}

DeleteFollowerJpdResponse429Headers the declared response headers of an HTTP 429 response for DeleteFollowerJpd

type DeleteFollowerJpdResponse503Headers

type DeleteFollowerJpdResponse503Headers struct {
	RateLimit       *string
	RateLimitPolicy *string
	RetryAfter      int
}

DeleteFollowerJpdResponse503Headers the declared response headers of an HTTP 503 response for DeleteFollowerJpd

type EntityConfig

type EntityConfig struct {
	// Type Required within this object. Entity type identifier in <service>.<entityType> form. These types are recorded but carry no data to synchronise. Identity replication between peers is configured through /access/api/v1/system/federation instead.
	Type EntityConfigType `json:"type"`
}

EntityConfig One entity type a federation covers.

type EntityConfigType

type EntityConfigType string

EntityConfigType Required within this object. Entity type identifier in <service>.<entityType> form. These types are recorded but carry no data to synchronise. Identity replication between peers is configured through /access/api/v1/system/federation instead.

const (
	CatalogCustomLabels   EntityConfigType = "catalog.customLabels"
	XrayCurationCondition EntityConfigType = "xray.curationCondition"
	XrayCurationPkgType   EntityConfigType = "xray.curationPkgType"
	XrayCurationPolicy    EntityConfigType = "xray.curationPolicy"
)

Defines values for EntityConfigType.

func (EntityConfigType) Valid

func (e EntityConfigType) Valid() bool

Valid indicates whether the value is a known member of the EntityConfigType enum.

type ErrorResponse

type ErrorResponse struct {
	// Code Required within this object. The HTTP status code of the response, for example 404.
	Code int `json:"code"`

	// Message Required within this object. Human readable explanation.
	Message string `json:"message"`
}

ErrorResponse The flat error envelope used by /pfed.

type FederationDetails

type FederationDetails struct {
	// ConnectionGroups Optional within this object. The connection groups keyed by group name; always the single source-jpd group.
	ConnectionGroups *map[string]ConnectionGroup `json:"connection_groups,omitempty"`

	// Description Optional within this object. The federation description, empty when none was given.
	Description *string `json:"description,omitempty"`

	// Entities Optional within this object. The federated entity types.
	Entities *[]EntityConfig `json:"entities,omitempty"`

	// Id Optional within this object. Server-owned. Identifier assigned at creation and used in /federations/{id}.
	Id *string `json:"id,omitempty"`

	// Name Optional within this object. The federation name.
	Name *string `json:"name,omitempty"`
}

FederationDetails A stored platform federation.

type FederationId

type FederationId = string

FederationId defines model for FederationId.

type FederationSummary

type FederationSummary struct {
	// Id Optional within this object. Server-owned. The federation id.
	Id *string `json:"id,omitempty"`

	// Name Optional within this object. The federation name.
	Name *string `json:"name,omitempty"`
}

FederationSummary A federation as listed.

type GetFederationResponse

type GetFederationResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *FederationDetails
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *ErrorResponse
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *ErrorResponse
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *ErrorResponse
	// JSON429 the response for an HTTP 429 `application/json` response
	JSON429 *TooManyRequests
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *ErrorResponse
	// JSON503 the response for an HTTP 503 `application/json` response
	JSON503 *ServiceUnavailable
	// Headers429 the parsed response headers for an HTTP 429 response
	Headers429 *GetFederationResponse429Headers
	// Headers503 the parsed response headers for an HTTP 503 response
	Headers503 *GetFederationResponse503Headers
}

func ParseGetFederationResponse

func ParseGetFederationResponse(rsp *http.Response) (*GetFederationResponse, error)

ParseGetFederationResponse parses an HTTP response from a GetFederationWithResponse call

func (GetFederationResponse) ContentType

func (r GetFederationResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetFederationResponse) GetBody

func (r GetFederationResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetFederationResponse) GetJSON200

func (r GetFederationResponse) GetJSON200() *FederationDetails

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetFederationResponse) GetJSON401

func (r GetFederationResponse) GetJSON401() *ErrorResponse

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (GetFederationResponse) GetJSON403

func (r GetFederationResponse) GetJSON403() *ErrorResponse

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (GetFederationResponse) GetJSON404

func (r GetFederationResponse) GetJSON404() *ErrorResponse

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (GetFederationResponse) GetJSON429

func (r GetFederationResponse) GetJSON429() *TooManyRequests

GetJSON429 returns the response for an HTTP 429 `application/json` response

func (GetFederationResponse) GetJSON500

func (r GetFederationResponse) GetJSON500() *ErrorResponse

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (GetFederationResponse) GetJSON503

func (r GetFederationResponse) GetJSON503() *ServiceUnavailable

GetJSON503 returns the response for an HTTP 503 `application/json` response

func (GetFederationResponse) Status

func (r GetFederationResponse) Status() string

Status returns HTTPResponse.Status

func (GetFederationResponse) StatusCode

func (r GetFederationResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetFederationResponse429Headers

type GetFederationResponse429Headers struct {
	RateLimit       *string
	RateLimitPolicy *string
	RetryAfter      int
}

GetFederationResponse429Headers the declared response headers of an HTTP 429 response for GetFederation

type GetFederationResponse503Headers

type GetFederationResponse503Headers struct {
	RateLimit       *string
	RateLimitPolicy *string
	RetryAfter      int
}

GetFederationResponse503Headers the declared response headers of an HTTP 503 response for GetFederation

type GetFollowerJpdResponse

type GetFollowerJpdResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *JpdUrlResponse
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *ErrorResponse
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *ErrorResponse
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *ErrorResponse
	// JSON429 the response for an HTTP 429 `application/json` response
	JSON429 *TooManyRequests
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *ErrorResponse
	// JSON503 the response for an HTTP 503 `application/json` response
	JSON503 *ServiceUnavailable
	// Headers429 the parsed response headers for an HTTP 429 response
	Headers429 *GetFollowerJpdResponse429Headers
	// Headers503 the parsed response headers for an HTTP 503 response
	Headers503 *GetFollowerJpdResponse503Headers
}

func ParseGetFollowerJpdResponse

func ParseGetFollowerJpdResponse(rsp *http.Response) (*GetFollowerJpdResponse, error)

ParseGetFollowerJpdResponse parses an HTTP response from a GetFollowerJpdWithResponse call

func (GetFollowerJpdResponse) ContentType

func (r GetFollowerJpdResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetFollowerJpdResponse) GetBody

func (r GetFollowerJpdResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetFollowerJpdResponse) GetJSON200

func (r GetFollowerJpdResponse) GetJSON200() *JpdUrlResponse

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetFollowerJpdResponse) GetJSON401

func (r GetFollowerJpdResponse) GetJSON401() *ErrorResponse

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (GetFollowerJpdResponse) GetJSON403

func (r GetFollowerJpdResponse) GetJSON403() *ErrorResponse

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (GetFollowerJpdResponse) GetJSON404

func (r GetFollowerJpdResponse) GetJSON404() *ErrorResponse

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (GetFollowerJpdResponse) GetJSON429

func (r GetFollowerJpdResponse) GetJSON429() *TooManyRequests

GetJSON429 returns the response for an HTTP 429 `application/json` response

func (GetFollowerJpdResponse) GetJSON500

func (r GetFollowerJpdResponse) GetJSON500() *ErrorResponse

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (GetFollowerJpdResponse) GetJSON503

GetJSON503 returns the response for an HTTP 503 `application/json` response

func (GetFollowerJpdResponse) Status

func (r GetFollowerJpdResponse) Status() string

Status returns HTTPResponse.Status

func (GetFollowerJpdResponse) StatusCode

func (r GetFollowerJpdResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetFollowerJpdResponse429Headers

type GetFollowerJpdResponse429Headers struct {
	RateLimit       *string
	RateLimitPolicy *string
	RetryAfter      int
}

GetFollowerJpdResponse429Headers the declared response headers of an HTTP 429 response for GetFollowerJpd

type GetFollowerJpdResponse503Headers

type GetFollowerJpdResponse503Headers struct {
	RateLimit       *string
	RateLimitPolicy *string
	RetryAfter      int
}

GetFollowerJpdResponse503Headers the declared response headers of an HTTP 503 response for GetFollowerJpd

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type IdempotencyKey

type IdempotencyKey = string

IdempotencyKey defines model for IdempotencyKey.

type JpdId

type JpdId = string

JpdId defines model for JpdId.

type JpdResponse

type JpdResponse struct {
	// Id Optional within this object. The follower id.
	Id *string `json:"id,omitempty"`

	// Url Optional within this object. The follower's base URL.
	Url *string `json:"url,omitempty"`
}

JpdResponse A follower instance as listed.

type JpdUrlResponse

type JpdUrlResponse struct {
	// Url Optional within this object. The follower's base URL.
	Url *string `json:"url,omitempty"`
}

JpdUrlResponse A single follower instance.

type ListFederationsResponse

type ListFederationsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *[]FederationSummary
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *ErrorResponse
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *ErrorResponse
	// JSON429 the response for an HTTP 429 `application/json` response
	JSON429 *TooManyRequests
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *ErrorResponse
	// JSON503 the response for an HTTP 503 `application/json` response
	JSON503 *ServiceUnavailable
	// Headers429 the parsed response headers for an HTTP 429 response
	Headers429 *ListFederationsResponse429Headers
	// Headers503 the parsed response headers for an HTTP 503 response
	Headers503 *ListFederationsResponse503Headers
}

func ParseListFederationsResponse

func ParseListFederationsResponse(rsp *http.Response) (*ListFederationsResponse, error)

ParseListFederationsResponse parses an HTTP response from a ListFederationsWithResponse call

func (ListFederationsResponse) ContentType

func (r ListFederationsResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ListFederationsResponse) GetBody

func (r ListFederationsResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ListFederationsResponse) GetJSON200

func (r ListFederationsResponse) GetJSON200() *[]FederationSummary

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (ListFederationsResponse) GetJSON401

func (r ListFederationsResponse) GetJSON401() *ErrorResponse

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (ListFederationsResponse) GetJSON403

func (r ListFederationsResponse) GetJSON403() *ErrorResponse

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (ListFederationsResponse) GetJSON429

func (r ListFederationsResponse) GetJSON429() *TooManyRequests

GetJSON429 returns the response for an HTTP 429 `application/json` response

func (ListFederationsResponse) GetJSON500

func (r ListFederationsResponse) GetJSON500() *ErrorResponse

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (ListFederationsResponse) GetJSON503

GetJSON503 returns the response for an HTTP 503 `application/json` response

func (ListFederationsResponse) Status

func (r ListFederationsResponse) Status() string

Status returns HTTPResponse.Status

func (ListFederationsResponse) StatusCode

func (r ListFederationsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListFederationsResponse429Headers

type ListFederationsResponse429Headers struct {
	RateLimit       *string
	RateLimitPolicy *string
	RetryAfter      int
}

ListFederationsResponse429Headers the declared response headers of an HTTP 429 response for ListFederations

type ListFederationsResponse503Headers

type ListFederationsResponse503Headers struct {
	RateLimit       *string
	RateLimitPolicy *string
	RetryAfter      int
}

ListFederationsResponse503Headers the declared response headers of an HTTP 503 response for ListFederations

type ListFollowerJpdsResponse

type ListFollowerJpdsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *[]JpdResponse
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *ErrorResponse
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *ErrorResponse
	// JSON429 the response for an HTTP 429 `application/json` response
	JSON429 *TooManyRequests
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *ErrorResponse
	// JSON503 the response for an HTTP 503 `application/json` response
	JSON503 *ServiceUnavailable
	// Headers429 the parsed response headers for an HTTP 429 response
	Headers429 *ListFollowerJpdsResponse429Headers
	// Headers503 the parsed response headers for an HTTP 503 response
	Headers503 *ListFollowerJpdsResponse503Headers
}

func ParseListFollowerJpdsResponse

func ParseListFollowerJpdsResponse(rsp *http.Response) (*ListFollowerJpdsResponse, error)

ParseListFollowerJpdsResponse parses an HTTP response from a ListFollowerJpdsWithResponse call

func (ListFollowerJpdsResponse) ContentType

func (r ListFollowerJpdsResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ListFollowerJpdsResponse) GetBody

func (r ListFollowerJpdsResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ListFollowerJpdsResponse) GetJSON200

func (r ListFollowerJpdsResponse) GetJSON200() *[]JpdResponse

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (ListFollowerJpdsResponse) GetJSON401

func (r ListFollowerJpdsResponse) GetJSON401() *ErrorResponse

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (ListFollowerJpdsResponse) GetJSON403

func (r ListFollowerJpdsResponse) GetJSON403() *ErrorResponse

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (ListFollowerJpdsResponse) GetJSON429

func (r ListFollowerJpdsResponse) GetJSON429() *TooManyRequests

GetJSON429 returns the response for an HTTP 429 `application/json` response

func (ListFollowerJpdsResponse) GetJSON500

func (r ListFollowerJpdsResponse) GetJSON500() *ErrorResponse

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (ListFollowerJpdsResponse) GetJSON503

GetJSON503 returns the response for an HTTP 503 `application/json` response

func (ListFollowerJpdsResponse) Status

func (r ListFollowerJpdsResponse) Status() string

Status returns HTTPResponse.Status

func (ListFollowerJpdsResponse) StatusCode

func (r ListFollowerJpdsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListFollowerJpdsResponse429Headers

type ListFollowerJpdsResponse429Headers struct {
	RateLimit       *string
	RateLimitPolicy *string
	RetryAfter      int
}

ListFollowerJpdsResponse429Headers the declared response headers of an HTTP 429 response for ListFollowerJpds

type ListFollowerJpdsResponse503Headers

type ListFollowerJpdsResponse503Headers struct {
	RateLimit       *string
	RateLimitPolicy *string
	RetryAfter      int
}

ListFollowerJpdsResponse503Headers the declared response headers of an HTTP 503 response for ListFollowerJpds

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type ServiceUnavailable

type ServiceUnavailable = ErrorResponse

ServiceUnavailable The flat error envelope used by /pfed.

type TooManyRequests

type TooManyRequests = ErrorResponse

TooManyRequests The flat error envelope used by /pfed.

type UpdateFollowerJpdJSONRequestBody

type UpdateFollowerJpdJSONRequestBody = UpdateJpdRequest

UpdateFollowerJpdJSONRequestBody defines body for UpdateFollowerJpd for application/json ContentType.

type UpdateFollowerJpdResponse

type UpdateFollowerJpdResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *ErrorResponse
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *ErrorResponse
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *ErrorResponse
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *ErrorResponse
	// JSON429 the response for an HTTP 429 `application/json` response
	JSON429 *TooManyRequests
	// JSON500 the response for an HTTP 500 `application/json` response
	JSON500 *ErrorResponse
	// JSON503 the response for an HTTP 503 `application/json` response
	JSON503 *ServiceUnavailable
	// Headers429 the parsed response headers for an HTTP 429 response
	Headers429 *UpdateFollowerJpdResponse429Headers
	// Headers503 the parsed response headers for an HTTP 503 response
	Headers503 *UpdateFollowerJpdResponse503Headers
}

func ParseUpdateFollowerJpdResponse

func ParseUpdateFollowerJpdResponse(rsp *http.Response) (*UpdateFollowerJpdResponse, error)

ParseUpdateFollowerJpdResponse parses an HTTP response from a UpdateFollowerJpdWithResponse call

func (UpdateFollowerJpdResponse) ContentType

func (r UpdateFollowerJpdResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (UpdateFollowerJpdResponse) GetBody

func (r UpdateFollowerJpdResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (UpdateFollowerJpdResponse) GetJSON400

func (r UpdateFollowerJpdResponse) GetJSON400() *ErrorResponse

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (UpdateFollowerJpdResponse) GetJSON401

func (r UpdateFollowerJpdResponse) GetJSON401() *ErrorResponse

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (UpdateFollowerJpdResponse) GetJSON403

func (r UpdateFollowerJpdResponse) GetJSON403() *ErrorResponse

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (UpdateFollowerJpdResponse) GetJSON404

func (r UpdateFollowerJpdResponse) GetJSON404() *ErrorResponse

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (UpdateFollowerJpdResponse) GetJSON429

GetJSON429 returns the response for an HTTP 429 `application/json` response

func (UpdateFollowerJpdResponse) GetJSON500

func (r UpdateFollowerJpdResponse) GetJSON500() *ErrorResponse

GetJSON500 returns the response for an HTTP 500 `application/json` response

func (UpdateFollowerJpdResponse) GetJSON503

GetJSON503 returns the response for an HTTP 503 `application/json` response

func (UpdateFollowerJpdResponse) Status

func (r UpdateFollowerJpdResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateFollowerJpdResponse) StatusCode

func (r UpdateFollowerJpdResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UpdateFollowerJpdResponse429Headers

type UpdateFollowerJpdResponse429Headers struct {
	RateLimit       *string
	RateLimitPolicy *string
	RetryAfter      int
}

UpdateFollowerJpdResponse429Headers the declared response headers of an HTTP 429 response for UpdateFollowerJpd

type UpdateFollowerJpdResponse503Headers

type UpdateFollowerJpdResponse503Headers struct {
	RateLimit       *string
	RateLimitPolicy *string
	RetryAfter      int
}

UpdateFollowerJpdResponse503Headers the declared response headers of an HTTP 503 response for UpdateFollowerJpd

type UpdateJpdRequest

type UpdateJpdRequest struct {
	// PairingToken Required within this object. Write-only. A new platform-federation pairing token from the follower; the previous trust keys are replaced once it is accepted.
	PairingToken *string `json:"pairing_token,omitempty"`

	// Url Required within this object. The follower's base URL.
	Url string `json:"url"`
}

UpdateJpdRequest Replacement URL and a fresh pairing token for an existing follower, used to move a follower or rotate trust. Both fields are required even when only one changes.

Jump to

Keyboard shortcuts

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