harvester

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

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

Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT.

Index

Constants

View Source
const (
	Harvester_authScopes = "harvester_auth.Scopes"
)

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.

func NewBundlePutRequest

func NewBundlePutRequest(server string, trustDomainName externalRef0.TrustDomainName, body BundlePutJSONRequestBody) (*http.Request, error)

NewBundlePutRequest calls the generic BundlePut builder with application/json body

func NewBundlePutRequestWithBody

func NewBundlePutRequestWithBody(server string, trustDomainName externalRef0.TrustDomainName, contentType string, body io.Reader) (*http.Request, error)

NewBundlePutRequestWithBody generates requests for BundlePut with any type of body

func NewBundleSyncRequest

func NewBundleSyncRequest(server string, trustDomainName externalRef0.TrustDomainName, body BundleSyncJSONRequestBody) (*http.Request, error)

NewBundleSyncRequest calls the generic BundleSync builder with application/json body

func NewBundleSyncRequestWithBody

func NewBundleSyncRequestWithBody(server string, trustDomainName externalRef0.TrustDomainName, contentType string, body io.Reader) (*http.Request, error)

NewBundleSyncRequestWithBody generates requests for BundleSync with any type of body

func NewGetNewJWTTokenRequest

func NewGetNewJWTTokenRequest(server string, trustDomainName externalRef0.TrustDomainName) (*http.Request, error)

NewGetNewJWTTokenRequest generates requests for GetNewJWTToken

func NewGetRelationshipsRequest

func NewGetRelationshipsRequest(server string, trustDomainName externalRef0.TrustDomainName, params *GetRelationshipsParams) (*http.Request, error)

NewGetRelationshipsRequest generates requests for GetRelationships

func NewOnboardRequest

func NewOnboardRequest(server string, trustDomainName externalRef0.TrustDomainName, params *OnboardParams) (*http.Request, error)

NewOnboardRequest generates requests for Onboard

func NewPatchRelationshipRequest

func NewPatchRelationshipRequest(server string, trustDomainName externalRef0.TrustDomainName, relationshipID externalRef0.UUID, body PatchRelationshipJSONRequestBody) (*http.Request, error)

NewPatchRelationshipRequest calls the generic PatchRelationship builder with application/json body

func NewPatchRelationshipRequestWithBody

func NewPatchRelationshipRequestWithBody(server string, trustDomainName externalRef0.TrustDomainName, relationshipID externalRef0.UUID, contentType string, body io.Reader) (*http.Request, error)

NewPatchRelationshipRequestWithBody generates requests for PatchRelationship with any type of body

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

func RegisterHandlers

func RegisterHandlers(router EchoRouter, si ServerInterface)

RegisterHandlers adds each server route to the EchoRouter.

func RegisterHandlersWithBaseURL

func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)

Registers handlers, and prepends BaseURL to the paths, so that the paths can be served under a prefix.

Types

type BundlePutJSONRequestBody

type BundlePutJSONRequestBody = PutBundleRequest

BundlePutJSONRequestBody defines body for BundlePut for application/json ContentType.

type BundlePutResponse

type BundlePutResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSONDefault  *externalRef0.ApiError
}

func ParseBundlePutResponse

func ParseBundlePutResponse(rsp *http.Response) (*BundlePutResponse, error)

ParseBundlePutResponse parses an HTTP response from a BundlePutWithResponse call

func (BundlePutResponse) Status

func (r BundlePutResponse) Status() string

Status returns HTTPResponse.Status

func (BundlePutResponse) StatusCode

func (r BundlePutResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type BundleSyncJSONRequestBody

type BundleSyncJSONRequestBody = PostBundleSyncRequest

BundleSyncJSONRequestBody defines body for BundleSync for application/json ContentType.

type BundleSyncResponse

type BundleSyncResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PostBundleSyncResponse
	JSONDefault  *externalRef0.ApiError
}

func ParseBundleSyncResponse

func ParseBundleSyncResponse(rsp *http.Response) (*BundleSyncResponse, error)

ParseBundleSyncResponse parses an HTTP response from a BundleSyncWithResponse call

func (BundleSyncResponse) Status

func (r BundleSyncResponse) Status() string

