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.
Index ¶
- func NewAddFollowerJpdRequest(server string, body AddFollowerJpdJSONRequestBody) (*http.Request, error)
- func NewAddFollowerJpdRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewCreateFederationRequest(server string, body CreateFederationJSONRequestBody) (*http.Request, error)
- func NewCreateFederationRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewDeleteFederationRequest(server string, id FederationId) (*http.Request, error)
- func NewDeleteFollowerJpdRequest(server string, id JpdId) (*http.Request, error)
- func NewGetFederationRequest(server string, id FederationId) (*http.Request, error)
- func NewGetFollowerJpdRequest(server string, id JpdId) (*http.Request, error)
- func NewListFederationsRequest(server string) (*http.Request, error)
- func NewListFollowerJpdsRequest(server string) (*http.Request, error)
- func NewUpdateFollowerJpdRequest(server string, id JpdId, body UpdateFollowerJpdJSONRequestBody) (*http.Request, error)
- func NewUpdateFollowerJpdRequestWithBody(server string, id JpdId, contentType string, body io.Reader) (*http.Request, error)
- type AddFollowerJpdJSONRequestBody
- type AddFollowerJpdResponse
- func (r AddFollowerJpdResponse) ContentType() string
- func (r AddFollowerJpdResponse) GetBody() []byte
- func (r AddFollowerJpdResponse) GetJSON201() *JpdResponse
- func (r AddFollowerJpdResponse) GetJSON400() *ErrorResponse
- func (r AddFollowerJpdResponse) GetJSON401() *ErrorResponse
- func (r AddFollowerJpdResponse) GetJSON403() *ErrorResponse
- func (r AddFollowerJpdResponse) GetJSON409() *ErrorResponse
- func (r AddFollowerJpdResponse) GetJSON500() *ErrorResponse
- func (r AddFollowerJpdResponse) Status() string
- func (r AddFollowerJpdResponse) StatusCode() int
- type Client
- func (c *Client) AddFollowerJpd(ctx context.Context, body AddFollowerJpdJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) AddFollowerJpdWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CreateFederation(ctx context.Context, body CreateFederationJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateFederationWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) DeleteFederation(ctx context.Context, id FederationId, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) DeleteFollowerJpd(ctx context.Context, id JpdId, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetFederation(ctx context.Context, id FederationId, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetFollowerJpd(ctx context.Context, id JpdId, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListFederations(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListFollowerJpds(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) UpdateFollowerJpd(ctx context.Context, id JpdId, body UpdateFollowerJpdJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) UpdateFollowerJpdWithBody(ctx context.Context, id JpdId, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) AddFollowerJpdWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*AddFollowerJpdResponse, error)
- func (c *ClientWithResponses) AddFollowerJpdWithResponse(ctx context.Context, body AddFollowerJpdJSONRequestBody, ...) (*AddFollowerJpdResponse, error)
- func (c *ClientWithResponses) CreateFederationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateFederationResponse, error)
- func (c *ClientWithResponses) CreateFederationWithResponse(ctx context.Context, body CreateFederationJSONRequestBody, ...) (*CreateFederationResponse, error)
- func (c *ClientWithResponses) DeleteFederationWithResponse(ctx context.Context, id FederationId, reqEditors ...RequestEditorFn) (*DeleteFederationResponse, error)
- func (c *ClientWithResponses) DeleteFollowerJpdWithResponse(ctx context.Context, id JpdId, reqEditors ...RequestEditorFn) (*DeleteFollowerJpdResponse, error)
- func (c *ClientWithResponses) GetFederationWithResponse(ctx context.Context, id FederationId, reqEditors ...RequestEditorFn) (*GetFederationResponse, error)
- func (c *ClientWithResponses) GetFollowerJpdWithResponse(ctx context.Context, id JpdId, reqEditors ...RequestEditorFn) (*GetFollowerJpdResponse, error)
- func (c *ClientWithResponses) ListFederationsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListFederationsResponse, error)
- func (c *ClientWithResponses) ListFollowerJpdsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListFollowerJpdsResponse, error)
- func (c *ClientWithResponses) UpdateFollowerJpdWithBodyWithResponse(ctx context.Context, id JpdId, contentType string, body io.Reader, ...) (*UpdateFollowerJpdResponse, error)
- func (c *ClientWithResponses) UpdateFollowerJpdWithResponse(ctx context.Context, id JpdId, body UpdateFollowerJpdJSONRequestBody, ...) (*UpdateFollowerJpdResponse, error)
- type ClientWithResponsesInterface
- type ConnectionGroup
- type CreateFederationJSONRequestBody
- type CreateFederationRequest
- type CreateFederationResponse
- func (r CreateFederationResponse) ContentType() string
- func (r CreateFederationResponse) GetBody() []byte
- func (r CreateFederationResponse) GetJSON201() *FederationDetails
- func (r CreateFederationResponse) GetJSON400() *ErrorResponse
- func (r CreateFederationResponse) GetJSON401() *ErrorResponse
- func (r CreateFederationResponse) GetJSON403() *ErrorResponse
- func (r CreateFederationResponse) GetJSON409() *ErrorResponse
- func (r CreateFederationResponse) GetJSON500() *ErrorResponse
- func (r CreateFederationResponse) Status() string
- func (r CreateFederationResponse) StatusCode() int
- type CreateJpdRequest
- type DeleteFederationResponse
- func (r DeleteFederationResponse) ContentType() string
- func (r DeleteFederationResponse) GetBody() []byte
- func (r DeleteFederationResponse) GetJSON401() *ErrorResponse
- func (r DeleteFederationResponse) GetJSON403() *ErrorResponse
- func (r DeleteFederationResponse) GetJSON404() *ErrorResponse
- func (r DeleteFederationResponse) GetJSON500() *ErrorResponse
- func (r DeleteFederationResponse) Status() string
- func (r DeleteFederationResponse) StatusCode() int
- type DeleteFollowerJpdResponse
- func (r DeleteFollowerJpdResponse) ContentType() string
- func (r DeleteFollowerJpdResponse) GetBody() []byte
- func (r DeleteFollowerJpdResponse) GetJSON401() *ErrorResponse
- func (r DeleteFollowerJpdResponse) GetJSON403() *ErrorResponse
- func (r DeleteFollowerJpdResponse) GetJSON404() *ErrorResponse
- func (r DeleteFollowerJpdResponse) GetJSON500() *ErrorResponse
- func (r DeleteFollowerJpdResponse) Status() string
- func (r DeleteFollowerJpdResponse) StatusCode() int
- type EntityConfig
- type EntityConfigType
- type ErrorResponse
- type FederationDetails
- type FederationId
- type FederationSummary
- type GetFederationResponse
- func (r GetFederationResponse) ContentType() string
- func (r GetFederationResponse) GetBody() []byte
- func (r GetFederationResponse) GetJSON200() *FederationDetails
- func (r GetFederationResponse) GetJSON401() *ErrorResponse
- func (r GetFederationResponse) GetJSON403() *ErrorResponse
- func (r GetFederationResponse) GetJSON404() *ErrorResponse
- func (r GetFederationResponse) GetJSON500() *ErrorResponse
- func (r GetFederationResponse) Status() string
- func (r GetFederationResponse) StatusCode() int
- type GetFollowerJpdResponse
- func (r GetFollowerJpdResponse) ContentType() string
- func (r GetFollowerJpdResponse) GetBody() []byte
- func (r GetFollowerJpdResponse) GetJSON200() *JpdUrlResponse
- func (r GetFollowerJpdResponse) GetJSON401() *ErrorResponse
- func (r GetFollowerJpdResponse) GetJSON403() *ErrorResponse
- func (r GetFollowerJpdResponse) GetJSON404() *ErrorResponse
- func (r GetFollowerJpdResponse) GetJSON500() *ErrorResponse
- func (r GetFollowerJpdResponse) Status() string
- func (r GetFollowerJpdResponse) StatusCode() int
- type HttpRequestDoer
- type JpdId
- type JpdResponse
- type JpdUrlResponse
- type ListFederationsResponse
- func (r ListFederationsResponse) ContentType() string
- func (r ListFederationsResponse) GetBody() []byte
- func (r ListFederationsResponse) GetJSON200() *[]FederationSummary
- func (r ListFederationsResponse) GetJSON401() *ErrorResponse
- func (r ListFederationsResponse) GetJSON403() *ErrorResponse
- func (r ListFederationsResponse) GetJSON500() *ErrorResponse
- func (r ListFederationsResponse) Status() string
- func (r ListFederationsResponse) StatusCode() int
- type ListFollowerJpdsResponse
- func (r ListFollowerJpdsResponse) ContentType() string
- func (r ListFollowerJpdsResponse) GetBody() []byte
- func (r ListFollowerJpdsResponse) GetJSON200() *[]JpdResponse
- func (r ListFollowerJpdsResponse) GetJSON401() *ErrorResponse
- func (r ListFollowerJpdsResponse) GetJSON403() *ErrorResponse
- func (r ListFollowerJpdsResponse) GetJSON500() *ErrorResponse
- func (r ListFollowerJpdsResponse) Status() string
- func (r ListFollowerJpdsResponse) StatusCode() int
- type RequestEditorFn
- type UpdateFollowerJpdJSONRequestBody
- type UpdateFollowerJpdResponse
- func (r UpdateFollowerJpdResponse) ContentType() string
- func (r UpdateFollowerJpdResponse) GetBody() []byte
- func (r UpdateFollowerJpdResponse) GetJSON400() *ErrorResponse
- func (r UpdateFollowerJpdResponse) GetJSON401() *ErrorResponse
- func (r UpdateFollowerJpdResponse) GetJSON403() *ErrorResponse
- func (r UpdateFollowerJpdResponse) GetJSON404() *ErrorResponse
- func (r UpdateFollowerJpdResponse) GetJSON500() *ErrorResponse
- func (r UpdateFollowerJpdResponse) Status() string
- func (r UpdateFollowerJpdResponse) StatusCode() int
- type UpdateJpdRequest
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 ¶
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 ¶
NewGetFollowerJpdRequest constructs an http.Request for the GetFollowerJpd method
func NewListFederationsRequest ¶
NewListFederationsRequest constructs an http.Request for the ListFederations method
func NewListFollowerJpdsRequest ¶
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
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *ErrorResponse
}
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) GetJSON500 ¶
func (r AddFollowerJpdResponse) GetJSON500() *ErrorResponse
GetJSON500 returns the response for an HTTP 500 `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 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 ¶
ClientOption allows setting custom parameters during construction
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
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *ErrorResponse
}
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 ¶
func (r CreateFederationResponse) GetJSON201() *FederationDetails
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) GetJSON500 ¶
func (r CreateFederationResponse) GetJSON500() *ErrorResponse
GetJSON500 returns the response for an HTTP 500 `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 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
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *ErrorResponse
}
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) GetJSON500 ¶
func (r DeleteFederationResponse) GetJSON500() *ErrorResponse
GetJSON500 returns the response for an HTTP 500 `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 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
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *ErrorResponse
}
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) GetJSON500 ¶
func (r DeleteFollowerJpdResponse) GetJSON500() *ErrorResponse
GetJSON500 returns the response for an HTTP 500 `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 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 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
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *ErrorResponse
}
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) GetJSON500 ¶
func (r GetFederationResponse) GetJSON500() *ErrorResponse
GetJSON500 returns the response for an HTTP 500 `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 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
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *ErrorResponse
}
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) GetJSON500 ¶
func (r GetFollowerJpdResponse) GetJSON500() *ErrorResponse
GetJSON500 returns the response for an HTTP 500 `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 HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
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
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *ErrorResponse
}
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) GetJSON500 ¶
func (r ListFederationsResponse) GetJSON500() *ErrorResponse
GetJSON500 returns the response for an HTTP 500 `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 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
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *ErrorResponse
}
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) GetJSON500 ¶
func (r ListFollowerJpdsResponse) GetJSON500() *ErrorResponse
GetJSON500 returns the response for an HTTP 500 `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 RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
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
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *ErrorResponse
}
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) GetJSON500 ¶
func (r UpdateFollowerJpdResponse) GetJSON500() *ErrorResponse
GetJSON500 returns the response for an HTTP 500 `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 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.