Documentation
¶
Overview ¶
Package openapi provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen/v2 version v2.2.0 DO NOT EDIT.
Index ¶
- func CooFromInlineEntry(ite InlineTrustEntry) (*sparse.CooEntry, error)
- func GetSwagger() (swagger *openapi3.T, err error)
- func MatrixFromInline(ctx context.Context, ref *InlineTrustRef, opts ...spopt.Option) (*sparse.Matrix, error)
- func NewComputeRequest(server string, body ComputeJSONRequestBody) (*http.Request, error)
- func NewComputeRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewComputeWithStatsRequest(server string, body ComputeWithStatsJSONRequestBody) (*http.Request, error)
- func NewComputeWithStatsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewDeleteLocalTrustRequest(server string, id LocalTrustIdParam) (*http.Request, error)
- func NewGetLocalTrustRequest(server string, id LocalTrustIdParam) (*http.Request, error)
- func NewGetStatusRequest(server string) (*http.Request, error)
- func NewHeadLocalTrustRequest(server string, id LocalTrustIdParam) (*http.Request, error)
- func NewUpdateLocalTrustRequest(server string, id LocalTrustIdParam, params *UpdateLocalTrustParams, ...) (*http.Request, error)
- func NewUpdateLocalTrustRequestWithBody(server string, id LocalTrustIdParam, params *UpdateLocalTrustParams, ...) (*http.Request, error)
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- func RegisterHandlers(router EchoRouter, si ServerInterface)
- func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
- func SparseFromInlineEntry(ite InlineTrustEntry) (*sparse.Entry, error)
- func VectorFromInline(ctx context.Context, ref *InlineTrustRef, opts ...spopt.Option) (*sparse.Vector, error)
- type Client
- func (c *Client) Compute(ctx context.Context, body ComputeJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) ComputeWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) ComputeWithStats(ctx context.Context, body ComputeWithStatsJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) ComputeWithStatsWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) DeleteLocalTrust(ctx context.Context, id LocalTrustIdParam, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetLocalTrust(ctx context.Context, id LocalTrustIdParam, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) HeadLocalTrust(ctx context.Context, id LocalTrustIdParam, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) UpdateLocalTrust(ctx context.Context, id LocalTrustIdParam, params *UpdateLocalTrustParams, ...) (*http.Response, error)
- func (c *Client) UpdateLocalTrustWithBody(ctx context.Context, id LocalTrustIdParam, params *UpdateLocalTrustParams, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) ComputeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*ComputeResponse, error)
- func (c *ClientWithResponses) ComputeWithResponse(ctx context.Context, body ComputeJSONRequestBody, ...) (*ComputeResponse, error)
- func (c *ClientWithResponses) ComputeWithStatsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*ComputeWithStatsResponse, error)
- func (c *ClientWithResponses) ComputeWithStatsWithResponse(ctx context.Context, body ComputeWithStatsJSONRequestBody, ...) (*ComputeWithStatsResponse, error)
- func (c *ClientWithResponses) DeleteLocalTrustWithResponse(ctx context.Context, id LocalTrustIdParam, reqEditors ...RequestEditorFn) (*DeleteLocalTrustResponse, error)
- func (c *ClientWithResponses) GetLocalTrustWithResponse(ctx context.Context, id LocalTrustIdParam, reqEditors ...RequestEditorFn) (*GetLocalTrustResponse, error)
- func (c *ClientWithResponses) GetStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetStatusResponse, error)
- func (c *ClientWithResponses) HeadLocalTrustWithResponse(ctx context.Context, id LocalTrustIdParam, reqEditors ...RequestEditorFn) (*HeadLocalTrustResponse, error)
- func (c *ClientWithResponses) UpdateLocalTrustWithBodyWithResponse(ctx context.Context, id LocalTrustIdParam, params *UpdateLocalTrustParams, ...) (*UpdateLocalTrustResponse, error)
- func (c *ClientWithResponses) UpdateLocalTrustWithResponse(ctx context.Context, id LocalTrustIdParam, params *UpdateLocalTrustParams, ...) (*UpdateLocalTrustResponse, error)
- type ClientWithResponsesInterface
- type Compute200JSONResponse
- type Compute400JSONResponse
- type ComputeJSONRequestBody
- type ComputeParams
- type ComputeRequestBody
- type ComputeRequestObject
- type ComputeRequestParams
- type ComputeResponse
- type ComputeResponseOK
- type ComputeResponseOKJSONResponse
- type ComputeResponseObject
- type ComputeWithStats200JSONResponse
- type ComputeWithStats400JSONResponse
- type ComputeWithStatsJSONRequestBody
- type ComputeWithStatsRequestObject
- type ComputeWithStatsResponse
- type ComputeWithStatsResponseOK
- type ComputeWithStatsResponseOKJSONResponse
- type ComputeWithStatsResponseObject
- type DeleteLocalTrust204Response
- type DeleteLocalTrust400JSONResponse
- type DeleteLocalTrust404Response
- type DeleteLocalTrustRequestObject
- type DeleteLocalTrustResponse
- type DeleteLocalTrustResponseObject
- type EchoRouter
- type FlatTailStats
- type GetLocalTrust200JSONResponse
- type GetLocalTrust404Response
- type GetLocalTrustRequestObject
- type GetLocalTrustResponse
- type GetLocalTrustResponseObject
- type GetStatus200JSONResponse
- type GetStatus500JSONResponse
- type GetStatusRequestObject
- type GetStatusResponse
- type GetStatusResponseObject
- type HeadLocalTrust204Response
- type HeadLocalTrust404Response
- type HeadLocalTrustRequestObject
- type HeadLocalTrustResponse
- type HeadLocalTrustResponseObject
- type HttpRequestDoer
- type InlineTrustEntry
- func (t InlineTrustEntry) AsTrustMatrixEntryIndices() (TrustMatrixEntryIndices, error)
- func (t InlineTrustEntry) AsTrustVectorEntryIndex() (TrustVectorEntryIndex, error)
- func (t *InlineTrustEntry) FromTrustMatrixEntryIndices(v TrustMatrixEntryIndices) error
- func (t *InlineTrustEntry) FromTrustVectorEntryIndex(v TrustVectorEntryIndex) error
- func (t InlineTrustEntry) MarshalJSON() ([]byte, error)
- func (t *InlineTrustEntry) MergeTrustMatrixEntryIndices(v TrustMatrixEntryIndices) error
- func (t *InlineTrustEntry) MergeTrustVectorEntryIndex(v TrustVectorEntryIndex) error
- func (t *InlineTrustEntry) UnmarshalJSON(b []byte) error
- type InlineTrustRef
- type InvalidRequest
- type InvalidRequestJSONResponse
- type LocalTrustGetResponseOK
- type LocalTrustGetResponseOKJSONResponse
- type LocalTrustIdParam
- type ObjectStorageTrustRef
- type RequestEditorFn
- type ServerInterface
- type ServerInterfaceWrapper
- func (w *ServerInterfaceWrapper) Compute(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) ComputeWithStats(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) DeleteLocalTrust(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetLocalTrust(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetStatus(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) HeadLocalTrust(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) UpdateLocalTrust(ctx echo.Context) error
- type ServerNotReady
- type ServerNotReadyJSONResponse
- type ServerReady
- type ServerReadyJSONResponse
- type ServerStatus
- type StoredTrustId
- type StoredTrustRef
- type StrictHandlerFunc
- type StrictMiddlewareFunc
- type StrictServerInterface
- type TrustMatrixEntryIndices
- type TrustRef
- func (t TrustRef) AsInlineTrustRef() (InlineTrustRef, error)
- func (t TrustRef) AsObjectStorageTrustRef() (ObjectStorageTrustRef, error)
- func (t TrustRef) AsStoredTrustRef() (StoredTrustRef, error)
- func (t *TrustRef) FromInlineTrustRef(v InlineTrustRef) error
- func (t *TrustRef) FromObjectStorageTrustRef(v ObjectStorageTrustRef) error
- func (t *TrustRef) FromStoredTrustRef(v StoredTrustRef) error
- func (t TrustRef) MarshalJSON() ([]byte, error)
- func (t *TrustRef) MergeInlineTrustRef(v InlineTrustRef) error
- func (t *TrustRef) MergeObjectStorageTrustRef(v ObjectStorageTrustRef) error
- func (t *TrustRef) MergeStoredTrustRef(v StoredTrustRef) error
- func (t *TrustRef) UnmarshalJSON(b []byte) error
- type TrustRefScheme
- type TrustVectorEntryIndex
- type UpdateLocalTrust200Response
- type UpdateLocalTrust201Response
- type UpdateLocalTrust400JSONResponse
- type UpdateLocalTrustJSONRequestBody
- type UpdateLocalTrustParams
- type UpdateLocalTrustRequestObject
- type UpdateLocalTrustResponse
- type UpdateLocalTrustResponseObject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CooFromInlineEntry ¶
func CooFromInlineEntry( ite InlineTrustEntry, ) (*sparse.CooEntry, error)
func GetSwagger ¶
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 MatrixFromInline ¶
func MatrixFromInline( ctx context.Context, ref *InlineTrustRef, opts ...spopt.Option, ) (*sparse.Matrix, error)
MatrixFromInline converts the given inline trust ref into a matrix.
func NewComputeRequest ¶
func NewComputeRequest(server string, body ComputeJSONRequestBody) (*http.Request, error)
NewComputeRequest calls the generic Compute builder with application/json body
func NewComputeRequestWithBody ¶
func NewComputeRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewComputeRequestWithBody generates requests for Compute with any type of body
func NewComputeWithStatsRequest ¶
func NewComputeWithStatsRequest(server string, body ComputeWithStatsJSONRequestBody) (*http.Request, error)
NewComputeWithStatsRequest calls the generic ComputeWithStats builder with application/json body
func NewComputeWithStatsRequestWithBody ¶
func NewComputeWithStatsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewComputeWithStatsRequestWithBody generates requests for ComputeWithStats with any type of body
func NewDeleteLocalTrustRequest ¶
func NewDeleteLocalTrustRequest(server string, id LocalTrustIdParam) (*http.Request, error)
NewDeleteLocalTrustRequest generates requests for DeleteLocalTrust
func NewGetLocalTrustRequest ¶
func NewGetLocalTrustRequest(server string, id LocalTrustIdParam) (*http.Request, error)
NewGetLocalTrustRequest generates requests for GetLocalTrust
func NewGetStatusRequest ¶
NewGetStatusRequest generates requests for GetStatus
func NewHeadLocalTrustRequest ¶
func NewHeadLocalTrustRequest(server string, id LocalTrustIdParam) (*http.Request, error)
NewHeadLocalTrustRequest generates requests for HeadLocalTrust
func NewUpdateLocalTrustRequest ¶
func NewUpdateLocalTrustRequest(server string, id LocalTrustIdParam, params *UpdateLocalTrustParams, body UpdateLocalTrustJSONRequestBody) (*http.Request, error)
NewUpdateLocalTrustRequest calls the generic UpdateLocalTrust builder with application/json body
func NewUpdateLocalTrustRequestWithBody ¶
func NewUpdateLocalTrustRequestWithBody(server string, id LocalTrustIdParam, params *UpdateLocalTrustParams, contentType string, body io.Reader) (*http.Request, error)
NewUpdateLocalTrustRequestWithBody generates requests for UpdateLocalTrust with any type of body
func PathToRawSpec ¶
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.
func SparseFromInlineEntry ¶
func SparseFromInlineEntry( ite InlineTrustEntry, ) (*sparse.Entry, error)
func VectorFromInline ¶
func VectorFromInline( ctx context.Context, ref *InlineTrustRef, opts ...spopt.Option, ) (*sparse.Vector, error)
VectorFromInline converts the given inline trust ref into a vector.
Types ¶
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) Compute ¶
func (c *Client) Compute(ctx context.Context, body ComputeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ComputeWithBody ¶
func (*Client) ComputeWithStats ¶
func (c *Client) ComputeWithStats(ctx context.Context, body ComputeWithStatsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ComputeWithStatsWithBody ¶
func (*Client) DeleteLocalTrust ¶
func (c *Client) DeleteLocalTrust(ctx context.Context, id LocalTrustIdParam, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetLocalTrust ¶
func (c *Client) GetLocalTrust(ctx context.Context, id LocalTrustIdParam, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) HeadLocalTrust ¶
func (c *Client) HeadLocalTrust(ctx context.Context, id LocalTrustIdParam, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdateLocalTrust ¶
func (c *Client) UpdateLocalTrust(ctx context.Context, id LocalTrustIdParam, params *UpdateLocalTrustParams, body UpdateLocalTrustJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdateLocalTrustWithBody ¶
func (c *Client) UpdateLocalTrustWithBody(ctx context.Context, id LocalTrustIdParam, params *UpdateLocalTrustParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface {
// ComputeWithBody request with any body
ComputeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
Compute(ctx context.Context, body ComputeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ComputeWithStatsWithBody request with any body
ComputeWithStatsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
ComputeWithStats(ctx context.Context, body ComputeWithStatsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteLocalTrust request
DeleteLocalTrust(ctx context.Context, id LocalTrustIdParam, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetLocalTrust request
GetLocalTrust(ctx context.Context, id LocalTrustIdParam, reqEditors ...RequestEditorFn) (*http.Response, error)
// HeadLocalTrust request
HeadLocalTrust(ctx context.Context, id LocalTrustIdParam, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateLocalTrustWithBody request with any body
UpdateLocalTrustWithBody(ctx context.Context, id LocalTrustIdParam, params *UpdateLocalTrustParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateLocalTrust(ctx context.Context, id LocalTrustIdParam, params *UpdateLocalTrustParams, body UpdateLocalTrustJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetStatus request
GetStatus(ctx context.Context, 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) ComputeWithBodyWithResponse ¶
func (c *ClientWithResponses) ComputeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ComputeResponse, error)
ComputeWithBodyWithResponse request with arbitrary body returning *ComputeResponse
func (*ClientWithResponses) ComputeWithResponse ¶
func (c *ClientWithResponses) ComputeWithResponse(ctx context.Context, body ComputeJSONRequestBody, reqEditors ...RequestEditorFn) (*ComputeResponse, error)
func (*ClientWithResponses) ComputeWithStatsWithBodyWithResponse ¶
func (c *ClientWithResponses) ComputeWithStatsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ComputeWithStatsResponse, error)
ComputeWithStatsWithBodyWithResponse request with arbitrary body returning *ComputeWithStatsResponse
func (*ClientWithResponses) ComputeWithStatsWithResponse ¶
func (c *ClientWithResponses) ComputeWithStatsWithResponse(ctx context.Context, body ComputeWithStatsJSONRequestBody, reqEditors ...RequestEditorFn) (*ComputeWithStatsResponse, error)
func (*ClientWithResponses) DeleteLocalTrustWithResponse ¶
func (c *ClientWithResponses) DeleteLocalTrustWithResponse(ctx context.Context, id LocalTrustIdParam, reqEditors ...RequestEditorFn) (*DeleteLocalTrustResponse, error)
DeleteLocalTrustWithResponse request returning *DeleteLocalTrustResponse
func (*ClientWithResponses) GetLocalTrustWithResponse ¶
func (c *ClientWithResponses) GetLocalTrustWithResponse(ctx context.Context, id LocalTrustIdParam, reqEditors ...RequestEditorFn) (*GetLocalTrustResponse, error)
GetLocalTrustWithResponse request returning *GetLocalTrustResponse
func (*ClientWithResponses) GetStatusWithResponse ¶
func (c *ClientWithResponses) GetStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetStatusResponse, error)
GetStatusWithResponse request returning *GetStatusResponse
func (*ClientWithResponses) HeadLocalTrustWithResponse ¶
func (c *ClientWithResponses) HeadLocalTrustWithResponse(ctx context.Context, id LocalTrustIdParam, reqEditors ...RequestEditorFn) (*HeadLocalTrustResponse, error)
HeadLocalTrustWithResponse request returning *HeadLocalTrustResponse
func (*ClientWithResponses) UpdateLocalTrustWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateLocalTrustWithBodyWithResponse(ctx context.Context, id LocalTrustIdParam, params *UpdateLocalTrustParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateLocalTrustResponse, error)
UpdateLocalTrustWithBodyWithResponse request with arbitrary body returning *UpdateLocalTrustResponse
func (*ClientWithResponses) UpdateLocalTrustWithResponse ¶
func (c *ClientWithResponses) UpdateLocalTrustWithResponse(ctx context.Context, id LocalTrustIdParam, params *UpdateLocalTrustParams, body UpdateLocalTrustJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateLocalTrustResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// ComputeWithBodyWithResponse request with any body
ComputeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ComputeResponse, error)
ComputeWithResponse(ctx context.Context, body ComputeJSONRequestBody, reqEditors ...RequestEditorFn) (*ComputeResponse, error)
// ComputeWithStatsWithBodyWithResponse request with any body
ComputeWithStatsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ComputeWithStatsResponse, error)
ComputeWithStatsWithResponse(ctx context.Context, body ComputeWithStatsJSONRequestBody, reqEditors ...RequestEditorFn) (*ComputeWithStatsResponse, error)
// DeleteLocalTrustWithResponse request
DeleteLocalTrustWithResponse(ctx context.Context, id LocalTrustIdParam, reqEditors ...RequestEditorFn) (*DeleteLocalTrustResponse, error)
// GetLocalTrustWithResponse request
GetLocalTrustWithResponse(ctx context.Context, id LocalTrustIdParam, reqEditors ...RequestEditorFn) (*GetLocalTrustResponse, error)
// HeadLocalTrustWithResponse request
HeadLocalTrustWithResponse(ctx context.Context, id LocalTrustIdParam, reqEditors ...RequestEditorFn) (*HeadLocalTrustResponse, error)
// UpdateLocalTrustWithBodyWithResponse request with any body
UpdateLocalTrustWithBodyWithResponse(ctx context.Context, id LocalTrustIdParam, params *UpdateLocalTrustParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateLocalTrustResponse, error)
UpdateLocalTrustWithResponse(ctx context.Context, id LocalTrustIdParam, params *UpdateLocalTrustParams, body UpdateLocalTrustJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateLocalTrustResponse, error)
// GetStatusWithResponse request
GetStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetStatusResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type Compute200JSONResponse ¶
type Compute200JSONResponse struct{ ComputeResponseOKJSONResponse }
func (Compute200JSONResponse) VisitComputeResponse ¶
func (response Compute200JSONResponse) VisitComputeResponse(w http.ResponseWriter) error
type Compute400JSONResponse ¶
type Compute400JSONResponse struct{ InvalidRequestJSONResponse }
func (Compute400JSONResponse) VisitComputeResponse ¶
func (response Compute400JSONResponse) VisitComputeResponse(w http.ResponseWriter) error
type ComputeJSONRequestBody ¶
type ComputeJSONRequestBody = ComputeRequestBody
ComputeJSONRequestBody defines body for Compute for application/json ContentType.
type ComputeParams ¶
type ComputeParams struct {
Alpha *float64 `json:"alpha,omitempty"`
// CheckFreq If given (n), exit criteria are checked every n iterations.
// It can be used in conjunction with minIterations
// for "modulo n" behavior,
// e.g. with minIterations=7 and checkFreq=5
// exit criteria are checked after 7/12/17/... iterations.
// Default is 1: exit criteria are checked after every iteration.
CheckFreq *int `json:"checkFreq,omitempty"`
Epsilon *float64 `json:"epsilon,omitempty"`
// FlatTail The length of the flat tail
// (ranking unchanged from previous iteration)
// that must be seen before terminating the recursion.
// 0 means a flat tail need not be seen,
// and the recursion is terminated solely based upon epsilon.
FlatTail *int `json:"flatTail,omitempty"`
// InitialTrust A trust collection (matrix/vector).
//
// Individual entry values in the collection represent trust levels;
// the index/-ices – that is, the coordinate/-s – of an entry
// indicate the peer/-s to which the trust level (value) is bound.
//
// The actual nature of this binding between peer/-s and the trust level
// is up to the context.
// For example, in a global trust (vector) the entry index denotes
// the peer to which the trust value is assigned,
// (the network trusts this peer by the trust level amount;
// the peer is the "trustee"),
// while in a column vector of a local trust matrix the entry index denotes
// the peer from which the inbound trust is originating
// (the peer is the "truster").
InitialTrust *TrustRef `json:"initialTrust,omitempty"`
// LocalTrust A trust collection (matrix/vector).
//
// Individual entry values in the collection represent trust levels;
// the index/-ices – that is, the coordinate/-s – of an entry
// indicate the peer/-s to which the trust level (value) is bound.
//
// The actual nature of this binding between peer/-s and the trust level
// is up to the context.
// For example, in a global trust (vector) the entry index denotes
// the peer to which the trust value is assigned,
// (the network trusts this peer by the trust level amount;
// the peer is the "trustee"),
// while in a column vector of a local trust matrix the entry index denotes
// the peer from which the inbound trust is originating
// (the peer is the "truster").
LocalTrust TrustRef `json:"localTrust"`
// MaxIterations The maximum number of iterations after which to stop
// even if other termination criteria are not met.
// 0 means no limit.
MaxIterations *int `json:"maxIterations,omitempty"`
// MinIterations The minimum number of iterations to perform
// even if other termination criteria are met.
// Defaults to checkFreq, which in turn defaults to 1.
MinIterations *int `json:"minIterations,omitempty"`
// NumLeaders The number of top-ranking peers to consider
// for the purpose of flat-tail algorithm. 0 means everyone.
NumLeaders *int `json:"numLeaders,omitempty"`
// PreTrust A trust collection (matrix/vector).
//
// Individual entry values in the collection represent trust levels;
// the index/-ices – that is, the coordinate/-s – of an entry
// indicate the peer/-s to which the trust level (value) is bound.
//
// The actual nature of this binding between peer/-s and the trust level
// is up to the context.
// For example, in a global trust (vector) the entry index denotes
// the peer to which the trust value is assigned,
// (the network trusts this peer by the trust level amount;
// the peer is the "trustee"),
// while in a column vector of a local trust matrix the entry index denotes
// the peer from which the inbound trust is originating
// (the peer is the "truster").
PreTrust *TrustRef `json:"preTrust,omitempty"`
}
ComputeParams defines model for ComputeParams.
type ComputeRequestBody ¶
type ComputeRequestBody struct {
Alpha *float64 `json:"alpha,omitempty"`
// CheckFreq If given (n), exit criteria are checked every n iterations.
// It can be used in conjunction with minIterations
// for "modulo n" behavior,
// e.g. with minIterations=7 and checkFreq=5
// exit criteria are checked after 7/12/17/... iterations.
// Default is 1: exit criteria are checked after every iteration.
CheckFreq *int `json:"checkFreq,omitempty"`
// EffectiveInitialTrust A trust collection (matrix/vector).
//
// Individual entry values in the collection represent trust levels;
// the index/-ices – that is, the coordinate/-s – of an entry
// indicate the peer/-s to which the trust level (value) is bound.
//
// The actual nature of this binding between peer/-s and the trust level
// is up to the context.
// For example, in a global trust (vector) the entry index denotes
// the peer to which the trust value is assigned,
// (the network trusts this peer by the trust level amount;
// the peer is the "trustee"),
// while in a column vector of a local trust matrix the entry index denotes
// the peer from which the inbound trust is originating
// (the peer is the "truster").
EffectiveInitialTrust *TrustRef `json:"effectiveInitialTrust,omitempty"`
// EffectiveLocalTrust A trust collection (matrix/vector).
//
// Individual entry values in the collection represent trust levels;
// the index/-ices – that is, the coordinate/-s – of an entry
// indicate the peer/-s to which the trust level (value) is bound.
//
// The actual nature of this binding between peer/-s and the trust level
// is up to the context.
// For example, in a global trust (vector) the entry index denotes
// the peer to which the trust value is assigned,
// (the network trusts this peer by the trust level amount;
// the peer is the "trustee"),
// while in a column vector of a local trust matrix the entry index denotes
// the peer from which the inbound trust is originating
// (the peer is the "truster").
EffectiveLocalTrust *TrustRef `json:"effectiveLocalTrust,omitempty"`
// EffectivePreTrust A trust collection (matrix/vector).
//
// Individual entry values in the collection represent trust levels;
// the index/-ices – that is, the coordinate/-s – of an entry
// indicate the peer/-s to which the trust level (value) is bound.
//
// The actual nature of this binding between peer/-s and the trust level
// is up to the context.
// For example, in a global trust (vector) the entry index denotes
// the peer to which the trust value is assigned,
// (the network trusts this peer by the trust level amount;
// the peer is the "trustee"),
// while in a column vector of a local trust matrix the entry index denotes
// the peer from which the inbound trust is originating
// (the peer is the "truster").
EffectivePreTrust *TrustRef `json:"effectivePreTrust,omitempty"`
Epsilon *float64 `json:"epsilon,omitempty"`
// FlatTail The length of the flat tail
// (ranking unchanged from previous iteration)
// that must be seen before terminating the recursion.
// 0 means a flat tail need not be seen,
// and the recursion is terminated solely based upon epsilon.
FlatTail *int `json:"flatTail,omitempty"`
// GlobalTrust A trust collection (matrix/vector).
//
// Individual entry values in the collection represent trust levels;
// the index/-ices – that is, the coordinate/-s – of an entry
// indicate the peer/-s to which the trust level (value) is bound.
//
// The actual nature of this binding between peer/-s and the trust level
// is up to the context.
// For example, in a global trust (vector) the entry index denotes
// the peer to which the trust value is assigned,
// (the network trusts this peer by the trust level amount;
// the peer is the "trustee"),
// while in a column vector of a local trust matrix the entry index denotes
// the peer from which the inbound trust is originating
// (the peer is the "truster").
GlobalTrust *TrustRef `json:"globalTrust,omitempty"`
// InitialTrust A trust collection (matrix/vector).
//
// Individual entry values in the collection represent trust levels;
// the index/-ices – that is, the coordinate/-s – of an entry
// indicate the peer/-s to which the trust level (value) is bound.
//
// The actual nature of this binding between peer/-s and the trust level
// is up to the context.
// For example, in a global trust (vector) the entry index denotes
// the peer to which the trust value is assigned,
// (the network trusts this peer by the trust level amount;
// the peer is the "trustee"),
// while in a column vector of a local trust matrix the entry index denotes
// the peer from which the inbound trust is originating
// (the peer is the "truster").
InitialTrust *TrustRef `json:"initialTrust,omitempty"`
// LocalTrust A trust collection (matrix/vector).
//
// Individual entry values in the collection represent trust levels;
// the index/-ices – that is, the coordinate/-s – of an entry
// indicate the peer/-s to which the trust level (value) is bound.
//
// The actual nature of this binding between peer/-s and the trust level
// is up to the context.
// For example, in a global trust (vector) the entry index denotes
// the peer to which the trust value is assigned,
// (the network trusts this peer by the trust level amount;
// the peer is the "trustee"),
// while in a column vector of a local trust matrix the entry index denotes
// the peer from which the inbound trust is originating
// (the peer is the "truster").
LocalTrust TrustRef `json:"localTrust"`
// MaxIterations The maximum number of iterations after which to stop
// even if other termination criteria are not met.
// 0 means no limit.
MaxIterations *int `json:"maxIterations,omitempty"`
// MinIterations The minimum number of iterations to perform
// even if other termination criteria are met.
// Defaults to checkFreq, which in turn defaults to 1.
MinIterations *int `json:"minIterations,omitempty"`
// NumLeaders The number of top-ranking peers to consider
// for the purpose of flat-tail algorithm. 0 means everyone.
NumLeaders *int `json:"numLeaders,omitempty"`
// PreTrust A trust collection (matrix/vector).
//
// Individual entry values in the collection represent trust levels;
// the index/-ices – that is, the coordinate/-s – of an entry
// indicate the peer/-s to which the trust level (value) is bound.
//
// The actual nature of this binding between peer/-s and the trust level
// is up to the context.
// For example, in a global trust (vector) the entry index denotes
// the peer to which the trust value is assigned,
// (the network trusts this peer by the trust level amount;
// the peer is the "trustee"),
// while in a column vector of a local trust matrix the entry index denotes
// the peer from which the inbound trust is originating
// (the peer is the "truster").
PreTrust *TrustRef `json:"preTrust,omitempty"`
}
ComputeRequestBody defines model for ComputeRequestBody.
type ComputeRequestObject ¶
type ComputeRequestObject struct {
Body *ComputeJSONRequestBody
}
type ComputeRequestParams ¶
type ComputeRequestParams struct {
// EffectiveInitialTrust A trust collection (matrix/vector).
//
// Individual entry values in the collection represent trust levels;
// the index/-ices – that is, the coordinate/-s – of an entry
// indicate the peer/-s to which the trust level (value) is bound.
//
// The actual nature of this binding between peer/-s and the trust level
// is up to the context.
// For example, in a global trust (vector) the entry index denotes
// the peer to which the trust value is assigned,
// (the network trusts this peer by the trust level amount;
// the peer is the "trustee"),
// while in a column vector of a local trust matrix the entry index denotes
// the peer from which the inbound trust is originating
// (the peer is the "truster").
EffectiveInitialTrust *TrustRef `json:"effectiveInitialTrust,omitempty"`
// EffectiveLocalTrust A trust collection (matrix/vector).
//
// Individual entry values in the collection represent trust levels;
// the index/-ices – that is, the coordinate/-s – of an entry
// indicate the peer/-s to which the trust level (value) is bound.
//
// The actual nature of this binding between peer/-s and the trust level
// is up to the context.
// For example, in a global trust (vector) the entry index denotes
// the peer to which the trust value is assigned,
// (the network trusts this peer by the trust level amount;
// the peer is the "trustee"),
// while in a column vector of a local trust matrix the entry index denotes
// the peer from which the inbound trust is originating
// (the peer is the "truster").
EffectiveLocalTrust *TrustRef `json:"effectiveLocalTrust,omitempty"`
// EffectivePreTrust A trust collection (matrix/vector).
//
// Individual entry values in the collection represent trust levels;
// the index/-ices – that is, the coordinate/-s – of an entry
// indicate the peer/-s to which the trust level (value) is bound.
//
// The actual nature of this binding between peer/-s and the trust level
// is up to the context.
// For example, in a global trust (vector) the entry index denotes
// the peer to which the trust value is assigned,
// (the network trusts this peer by the trust level amount;
// the peer is the "trustee"),
// while in a column vector of a local trust matrix the entry index denotes
// the peer from which the inbound trust is originating
// (the peer is the "truster").
EffectivePreTrust *TrustRef `json:"effectivePreTrust,omitempty"`
// GlobalTrust A trust collection (matrix/vector).
//
// Individual entry values in the collection represent trust levels;
// the index/-ices – that is, the coordinate/-s – of an entry
// indicate the peer/-s to which the trust level (value) is bound.
//
// The actual nature of this binding between peer/-s and the trust level
// is up to the context.
// For example, in a global trust (vector) the entry index denotes
// the peer to which the trust value is assigned,
// (the network trusts this peer by the trust level amount;
// the peer is the "trustee"),
// while in a column vector of a local trust matrix the entry index denotes
// the peer from which the inbound trust is originating
// (the peer is the "truster").
GlobalTrust *TrustRef `json:"globalTrust,omitempty"`
}
ComputeRequestParams defines model for ComputeRequestParams.
type ComputeResponse ¶
type ComputeResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ComputeResponseOK
JSON400 *InvalidRequest
}
func ParseComputeResponse ¶
func ParseComputeResponse(rsp *http.Response) (*ComputeResponse, error)
ParseComputeResponse parses an HTTP response from a ComputeWithResponse call
func (ComputeResponse) Status ¶
func (r ComputeResponse) Status() string
Status returns HTTPResponse.Status
func (ComputeResponse) StatusCode ¶
func (r ComputeResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ComputeResponseOK ¶
type ComputeResponseOK = TrustRef
ComputeResponseOK A trust collection (matrix/vector).
Individual entry values in the collection represent trust levels; the index/-ices – that is, the coordinate/-s – of an entry indicate the peer/-s to which the trust level (value) is bound.
The actual nature of this binding between peer/-s and the trust level is up to the context. For example, in a global trust (vector) the entry index denotes the peer to which the trust value is assigned, (the network trusts this peer by the trust level amount; the peer is the "trustee"), while in a column vector of a local trust matrix the entry index denotes the peer from which the inbound trust is originating (the peer is the "truster").
type ComputeResponseOKJSONResponse ¶
type ComputeResponseOKJSONResponse TrustRef
type ComputeResponseObject ¶
type ComputeResponseObject interface {
VisitComputeResponse(w http.ResponseWriter) error
}
type ComputeWithStats200JSONResponse ¶
type ComputeWithStats200JSONResponse struct {
ComputeWithStatsResponseOKJSONResponse
}
func (ComputeWithStats200JSONResponse) VisitComputeWithStatsResponse ¶
func (response ComputeWithStats200JSONResponse) VisitComputeWithStatsResponse(w http.ResponseWriter) error
type ComputeWithStats400JSONResponse ¶
type ComputeWithStats400JSONResponse struct{ InvalidRequestJSONResponse }
func (ComputeWithStats400JSONResponse) VisitComputeWithStatsResponse ¶
func (response ComputeWithStats400JSONResponse) VisitComputeWithStatsResponse(w http.ResponseWriter) error
type ComputeWithStatsJSONRequestBody ¶
type ComputeWithStatsJSONRequestBody = ComputeRequestBody
ComputeWithStatsJSONRequestBody defines body for ComputeWithStats for application/json ContentType.
type ComputeWithStatsRequestObject ¶
type ComputeWithStatsRequestObject struct {
Body *ComputeWithStatsJSONRequestBody
}
type ComputeWithStatsResponse ¶
type ComputeWithStatsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ComputeWithStatsResponseOK
JSON400 *InvalidRequest
}
func ParseComputeWithStatsResponse ¶
func ParseComputeWithStatsResponse(rsp *http.Response) (*ComputeWithStatsResponse, error)
ParseComputeWithStatsResponse parses an HTTP response from a ComputeWithStatsWithResponse call
func (ComputeWithStatsResponse) Status ¶
func (r ComputeWithStatsResponse) Status() string
Status returns HTTPResponse.Status
func (ComputeWithStatsResponse) StatusCode ¶
func (r ComputeWithStatsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ComputeWithStatsResponseOK ¶
type ComputeWithStatsResponseOK struct {
// EigenTrust A trust collection (matrix/vector).
//
// Individual entry values in the collection represent trust levels;
// the index/-ices – that is, the coordinate/-s – of an entry
// indicate the peer/-s to which the trust level (value) is bound.
//
// The actual nature of this binding between peer/-s and the trust level
// is up to the context.
// For example, in a global trust (vector) the entry index denotes
// the peer to which the trust value is assigned,
// (the network trusts this peer by the trust level amount;
// the peer is the "trustee"),
// while in a column vector of a local trust matrix the entry index denotes
// the peer from which the inbound trust is originating
// (the peer is the "truster").
EigenTrust TrustRef `json:"eigenTrust"`
// FlatTailStats Flat-tail algorithm stats and peer ranking.
FlatTailStats FlatTailStats `json:"flatTailStats"`
}
ComputeWithStatsResponseOK defines model for ComputeWithStatsResponseOK.
type ComputeWithStatsResponseOKJSONResponse ¶
type ComputeWithStatsResponseOKJSONResponse ComputeWithStatsResponseOK
type ComputeWithStatsResponseObject ¶
type ComputeWithStatsResponseObject interface {
VisitComputeWithStatsResponse(w http.ResponseWriter) error
}
type DeleteLocalTrust204Response ¶
type DeleteLocalTrust204Response struct {
}
func (DeleteLocalTrust204Response) VisitDeleteLocalTrustResponse ¶
func (response DeleteLocalTrust204Response) VisitDeleteLocalTrustResponse(w http.ResponseWriter) error
type DeleteLocalTrust400JSONResponse ¶
type DeleteLocalTrust400JSONResponse struct{ InvalidRequestJSONResponse }
func (DeleteLocalTrust400JSONResponse) VisitDeleteLocalTrustResponse ¶
func (response DeleteLocalTrust400JSONResponse) VisitDeleteLocalTrustResponse(w http.ResponseWriter) error
type DeleteLocalTrust404Response ¶
type DeleteLocalTrust404Response struct {
}
func (DeleteLocalTrust404Response) VisitDeleteLocalTrustResponse ¶
func (response DeleteLocalTrust404Response) VisitDeleteLocalTrustResponse(w http.ResponseWriter) error
type DeleteLocalTrustRequestObject ¶
type DeleteLocalTrustRequestObject struct {
Id LocalTrustIdParam `json:"id"`
}
type DeleteLocalTrustResponse ¶
type DeleteLocalTrustResponse struct {
Body []byte
HTTPResponse *http.Response
JSON400 *InvalidRequest
}
func ParseDeleteLocalTrustResponse ¶
func ParseDeleteLocalTrustResponse(rsp *http.Response) (*DeleteLocalTrustResponse, error)
ParseDeleteLocalTrustResponse parses an HTTP response from a DeleteLocalTrustWithResponse call
func (DeleteLocalTrustResponse) Status ¶
func (r DeleteLocalTrustResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteLocalTrustResponse) StatusCode ¶
func (r DeleteLocalTrustResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteLocalTrustResponseObject ¶
type DeleteLocalTrustResponseObject interface {
VisitDeleteLocalTrustResponse(w http.ResponseWriter) error
}
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 FlatTailStats ¶
type FlatTailStats struct {
// DeltaNorm The d value as of the head of the last flat-tail.
// This can be used to fine-tune epsilon
// even when not using flat-tail algorithm.
DeltaNorm float64 `json:"deltaNorm"`
// Length The flat-tail length (say, L, then
// the last L+1 iterations had the same ranking).
// This is the number of iterations that could be saved
// by using flat-tail algorithm
// (passing flatTail equal to the threshold stat below)
// while achieving the same result.
Length int `json:"length"`
// Ranking The sorted ranking of peer indices.
// Peers not found here have zero global trust.
Ranking []int `json:"ranking"`
// Threshold The suggested minimum threshold parameter (flatTail).
// It is determined from false flat tails observed.
// Example: If a ranking pattern ABCDDEEEEFFFFFFFFFF was observed
// (each letter is a distinct ranking) before epsilon was reached,
// both DD and EEEE are false flat tails
// of length 1 and 3 respectively.
// In this case, Threshold=4 is suggested in order to ignore
// these false flat tails.
Threshold int `json:"threshold"`
}
FlatTailStats Flat-tail algorithm stats and peer ranking.
type GetLocalTrust200JSONResponse ¶
type GetLocalTrust200JSONResponse struct {
LocalTrustGetResponseOKJSONResponse
}
func (GetLocalTrust200JSONResponse) VisitGetLocalTrustResponse ¶
func (response GetLocalTrust200JSONResponse) VisitGetLocalTrustResponse(w http.ResponseWriter) error
type GetLocalTrust404Response ¶
type GetLocalTrust404Response struct {
}
func (GetLocalTrust404Response) VisitGetLocalTrustResponse ¶
func (response GetLocalTrust404Response) VisitGetLocalTrustResponse(w http.ResponseWriter) error
type GetLocalTrustRequestObject ¶
type GetLocalTrustRequestObject struct {
Id LocalTrustIdParam `json:"id"`
}
type GetLocalTrustResponse ¶
type GetLocalTrustResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *LocalTrustGetResponseOK
}
func ParseGetLocalTrustResponse ¶
func ParseGetLocalTrustResponse(rsp *http.Response) (*GetLocalTrustResponse, error)
ParseGetLocalTrustResponse parses an HTTP response from a GetLocalTrustWithResponse call
func (GetLocalTrustResponse) Status ¶
func (r GetLocalTrustResponse) Status() string
Status returns HTTPResponse.Status
func (GetLocalTrustResponse) StatusCode ¶
func (r GetLocalTrustResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetLocalTrustResponseObject ¶
type GetLocalTrustResponseObject interface {
VisitGetLocalTrustResponse(w http.ResponseWriter) error
}
type GetStatus200JSONResponse ¶
type GetStatus200JSONResponse struct{ ServerReadyJSONResponse }
func (GetStatus200JSONResponse) VisitGetStatusResponse ¶
func (response GetStatus200JSONResponse) VisitGetStatusResponse(w http.ResponseWriter) error
type GetStatus500JSONResponse ¶
type GetStatus500JSONResponse struct{ ServerNotReadyJSONResponse }
func (GetStatus500JSONResponse) VisitGetStatusResponse ¶
func (response GetStatus500JSONResponse) VisitGetStatusResponse(w http.ResponseWriter) error
type GetStatusRequestObject ¶
type GetStatusRequestObject struct {
}
type GetStatusResponse ¶
type GetStatusResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ServerReady
JSON500 *ServerNotReady
}
func ParseGetStatusResponse ¶
func ParseGetStatusResponse(rsp *http.Response) (*GetStatusResponse, error)
ParseGetStatusResponse parses an HTTP response from a GetStatusWithResponse call
func (GetStatusResponse) Status ¶
func (r GetStatusResponse) Status() string
Status returns HTTPResponse.Status
func (GetStatusResponse) StatusCode ¶
func (r GetStatusResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetStatusResponseObject ¶
type GetStatusResponseObject interface {
VisitGetStatusResponse(w http.ResponseWriter) error
}
type HeadLocalTrust204Response ¶
type HeadLocalTrust204Response struct {
}
func (HeadLocalTrust204Response) VisitHeadLocalTrustResponse ¶
func (response HeadLocalTrust204Response) VisitHeadLocalTrustResponse(w http.ResponseWriter) error
type HeadLocalTrust404Response ¶
type HeadLocalTrust404Response struct {
}
func (HeadLocalTrust404Response) VisitHeadLocalTrustResponse ¶
func (response HeadLocalTrust404Response) VisitHeadLocalTrustResponse(w http.ResponseWriter) error
type HeadLocalTrustRequestObject ¶
type HeadLocalTrustRequestObject struct {
Id LocalTrustIdParam `json:"id"`
}
type HeadLocalTrustResponse ¶
func ParseHeadLocalTrustResponse ¶
func ParseHeadLocalTrustResponse(rsp *http.Response) (*HeadLocalTrustResponse, error)
ParseHeadLocalTrustResponse parses an HTTP response from a HeadLocalTrustWithResponse call
func (HeadLocalTrustResponse) Status ¶
func (r HeadLocalTrustResponse) Status() string
Status returns HTTPResponse.Status
func (HeadLocalTrustResponse) StatusCode ¶
func (r HeadLocalTrustResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HeadLocalTrustResponseObject ¶
type HeadLocalTrustResponseObject interface {
VisitHeadLocalTrustResponse(w http.ResponseWriter) error
}
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type InlineTrustEntry ¶
type InlineTrustEntry struct {
// V Represents the amount of trust bound to the peer/-s
// indicated by the entry's index/-ices.
V float64 `json:"v"`
// contains filtered or unexported fields
}
InlineTrustEntry Represents an entry in the trust collection. Consists of the entry's value (`v`) and the index/indices (position) in the collection.
func (InlineTrustEntry) AsTrustMatrixEntryIndices ¶
func (t InlineTrustEntry) AsTrustMatrixEntryIndices() (TrustMatrixEntryIndices, error)
AsTrustMatrixEntryIndices returns the union data inside the InlineTrustEntry as a TrustMatrixEntryIndices
func (InlineTrustEntry) AsTrustVectorEntryIndex ¶
func (t InlineTrustEntry) AsTrustVectorEntryIndex() (TrustVectorEntryIndex, error)
AsTrustVectorEntryIndex returns the union data inside the InlineTrustEntry as a TrustVectorEntryIndex
func (*InlineTrustEntry) FromTrustMatrixEntryIndices ¶
func (t *InlineTrustEntry) FromTrustMatrixEntryIndices(v TrustMatrixEntryIndices) error
FromTrustMatrixEntryIndices overwrites any union data inside the InlineTrustEntry as the provided TrustMatrixEntryIndices
func (*InlineTrustEntry) FromTrustVectorEntryIndex ¶
func (t *InlineTrustEntry) FromTrustVectorEntryIndex(v TrustVectorEntryIndex) error
FromTrustVectorEntryIndex overwrites any union data inside the InlineTrustEntry as the provided TrustVectorEntryIndex
func (InlineTrustEntry) MarshalJSON ¶
func (t InlineTrustEntry) MarshalJSON() ([]byte, error)
func (*InlineTrustEntry) MergeTrustMatrixEntryIndices ¶
func (t *InlineTrustEntry) MergeTrustMatrixEntryIndices(v TrustMatrixEntryIndices) error
MergeTrustMatrixEntryIndices performs a merge with any union data inside the InlineTrustEntry, using the provided TrustMatrixEntryIndices
func (*InlineTrustEntry) MergeTrustVectorEntryIndex ¶
func (t *InlineTrustEntry) MergeTrustVectorEntryIndex(v TrustVectorEntryIndex) error
MergeTrustVectorEntryIndex performs a merge with any union data inside the InlineTrustEntry, using the provided TrustVectorEntryIndex
func (*InlineTrustEntry) UnmarshalJSON ¶
func (t *InlineTrustEntry) UnmarshalJSON(b []byte) error
type InlineTrustRef ¶
type InlineTrustRef struct {
// Entries Contains the non-zero entries in the trust collection.
Entries []InlineTrustEntry `json:"entries"`
// Size Denotes the number of peers in the trust collection,
// i.e. its dimension.
Size int `json:"size"`
}
InlineTrustRef An inline "reference" to a trust collection.
Instead of pointing (referencing) to an externally stored collection, it carries the contents (individual sparse entries) of the collection within the reference object itself.
func InlineFromMatrix ¶
func InlineFromMatrix( ctx context.Context, m *sparse.Matrix, opts ...spopt.Option, ) (*InlineTrustRef, error)
InlineFromMatrix converts the given square matrix into an inline trust ref.
func InlineFromVector ¶
func InlineFromVector( ctx context.Context, v *sparse.Vector, opts ...spopt.Option, ) (*InlineTrustRef, error)
InlineFromVector converts the given vector into an inline trust ref.
type InvalidRequest ¶
type InvalidRequest struct {
// Message Describes the error in a human-readable message.
//
// It may be empty.
Message string `json:"message"`
}
InvalidRequest defines model for InvalidRequest.
type InvalidRequestJSONResponse ¶
type InvalidRequestJSONResponse InvalidRequest
type LocalTrustGetResponseOK ¶
type LocalTrustGetResponseOK = InlineTrustRef
LocalTrustGetResponseOK An inline "reference" to a trust collection.
Instead of pointing (referencing) to an externally stored collection, it carries the contents (individual sparse entries) of the collection within the reference object itself.
type LocalTrustGetResponseOKJSONResponse ¶
type LocalTrustGetResponseOKJSONResponse InlineTrustRef
type LocalTrustIdParam ¶
type LocalTrustIdParam = StoredTrustId
LocalTrustIdParam An identifier of a stored trust collection (matrix/vector).
It identifies a trust collection within the local server.
type ObjectStorageTrustRef ¶
type ObjectStorageTrustRef struct {
// Url URL of the trust collection file.
//
// It must refer to a CSV file,
// with three columns `i`, `j`, and `v` (for trust matrix)
// or two columns `i` and `v` (for trust vector).
// Currently the `s3://` URL scheme (AWS S3) is supported.
Url string `json:"url"`
}
ObjectStorageTrustRef Refers to a trust collection in a remote object storage service.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type ServerInterface ¶
type ServerInterface interface {
// Compute EigenTrust scores
// (POST /compute)
Compute(ctx echo.Context) error
// Compute EigenTrust scores, with execution statistics
// (POST /compute-with-stats)
ComputeWithStats(ctx echo.Context) error
// Delete local trust
// (DELETE /local-trust/{id})
DeleteLocalTrust(ctx echo.Context, id LocalTrustIdParam) error
// Retrieve local trust
// (GET /local-trust/{id})
GetLocalTrust(ctx echo.Context, id LocalTrustIdParam) error
// Check for existence of local trust
// (HEAD /local-trust/{id})
HeadLocalTrust(ctx echo.Context, id LocalTrustIdParam) error
// Update local trust
// (PUT /local-trust/{id})
UpdateLocalTrust(ctx echo.Context, id LocalTrustIdParam, params UpdateLocalTrustParams) error
// Get the health check status
// (GET /status)
GetStatus(ctx echo.Context) error
}
ServerInterface represents all server handlers.
func NewStrictHandler ¶
func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
}
ServerInterfaceWrapper converts echo contexts to parameters.
func (*ServerInterfaceWrapper) Compute ¶
func (w *ServerInterfaceWrapper) Compute(ctx echo.Context) error
Compute converts echo context to params.
func (*ServerInterfaceWrapper) ComputeWithStats ¶
func (w *ServerInterfaceWrapper) ComputeWithStats(ctx echo.Context) error
ComputeWithStats converts echo context to params.
func (*ServerInterfaceWrapper) DeleteLocalTrust ¶
func (w *ServerInterfaceWrapper) DeleteLocalTrust(ctx echo.Context) error
DeleteLocalTrust converts echo context to params.
func (*ServerInterfaceWrapper) GetLocalTrust ¶
func (w *ServerInterfaceWrapper) GetLocalTrust(ctx echo.Context) error
GetLocalTrust converts echo context to params.
func (*ServerInterfaceWrapper) GetStatus ¶
func (w *ServerInterfaceWrapper) GetStatus(ctx echo.Context) error
GetStatus converts echo context to params.
func (*ServerInterfaceWrapper) HeadLocalTrust ¶
func (w *ServerInterfaceWrapper) HeadLocalTrust(ctx echo.Context) error
HeadLocalTrust converts echo context to params.
func (*ServerInterfaceWrapper) UpdateLocalTrust ¶
func (w *ServerInterfaceWrapper) UpdateLocalTrust(ctx echo.Context) error
UpdateLocalTrust converts echo context to params.
type ServerNotReady ¶
type ServerNotReady = ServerStatus
ServerNotReady defines model for ServerNotReady.
type ServerNotReadyJSONResponse ¶
type ServerNotReadyJSONResponse ServerStatus
type ServerReadyJSONResponse ¶
type ServerReadyJSONResponse ServerStatus
type ServerStatus ¶
type ServerStatus struct {
// Message The server status message.
Message string `json:"message"`
}
ServerStatus defines model for ServerStatus.
type StoredTrustId ¶
type StoredTrustId = string
StoredTrustId An identifier of a stored trust collection (matrix/vector).
It identifies a trust collection within the local server.
type StoredTrustRef ¶
type StoredTrustRef struct {
// Id An identifier of a stored trust collection (matrix/vector).
//
// It identifies a trust collection within the local server.
Id StoredTrustId `json:"id"`
}
StoredTrustRef A trust collection stored on the server and identified with a string.
type StrictHandlerFunc ¶
type StrictHandlerFunc = strictecho.StrictEchoHandlerFunc
type StrictMiddlewareFunc ¶
type StrictMiddlewareFunc = strictecho.StrictEchoMiddlewareFunc
type StrictServerInterface ¶
type StrictServerInterface interface {
// Compute EigenTrust scores
// (POST /compute)
Compute(ctx context.Context, request ComputeRequestObject) (ComputeResponseObject, error)
// Compute EigenTrust scores, with execution statistics
// (POST /compute-with-stats)
ComputeWithStats(ctx context.Context, request ComputeWithStatsRequestObject) (ComputeWithStatsResponseObject, error)
// Delete local trust
// (DELETE /local-trust/{id})
DeleteLocalTrust(ctx context.Context, request DeleteLocalTrustRequestObject) (DeleteLocalTrustResponseObject, error)
// Retrieve local trust
// (GET /local-trust/{id})
GetLocalTrust(ctx context.Context, request GetLocalTrustRequestObject) (GetLocalTrustResponseObject, error)
// Check for existence of local trust
// (HEAD /local-trust/{id})
HeadLocalTrust(ctx context.Context, request HeadLocalTrustRequestObject) (HeadLocalTrustResponseObject, error)
// Update local trust
// (PUT /local-trust/{id})
UpdateLocalTrust(ctx context.Context, request UpdateLocalTrustRequestObject) (UpdateLocalTrustResponseObject, error)
// Get the health check status
// (GET /status)
GetStatus(ctx context.Context, request GetStatusRequestObject) (GetStatusResponseObject, error)
}
StrictServerInterface represents all server handlers.
type TrustMatrixEntryIndices ¶
type TrustMatrixEntryIndices struct {
// I The row index.
I int `json:"i"`
// J The column index.
J int `json:"j"`
}
TrustMatrixEntryIndices Represents the location (indices) of a trust matrix entry.
type TrustRef ¶
type TrustRef struct {
// Scheme Trust reference scheme, akin to URI scheme.
Scheme TrustRefScheme `json:"scheme"`
// contains filtered or unexported fields
}
TrustRef A trust collection (matrix/vector).
Individual entry values in the collection represent trust levels; the index/-ices – that is, the coordinate/-s – of an entry indicate the peer/-s to which the trust level (value) is bound.
The actual nature of this binding between peer/-s and the trust level is up to the context. For example, in a global trust (vector) the entry index denotes the peer to which the trust value is assigned, (the network trusts this peer by the trust level amount; the peer is the "trustee"), while in a column vector of a local trust matrix the entry index denotes the peer from which the inbound trust is originating (the peer is the "truster").
func (TrustRef) AsInlineTrustRef ¶
func (t TrustRef) AsInlineTrustRef() (InlineTrustRef, error)
AsInlineTrustRef returns the union data inside the TrustRef as a InlineTrustRef
func (TrustRef) AsObjectStorageTrustRef ¶
func (t TrustRef) AsObjectStorageTrustRef() (ObjectStorageTrustRef, error)
AsObjectStorageTrustRef returns the union data inside the TrustRef as a ObjectStorageTrustRef
func (TrustRef) AsStoredTrustRef ¶
func (t TrustRef) AsStoredTrustRef() (StoredTrustRef, error)
AsStoredTrustRef returns the union data inside the TrustRef as a StoredTrustRef
func (*TrustRef) FromInlineTrustRef ¶
func (t *TrustRef) FromInlineTrustRef(v InlineTrustRef) error
FromInlineTrustRef overwrites any union data inside the TrustRef as the provided InlineTrustRef
func (*TrustRef) FromObjectStorageTrustRef ¶
func (t *TrustRef) FromObjectStorageTrustRef(v ObjectStorageTrustRef) error
FromObjectStorageTrustRef overwrites any union data inside the TrustRef as the provided ObjectStorageTrustRef
func (*TrustRef) FromStoredTrustRef ¶
func (t *TrustRef) FromStoredTrustRef(v StoredTrustRef) error
FromStoredTrustRef overwrites any union data inside the TrustRef as the provided StoredTrustRef
func (TrustRef) MarshalJSON ¶
func (*TrustRef) MergeInlineTrustRef ¶
func (t *TrustRef) MergeInlineTrustRef(v InlineTrustRef) error
MergeInlineTrustRef performs a merge with any union data inside the TrustRef, using the provided InlineTrustRef
func (*TrustRef) MergeObjectStorageTrustRef ¶
func (t *TrustRef) MergeObjectStorageTrustRef(v ObjectStorageTrustRef) error
MergeObjectStorageTrustRef performs a merge with any union data inside the TrustRef, using the provided ObjectStorageTrustRef
func (*TrustRef) MergeStoredTrustRef ¶
func (t *TrustRef) MergeStoredTrustRef(v StoredTrustRef) error
MergeStoredTrustRef performs a merge with any union data inside the TrustRef, using the provided StoredTrustRef
func (*TrustRef) UnmarshalJSON ¶
type TrustRefScheme ¶
type TrustRefScheme string
TrustRefScheme Trust reference scheme, akin to URI scheme.
const ( Inline TrustRefScheme = "inline" Objectstorage TrustRefScheme = "objectstorage" Stored TrustRefScheme = "stored" )
Defines values for TrustRefScheme.
type TrustVectorEntryIndex ¶
type TrustVectorEntryIndex struct {
// I The index.
I int `json:"i"`
}
TrustVectorEntryIndex Represents the location (index) of a trust vector entry.
type UpdateLocalTrust200Response ¶
type UpdateLocalTrust200Response struct {
}
func (UpdateLocalTrust200Response) VisitUpdateLocalTrustResponse ¶
func (response UpdateLocalTrust200Response) VisitUpdateLocalTrustResponse(w http.ResponseWriter) error
type UpdateLocalTrust201Response ¶
type UpdateLocalTrust201Response struct {
}
func (UpdateLocalTrust201Response) VisitUpdateLocalTrustResponse ¶
func (response UpdateLocalTrust201Response) VisitUpdateLocalTrustResponse(w http.ResponseWriter) error
type UpdateLocalTrust400JSONResponse ¶
type UpdateLocalTrust400JSONResponse struct{ InvalidRequestJSONResponse }
func (UpdateLocalTrust400JSONResponse) VisitUpdateLocalTrustResponse ¶
func (response UpdateLocalTrust400JSONResponse) VisitUpdateLocalTrustResponse(w http.ResponseWriter) error
type UpdateLocalTrustJSONRequestBody ¶
type UpdateLocalTrustJSONRequestBody = TrustRef
UpdateLocalTrustJSONRequestBody defines body for UpdateLocalTrust for application/json ContentType.
type UpdateLocalTrustParams ¶
type UpdateLocalTrustParams struct {
// Merge Controls behavior if a local trust exists under the same ID.
//
// If false (default), the local trust ref contents replaces
// the existing one under the same ID, if any.
// If true, the local trust ref contents are merged
// into the existing one under the same ID.
Merge *bool `form:"merge,omitempty" json:"merge,omitempty"`
}
UpdateLocalTrustParams defines parameters for UpdateLocalTrust.
type UpdateLocalTrustRequestObject ¶
type UpdateLocalTrustRequestObject struct {
Id LocalTrustIdParam `json:"id"`
Params UpdateLocalTrustParams
Body *UpdateLocalTrustJSONRequestBody
}
type UpdateLocalTrustResponse ¶
type UpdateLocalTrustResponse struct {
Body []byte
HTTPResponse *http.Response
JSON400 *InvalidRequest
}
func ParseUpdateLocalTrustResponse ¶
func ParseUpdateLocalTrustResponse(rsp *http.Response) (*UpdateLocalTrustResponse, error)
ParseUpdateLocalTrustResponse parses an HTTP response from a UpdateLocalTrustWithResponse call
func (UpdateLocalTrustResponse) Status ¶
func (r UpdateLocalTrustResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateLocalTrustResponse) StatusCode ¶
func (r UpdateLocalTrustResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpdateLocalTrustResponseObject ¶
type UpdateLocalTrustResponseObject interface {
VisitUpdateLocalTrustResponse(w http.ResponseWriter) error
}