Status returns HTTPResponse.Status

func (BundleSyncResponse) StatusCode

func (r BundleSyncResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type BundlesDigests

type BundlesDigests map[string]externalRef0.BundleDigest

BundlesDigests defines model for BundlesDigests.

type BundlesUpdates

type BundlesUpdates map[string]BundlesUpdatesItem

BundlesUpdates defines model for BundlesUpdates.

type BundlesUpdatesItem

type BundlesUpdatesItem struct {
	// Digest base64 encoded SHA-256 digest of the bundle
	Digest externalRef0.BundleDigest `json:"digest"`

	// Signature base64 encoded signature of the bundle
	Signature externalRef0.Signature `json:"signature"`

	// SigningCertificate X.509 certificate in PEM format
	SigningCertificate externalRef0.Certificate `json:"signing_certificate"`

	// TrustBundle SPIFFE Trust bundle in JSON format
	TrustBundle externalRef0.TrustBundle `json:"trust_bundle"`
}

BundlesUpdatesItem defines model for BundlesUpdatesItem.

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) BundlePut

func (c *Client) BundlePut(ctx context.Context, trustDomainName externalRef0.TrustDomainName, body BundlePutJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) BundlePutWithBody

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

func (*Client) BundleSync

func (c *Client) BundleSync(ctx context.Context, trustDomainName externalRef0.TrustDomainName, body BundleSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) BundleSyncWithBody

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

func (*Client) GetNewJWTToken

