Documentation ¶
Overview ¶
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen/v2 version v2.1.0 DO NOT EDIT.
Index ¶
- func GetSwagger() (swagger *openapi3.T, err error)
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
- func NewGetProcessingActivityRequest(server string, id string) (*http.Request, error)
- func NewListProcessingActivitiesRequest(server string) (*http.Request, error)
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- type ChiServerOptions
- type Client
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) GetProcessingActivityWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetProcessingActivityResponse, error)
- func (c *ClientWithResponses) ListProcessingActivitiesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListProcessingActivitiesResponse, error)
- type ClientWithResponsesInterface
- type GetProcessingActivity200JSONResponse
- type GetProcessingActivity200ResponseHeaders
- type GetProcessingActivity404Response
- type GetProcessingActivity404ResponseHeaders
- type GetProcessingActivityRequestObject
- type GetProcessingActivityResponse
- type GetProcessingActivityResponseObject
- type HttpRequestDoer
- type InvalidParamFormatError
- type LegalBasis
- type ListProcessingActivities200JSONResponse
- type ListProcessingActivities200ResponseHeaders
- type ListProcessingActivitiesRequestObject
- type ListProcessingActivitiesResponse
- type ListProcessingActivitiesResponseObject
- type MiddlewareFunc
- type ProcessingActivityItem
- type RequestEditorFn
- type RequiredHeaderError
- type RequiredParamError
- type ServerInterface
- type ServerInterfaceWrapper
- type StrictHTTPServerOptions
- type StrictHandlerFunc
- type StrictMiddlewareFunc
- type StrictServerInterface
- type TooManyValuesForParamError
- type UnescapedCookieParamError
- type Unimplemented
- type UnmarshalingParamError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 Handler ¶
func Handler(si ServerInterface) http.Handler
Handler creates http.Handler with routing matching OpenAPI spec.
func HandlerFromMux ¶
func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
func HandlerFromMuxWithBaseURL ¶
func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler
func HandlerWithOptions ¶
func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
HandlerWithOptions creates http.Handler with additional options
func NewGetProcessingActivityRequest ¶
NewGetProcessingActivityRequest generates requests for GetProcessingActivity
func NewListProcessingActivitiesRequest ¶
NewListProcessingActivitiesRequest generates requests for ListProcessingActivities
Types ¶
type ChiServerOptions ¶
type ChiServerOptions struct { BaseURL string BaseRouter chi.Router Middlewares []MiddlewareFunc ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error) }
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) GetProcessingActivity ¶
func (*Client) ListProcessingActivities ¶
type ClientInterface ¶
type ClientInterface interface { // ListProcessingActivities request ListProcessingActivities(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) // GetProcessingActivity request GetProcessingActivity(ctx context.Context, id string, 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) GetProcessingActivityWithResponse ¶
func (c *ClientWithResponses) GetProcessingActivityWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetProcessingActivityResponse, error)
GetProcessingActivityWithResponse request returning *GetProcessingActivityResponse
func (*ClientWithResponses) ListProcessingActivitiesWithResponse ¶
func (c *ClientWithResponses) ListProcessingActivitiesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListProcessingActivitiesResponse, error)
ListProcessingActivitiesWithResponse request returning *ListProcessingActivitiesResponse
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // ListProcessingActivitiesWithResponse request ListProcessingActivitiesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListProcessingActivitiesResponse, error) // GetProcessingActivityWithResponse request GetProcessingActivityWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetProcessingActivityResponse, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type GetProcessingActivity200JSONResponse ¶
type GetProcessingActivity200JSONResponse struct { Body ProcessingActivityItem Headers GetProcessingActivity200ResponseHeaders }
func (GetProcessingActivity200JSONResponse) VisitGetProcessingActivityResponse ¶
func (response GetProcessingActivity200JSONResponse) VisitGetProcessingActivityResponse(w http.ResponseWriter) error
type GetProcessingActivity200ResponseHeaders ¶
type GetProcessingActivity200ResponseHeaders struct {
APIVersion string
}
type GetProcessingActivity404Response ¶
type GetProcessingActivity404Response struct {
Headers GetProcessingActivity404ResponseHeaders
}
func (GetProcessingActivity404Response) VisitGetProcessingActivityResponse ¶
func (response GetProcessingActivity404Response) VisitGetProcessingActivityResponse(w http.ResponseWriter) error
type GetProcessingActivity404ResponseHeaders ¶
type GetProcessingActivity404ResponseHeaders struct {
APIVersion string
}
type GetProcessingActivityRequestObject ¶
type GetProcessingActivityRequestObject struct {
Id string `json:"id"`
}
type GetProcessingActivityResponse ¶
type GetProcessingActivityResponse struct { Body []byte HTTPResponse *http.Response JSON200 *ProcessingActivityItem }
func ParseGetProcessingActivityResponse ¶
func ParseGetProcessingActivityResponse(rsp *http.Response) (*GetProcessingActivityResponse, error)
ParseGetProcessingActivityResponse parses an HTTP response from a GetProcessingActivityWithResponse call
func (GetProcessingActivityResponse) Status ¶
func (r GetProcessingActivityResponse) Status() string
Status returns HTTPResponse.Status
func (GetProcessingActivityResponse) StatusCode ¶
func (r GetProcessingActivityResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetProcessingActivityResponseObject ¶
type GetProcessingActivityResponseObject interface {
VisitGetProcessingActivityResponse(w http.ResponseWriter) error
}
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type LegalBasis ¶
type LegalBasis string
LegalBasis As defined in the GDPR, article 6, section 1
const ( CONSENT LegalBasis = "CONSENT" LEGALOBLIGATION LegalBasis = "LEGAL_OBLIGATION" LEGITIMATEINTERESTS LegalBasis = "LEGITIMATE_INTERESTS" PERFORMANCEOFCONTRACT LegalBasis = "PERFORMANCE_OF_CONTRACT" PUBLICINTEREST LegalBasis = "PUBLIC_INTEREST" VITALINTERESTS LegalBasis = "VITAL_INTERESTS" )
Defines values for LegalBasis.
type ListProcessingActivities200JSONResponse ¶
type ListProcessingActivities200JSONResponse struct { Body []ProcessingActivityItem Headers ListProcessingActivities200ResponseHeaders }
func (ListProcessingActivities200JSONResponse) VisitListProcessingActivitiesResponse ¶
func (response ListProcessingActivities200JSONResponse) VisitListProcessingActivitiesResponse(w http.ResponseWriter) error
type ListProcessingActivitiesRequestObject ¶
type ListProcessingActivitiesRequestObject struct { }
type ListProcessingActivitiesResponse ¶
type ListProcessingActivitiesResponse struct { Body []byte HTTPResponse *http.Response JSON200 *[]ProcessingActivityItem }
func ParseListProcessingActivitiesResponse ¶
func ParseListProcessingActivitiesResponse(rsp *http.Response) (*ListProcessingActivitiesResponse, error)
ParseListProcessingActivitiesResponse parses an HTTP response from a ListProcessingActivitiesWithResponse call
func (ListProcessingActivitiesResponse) Status ¶
func (r ListProcessingActivitiesResponse) Status() string
Status returns HTTPResponse.Status
func (ListProcessingActivitiesResponse) StatusCode ¶
func (r ListProcessingActivitiesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListProcessingActivitiesResponseObject ¶
type ListProcessingActivitiesResponseObject interface {
VisitListProcessingActivitiesResponse(w http.ResponseWriter) error
}
type ProcessingActivityItem ¶
type ProcessingActivityItem struct { Controller *string `json:"controller,omitempty"` DataSubjectCategories *[]string `json:"data_subject_categories,omitempty"` EnvisagedTimeLimit *string `json:"envisaged_time_limit,omitempty"` EnvisagedTimeLimitDuration *string `json:"envisaged_time_limit_duration,omitempty"` Id *string `json:"id,omitempty"` // LegalBasis As defined in the GDPR, article 6, section 1 LegalBasis *LegalBasis `json:"legal_basis,omitempty"` LegalBasisComment *string `json:"legal_basis_comment,omitempty"` Name *string `json:"name,omitempty"` PersonalDataCategories *[]string `json:"personal_data_categories,omitempty"` Purpose *string `json:"purpose,omitempty"` RecipientsCategories *[]string `json:"recipients_categories,omitempty"` Uri *string `json:"uri,omitempty"` }
ProcessingActivityItem defines model for ProcessingActivityItem.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type RequiredHeaderError ¶
func (*RequiredHeaderError) Error ¶
func (e *RequiredHeaderError) Error() string
func (*RequiredHeaderError) Unwrap ¶
func (e *RequiredHeaderError) Unwrap() error
type RequiredParamError ¶
type RequiredParamError struct {
ParamName string
}
func (*RequiredParamError) Error ¶
func (e *RequiredParamError) Error() string
type ServerInterface ¶
type ServerInterface interface { // Get all processing activities // (GET /processing_activities) ListProcessingActivities(w http.ResponseWriter, r *http.Request) // Get a processing activity // (GET /processing_activities/{id}) GetProcessingActivity(w http.ResponseWriter, r *http.Request, id string) }
ServerInterface represents all server handlers.
func NewStrictHandler ¶
func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface
func NewStrictHandlerWithOptions ¶
func NewStrictHandlerWithOptions(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc, options StrictHTTPServerOptions) ServerInterface
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct { Handler ServerInterface HandlerMiddlewares []MiddlewareFunc ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error) }
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) GetProcessingActivity ¶
func (siw *ServerInterfaceWrapper) GetProcessingActivity(w http.ResponseWriter, r *http.Request)
GetProcessingActivity operation middleware
func (*ServerInterfaceWrapper) ListProcessingActivities ¶
func (siw *ServerInterfaceWrapper) ListProcessingActivities(w http.ResponseWriter, r *http.Request)
ListProcessingActivities operation middleware
type StrictHTTPServerOptions ¶
type StrictHTTPServerOptions struct { RequestErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error) ResponseErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error) }
type StrictHandlerFunc ¶
type StrictHandlerFunc = strictnethttp.StrictHTTPHandlerFunc
type StrictMiddlewareFunc ¶
type StrictMiddlewareFunc = strictnethttp.StrictHTTPMiddlewareFunc
type StrictServerInterface ¶
type StrictServerInterface interface { // Get all processing activities // (GET /processing_activities) ListProcessingActivities(ctx context.Context, request ListProcessingActivitiesRequestObject) (ListProcessingActivitiesResponseObject, error) // Get a processing activity // (GET /processing_activities/{id}) GetProcessingActivity(ctx context.Context, request GetProcessingActivityRequestObject) (GetProcessingActivityResponseObject, error) }
StrictServerInterface represents all server handlers.
type TooManyValuesForParamError ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
type UnescapedCookieParamError ¶
func (*UnescapedCookieParamError) Error ¶
func (e *UnescapedCookieParamError) Error() string
func (*UnescapedCookieParamError) Unwrap ¶
func (e *UnescapedCookieParamError) Unwrap() error
type Unimplemented ¶
type Unimplemented struct{}
func (Unimplemented) GetProcessingActivity ¶
func (_ Unimplemented) GetProcessingActivity(w http.ResponseWriter, r *http.Request, id string)
Get a processing activity (GET /processing_activities/{id})
func (Unimplemented) ListProcessingActivities ¶
func (_ Unimplemented) ListProcessingActivities(w http.ResponseWriter, r *http.Request)
Get all processing activities (GET /processing_activities)
type UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error