func (c *Client) GetNewJWTToken(ctx context.Context, trustDomainName externalRef0.TrustDomainName, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetRelationships

func (c *Client) GetRelationships(ctx context.Context, trustDomainName externalRef0.TrustDomainName, params *GetRelationshipsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) Onboard

func (c *Client) Onboard(ctx context.Context, trustDomainName externalRef0.TrustDomainName, params *OnboardParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PatchRelationship

func (c *Client) PatchRelationship(ctx context.Context, trustDomainName externalRef0.TrustDomainName, relationshipID externalRef0.UUID, body PatchRelationshipJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PatchRelationshipWithBody

func (c *Client) PatchRelationshipWithBody(ctx context.Context, trustDomainName externalRef0.TrustDomainName, relationshipID externalRef0.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// BundlePut request with any body
	BundlePutWithBody(ctx context.Context, trustDomainName externalRef0.TrustDomainName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	BundlePut(ctx context.Context, trustDomainName externalRef0.TrustDomainName, body BundlePutJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// BundleSync request with any body
	BundleSyncWithBody(ctx context.Context, trustDomainName externalRef0.TrustDomainName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	BundleSync(ctx context.Context, trustDomainName externalRef0.TrustDomainName, body BundleSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetNewJWTToken request
	GetNewJWTToken(ctx context.Context, trustDomainName externalRef0.TrustDomainName, reqEditors ...RequestEditorFn) (*http.Response, error)

	// Onboard request
	Onboard(ctx context.Context, trustDomainName externalRef0.TrustDomainName, params *OnboardParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetRelationships request
	GetRelationships(ctx context.Context, trustDomainName externalRef0.TrustDomainName, params *GetRelationshipsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PatchRelationship request with any body
	PatchRelationshipWithBody(ctx context.Context, trustDomainName externalRef0.TrustDomainName, relationshipID externalRef0.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PatchRelationship(ctx context.Context, trustDomainName externalRef0.TrustDomainName, relationshipID externalRef0.UUID, body PatchRelationshipJSONRequestBody, 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) BundlePutWithBodyWithResponse

func (c *ClientWithResponses) BundlePutWithBodyWithResponse(ctx context.Context, trustDomainName externalRef0.TrustDomainName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*BundlePutResponse, error)

BundlePutWithBodyWithResponse request with arbitrary body returning *BundlePutResponse

func (*ClientWithResponses) BundlePutWithResponse

func (c *ClientWithResponses) BundlePutWithResponse(ctx context.Context, trustDomainName externalRef0.TrustDomainName, body BundlePutJSONRequestBody, reqEditors ...RequestEditorFn) (*BundlePutResponse, error)

func (*ClientWithResponses) BundleSyncWithBodyWithResponse

func (c *ClientWithResponses) BundleSyncWithBodyWithResponse(ctx context.Context, trustDomainName externalRef0.TrustDomainName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*BundleSyncResponse, error)

BundleSyncWithBodyWithResponse request with arbitrary body returning *BundleSyncResponse

func (*ClientWithResponses) BundleSyncWithResponse

func (c *ClientWithResponses) BundleSyncWithResponse(ctx context.Context, trustDomainName externalRef0.TrustDomainName, body BundleSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*BundleSyncResponse, error)

func (*ClientWithResponses) GetNewJWTTokenWithResponse

func (c *ClientWithResponses) GetNewJWTTokenWithResponse(ctx context.Context, trustDomainName externalRef0.TrustDomainName, reqEditors ...RequestEditorFn) (*GetNewJWTTokenResponse, error)

GetNewJWTTokenWithResponse request returning *GetNewJWTTokenResponse

func (*ClientWithResponses) GetRelationshipsWithResponse

func (c *ClientWithResponses) GetRelationshipsWithResponse(ctx context.Context, trustDomainName externalRef0.TrustDomainName, params *GetRelationshipsParams, reqEditors ...RequestEditorFn) (*GetRelationshipsResponse, error)

GetRelationshipsWithResponse request returning *GetRelationshipsResponse

func (*ClientWithResponses) OnboardWithResponse

func (c *ClientWithResponses) OnboardWithResponse(ctx context.Context, trustDomainName externalRef0.TrustDomainName, params *OnboardParams, reqEditors ...RequestEditorFn) (*OnboardResponse, error)

OnboardWithResponse request returning *OnboardResponse

func (*ClientWithResponses) PatchRelationshipWithBodyWithResponse

func (c *ClientWithResponses) PatchRelationshipWithBodyWithResponse(ctx context.Context, trustDomainName externalRef0.TrustDomainName, relationshipID externalRef0.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchRelationshipResponse, error)

PatchRelationshipWithBodyWithResponse request with arbitrary body returning *PatchRelationshipResponse

func (*ClientWithResponses) PatchRelationshipWithResponse

func (c *ClientWithResponses) PatchRelationshipWithResponse(ctx context.Context, trustDomainName externalRef0.TrustDomainName, relationshipID externalRef0.UUID, body PatchRelationshipJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchRelationshipResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// BundlePut request with any body
	BundlePutWithBodyWithResponse(ctx context.Context, trustDomainName externalRef0.TrustDomainName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*BundlePutResponse, error)

	BundlePutWithResponse(ctx context.Context, trustDomainName externalRef0.TrustDomainName, body BundlePutJSONRequestBody, reqEditors ...RequestEditorFn) (*BundlePutResponse, error)

	// BundleSync request with any body
	BundleSyncWithBodyWithResponse(ctx context.Context, trustDomainName externalRef0.TrustDomainName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*BundleSyncResponse, error)

	BundleSyncWithResponse(ctx context.Context, trustDomainName externalRef0.TrustDomainName, body BundleSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*BundleSyncResponse, error)

	// GetNewJWTToken request
	GetNewJWTTokenWithResponse(ctx context.Context, trustDomainName externalRef0.TrustDomainName, reqEditors ...RequestEditorFn) (*GetNewJWTTokenResponse, error)

	// Onboard request
	OnboardWithResponse(ctx context.Context, trustDomainName externalRef0.TrustDomainName, params *OnboardParams, reqEditors ...RequestEditorFn) (*OnboardResponse, error)

	// GetRelationships request
	GetRelationshipsWithResponse(ctx context.Context, trustDomainName externalRef0.TrustDomainName, params *GetRelationshipsParams, reqEditors ...RequestEditorFn) (*GetRelationshipsResponse, error)

	// PatchRelationship request with any body
	PatchRelationshipWithBodyWithResponse(ctx context.Context, trustDomainName externalRef0.TrustDomainName, relationshipID externalRef0.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchRelationshipResponse, error)

	PatchRelationshipWithResponse(ctx context.Context, trustDomainName externalRef0.TrustDomainName, relationshipID externalRef0.UUID, body PatchRelationshipJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchRelationshipResponse, error)
}

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

type Default

type Default = externalRef0.ApiError

Default defines model for Default.

type EchoRouter

type EchoRouter interface {
	CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
}

This is a simple interface which specifies echo.Route addition functions which are present on both echo.Echo and echo.Group, since we want to allow using either of them for path registration

type GetJwtResponse

type GetJwtResponse struct {
	Token externalRef0.JWT `json:"token"`
}

GetJwtResponse defines model for GetJwtResponse.

type GetNewJWTTokenResponse

type GetNewJWTTokenResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *GetJwtResponse
	JSONDefault  *externalRef0.ApiError
}

func ParseGetNewJWTTokenResponse

func ParseGetNewJWTTokenResponse(rsp *http.Response) (*GetNewJWTTokenResponse, error)

ParseGetNewJWTTokenResponse parses an HTTP response from a GetNewJWTTokenWithResponse call

func (GetNewJWTTokenResponse) Status

func (r GetNewJWTTokenResponse) Status() string

Status returns HTTPResponse.Status

func (GetNewJWTTokenResponse) StatusCode

func (r GetNewJWTTokenResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetRelationshipResponse

type GetRelationshipResponse = []externalRef0.Relationship

GetRelationshipResponse defines model for GetRelationshipResponse.

type GetRelationshipsParams

type GetRelationshipsParams struct {
	ConsentStatus *externalRef0.ConsentStatus `form:"consentStatus,omitempty" json:"consentStatus,omitempty"`
}

GetRelationshipsParams defines parameters for GetRelationships.

type GetRelationshipsResponse

type GetRelationshipsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *GetRelationshipResponse
	JSONDefault  *externalRef0.ApiError
}

func ParseGetRelationshipsResponse

func ParseGetRelationshipsResponse(rsp *http.Response) (*GetRelationshipsResponse, error)

ParseGetRelationshipsResponse parses an HTTP response from a GetRelationshipsWithResponse call

func (GetRelationshipsResponse) Status

func (r GetRelationshipsResponse) Status() string

Status returns HTTPResponse.Status

func (GetRelationshipsResponse) StatusCode

func (r GetRelationshipsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

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

Doer performs HTTP requests.

The standard http.Client implements this interface.

type OnboardHarvesterResponse

type OnboardHarvesterResponse struct {
	Token           externalRef0.JWT             `json:"token"`
	TrustDomainID   externalRef0.UUID            `json:"trustDomainID"`
	TrustDomainName externalRef0.TrustDomainName `json:"trustDomainName"`
}

OnboardHarvesterResponse defines model for OnboardHarvesterResponse.

type OnboardParams

type OnboardParams struct {
	// JoinToken Join token to be used for onboarding
	JoinToken string `form:"joinToken" json:"joinToken"`
}

OnboardParams defines parameters for Onboard.

type OnboardResponse

type OnboardResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *OnboardHarvesterResponse
	JSONDefault  *externalRef0.ApiError
}

func ParseOnboardResponse

func ParseOnboardResponse(rsp *http.Response) (*OnboardResponse, error)

ParseOnboardResponse parses an HTTP response from a OnboardWithResponse call

func (OnboardResponse) Status

func (r OnboardResponse) Status() string

Status returns HTTPResponse.Status

func (OnboardResponse) StatusCode

func (r OnboardResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PatchRelationshipJSONRequestBody

type PatchRelationshipJSONRequestBody = PatchRelationshipRequest

PatchRelationshipJSONRequestBody defines body for PatchRelationship for application/json ContentType.

type PatchRelationshipRequest

type PatchRelationshipRequest struct {
	ConsentStatus externalRef0.ConsentStatus `json:"consent_status"`
}

PatchRelationshipRequest defines model for PatchRelationshipRequest.

type PatchRelationshipResponse

type PatchRelationshipResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *externalRef0.Relationship
	JSONDefault  *externalRef0.ApiError
}

func ParsePatchRelationshipResponse

func ParsePatchRelationshipResponse(rsp *http.Response) (*PatchRelationshipResponse, error)

ParsePatchRelationshipResponse parses an HTTP response from a PatchRelationshipWithResponse call

func (PatchRelationshipResponse) Status

func (r PatchRelationshipResponse) Status() string

Status returns HTTPResponse.Status

func (PatchRelationshipResponse) StatusCode

func (r PatchRelationshipResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostBundleSyncRequest

type PostBundleSyncRequest struct {
	State BundlesDigests `json:"state"`
}

PostBundleSyncRequest defines model for PostBundleSyncRequest.

type PostBundleSyncResponse

type PostBundleSyncResponse struct {
	State   BundlesDigests `json:"state"`
	Updates BundlesUpdates `json:"updates"`
}

PostBundleSyncResponse defines model for PostBundleSyncResponse.

type PutBundleRequest

type PutBundleRequest struct {
	// Digest base64 encoded SHA-256 digest of the bundle
	Digest externalRef0.BundleDigest `json:"digest"`

	// Signature base64 encoded signature of the bundle
	Signature *externalRef0.Signature `json:"signature,omitempty"`

	// SigningCertificate X.509 certificate in PEM format
	SigningCertificate *externalRef0.Certificate `json:"signing_certificate,omitempty"`

	// TrustBundle SPIFFE Trust bundle in JSON format
	TrustBundle externalRef0.TrustBundle     `json:"trust_bundle"`
	TrustDomain externalRef0.TrustDomainName `json:"trust_domain"`
}

PutBundleRequest defines model for PutBundleRequest.

func (PutBundleRequest) ToEntity

func (b PutBundleRequest) ToEntity() (*entity.Bundle, error)

type RequestEditorFn

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

RequestEditorFn is the function signature for the RequestEditor callback function

type ServerInterface

type ServerInterface interface {
	// Upload a new trust bundle to the server
	// (PUT /trust-domain/{trustDomainName}/bundles)
	BundlePut(ctx echo.Context, trustDomainName externalRef0.TrustDomainName) error
	// Synchronizes federated bundles with Galadriel Server
	// (POST /trust-domain/{trustDomainName}/bundles/sync)
	BundleSync(ctx echo.Context, trustDomainName externalRef0.TrustDomainName) error
	// Get a renewed JWT token with the same claims as the original one
	// (GET /trust-domain/{trustDomainName}/jwt)
	GetNewJWTToken(ctx echo.Context, trustDomainName externalRef0.TrustDomainName) error
	// Onboarding a new Trust Domain in the Galadriel Server
	// (GET /trust-domain/{trustDomainName}/onboard)
	Onboard(ctx echo.Context, trustDomainName externalRef0.TrustDomainName, params OnboardParams) error
	// List the relationships.
	// (GET /trust-domain/{trustDomainName}/relationships)
	GetRelationships(ctx echo.Context, trustDomainName externalRef0.TrustDomainName, params GetRelationshipsParams) error
	// Accept/Denies relationship requests
	// (PATCH /trust-domain/{trustDomainName}/relationships/{relationshipID})
	PatchRelationship(ctx echo.Context, trustDomainName externalRef0.TrustDomainName, relationshipID externalRef0.UUID) error
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler ServerInterface
}

ServerInterfaceWrapper converts echo contexts to parameters.

func (*ServerInterfaceWrapper) BundlePut

func (w *ServerInterfaceWrapper) BundlePut(ctx echo.Context) error

BundlePut converts echo context to params.

func (*ServerInterfaceWrapper) BundleSync

func (w *ServerInterfaceWrapper) BundleSync(ctx echo.Context) error

BundleSync converts echo context to params.

func (*ServerInterfaceWrapper) GetNewJWTToken

func (w *ServerInterfaceWrapper) GetNewJWTToken(ctx echo.Context) error

GetNewJWTToken converts echo context to params.

func (*ServerInterfaceWrapper) GetRelationships

func (w *ServerInterfaceWrapper) GetRelationships(ctx echo.Context) error

GetRelationships converts echo context to params.

func (*ServerInterfaceWrapper) Onboard

func (w *ServerInterfaceWrapper) Onboard(ctx echo.Context) error

Onboard converts echo context to params.

func (*ServerInterfaceWrapper) PatchRelationship

func (w *ServerInterfaceWrapper) PatchRelationship(ctx echo.Context) error

PatchRelationship converts echo context to params.

Jump to

Keyboard shortcuts

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