{"modulePath":"github.com/ascendsoftware/oapi-codegen","version":"v1.0.12","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package server\n\nPackage server provides primitives to interact with the openapi HTTP API.\n\nCode generated by github.com/ascendsoftware/oapi-codegen version (devel) DO NOT EDIT.\n\n## Functions\n\n```go\nfunc Handler(si ServerInterface) http.Handler\n```\nHandler creates http.Handler with routing matching OpenAPI spec.\n\n```go\nfunc HandlerFromMux(si ServerInterface, r chi.Router) http.Handler\n```\nHandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.\n\n```go\nfunc HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler\n```\n\n```go\nfunc HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler\n```\nHandlerWithOptions creates http.Handler with additional options\n\n## Types\n\n```go\ntype Argument = string\n```\nArgument defines model for argument.\n\n```go\ntype ChiServerOptions struct {\n\tBaseURL          string\n\tBaseRouter       chi.Router\n\tMiddlewares      []MiddlewareFunc\n\tErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)\n}\n```\n\n```go\ntype CreateResource2JSONRequestBody = Resource\n```\nCreateResource2JSONRequestBody defines body for CreateResource2 for application/json ContentType.\n\n```go\ntype CreateResource2Params struct {\n\t// InlineQueryArgument Some query argument\n\tInlineQueryArgument *int `form:\"inline_query_argument,omitempty\" json:\"inline_query_argument,omitempty\"`\n}\n```\nCreateResource2Params defines parameters for CreateResource2.\n\n```go\ntype CreateResourceJSONRequestBody = EveryTypeRequired\n```\nCreateResourceJSONRequestBody defines body for CreateResource for application/json ContentType.\n\n```go\ntype EveryTypeOptional struct {\n\tArrayInlineField     *[]int              `json:\"array_inline_field,omitempty\"`\n\tArrayReferencedField *[]SomeObject       `json:\"array_referenced_field,omitempty\"`\n\tBoolField            *bool               `json:\"bool_field,omitempty\"`\n\tByteField            *[]byte             `json:\"byte_field,omitempty\"`\n\tDateField            *openapi_types.Date `json:\"date_field,omitempty\"`\n\tDateTimeField        *time.Time          `json:\"date_time_field,omitempty\"`\n\tDoubleField          *float64            `json:\"double_field,omitempty\"`\n\tFloatField           *float32            `json:\"float_field,omitempty\"`\n\tInlineObjectField    *struct {\n\t\tName   string `json:\"name\"`\n\t\tNumber int    `json:\"number\"`\n\t} `json:\"inline_object_field,omitempty\"`\n\tInt32Field      *int32      `json:\"int32_field,omitempty\"`\n\tInt64Field      *int64      `json:\"int64_field,omitempty\"`\n\tIntField        *int        `json:\"int_field,omitempty\"`\n\tNumberField     *float32    `json:\"number_field,omitempty\"`\n\tReferencedField *SomeObject `json:\"referenced_field,omitempty\"`\n\tStringField     *string     `json:\"string_field,omitempty\"`\n}\n```\nEveryTypeOptional defines model for EveryTypeOptional.\n\n```go\ntype EveryTypeRequired struct {\n\tArrayInlineField     []int                `json:\"array_inline_field\"`\n\tArrayReferencedField []SomeObject         `json:\"array_referenced_field\"`\n\tBoolField            bool                 `json:\"bool_field\"`\n\tByteField            []byte               `json:\"byte_field\"`\n\tDateField            openapi_types.Date   `json:\"date_field\"`\n\tDateTimeField        time.Time            `json:\"date_time_field\"`\n\tDoubleField          float64              `json:\"double_field\"`\n\tEmailField           *openapi_types.Email `json:\"email_field,omitempty\"`\n\tFloatField           float32              `json:\"float_field\"`\n\tInlineObjectField    struct {\n\t\tName   string `json:\"name\"`\n\t\tNumber int    `json:\"number\"`\n\t} `json:\"inline_object_field\"`\n\tInt32Field      int32      `json:\"int32_field\"`\n\tInt64Field      int64      `json:\"int64_field\"`\n\tIntField        int        `json:\"int_field\"`\n\tNumberField     float32    `json:\"number_field\"`\n\tReferencedField SomeObject `json:\"referenced_field\"`\n\tStringField     string     `json:\"string_field\"`\n}\n```\nEveryTypeRequired defines model for EveryTypeRequired.\n\n```go\ntype GetWithArgsParams struct {\n\t// OptionalArgument An optional query argument\n\tOptionalArgument *int64 `form:\"optional_argument,omitempty\" json:\"optional_argument,omitempty\"`\n\n\t// RequiredArgument An optional query argument\n\tRequiredArgument int64 `form:\"required_argument\" json:\"required_argument\"`\n\n\t// HeaderArgument An optional query argument\n\tHeaderArgument *int32 `json:\"header_argument,omitempty\"`\n}\n```\nGetWithArgsParams defines parameters for GetWithArgs.\n\n```go\ntype GetWithContentTypeParamsContentType string\n```\nGetWithContentTypeParamsContentType defines parameters for GetWithContentType.\n\n```go\nconst (\n\tJson GetWithContentTypeParamsContentType = \"json\"\n\tText GetWithContentTypeParamsContentType = \"text\"\n)\n```\nDefines values for GetWithContentTypeParamsContentType.\n\n```go\ntype InvalidParamFormatError struct {\n\tParamName string\n\tErr       error\n}\n```\n\n```go\nfunc (e *InvalidParamFormatError) Error() string\n```\n\n```go\nfunc (e *InvalidParamFormatError) Unwrap() error\n```\n\n```go\ntype MiddlewareFunc func(http.Handler) http.Handler\n```\n\n```go\ntype RequiredHeaderError struct {\n\tParamName string\n\tErr       error\n}\n```\n\n```go\nfunc (e *RequiredHeaderError) Error() string\n```\n\n```go\nfunc (e *RequiredHeaderError) Unwrap() error\n```\n\n```go\ntype RequiredParamError struct {\n\tParamName string\n}\n```\n\n```go\nfunc (e *RequiredParamError) Error() string\n```\n\n```go\ntype ReservedKeyword struct {\n\tChannel *string `json:\"channel,omitempty\"`\n}\n```\nReservedKeyword defines model for ReservedKeyword.\n\n```go\ntype Resource struct {\n\tName  string  `json:\"name\"`\n\tValue float32 `json:\"value\"`\n}\n```\nResource defines model for Resource.\n\n```go\ntype ResponseWithReference = SomeObject\n```\nResponseWithReference defines model for ResponseWithReference.\n\n```go\ntype ServerInterface interface {\n\t// get every type optional\n\t// (GET /every-type-optional)\n\tGetEveryTypeOptional(w http.ResponseWriter, r *http.Request)\n\t// Get resource via simple path\n\t// (GET /get-simple)\n\tGetSimple(w http.ResponseWriter, r *http.Request)\n\t// Getter with referenced parameter and referenced response\n\t// (GET /get-with-args)\n\tGetWithArgs(w http.ResponseWriter, r *http.Request, params GetWithArgsParams)\n\t// Getter with referenced parameter and referenced response\n\t// (GET /get-with-references/{global_argument}/{argument})\n\tGetWithReferences(w http.ResponseWriter, r *http.Request, globalArgument int64, argument Argument)\n\t// Get an object by ID\n\t// (GET /get-with-type/{content_type})\n\tGetWithContentType(w http.ResponseWriter, r *http.Request, contentType GetWithContentTypeParamsContentType)\n\t// get with reserved keyword\n\t// (GET /reserved-keyword)\n\tGetReservedKeyword(w http.ResponseWriter, r *http.Request)\n\t// Create a resource\n\t// (POST /resource/{argument})\n\tCreateResource(w http.ResponseWriter, r *http.Request, argument Argument)\n\t// Create a resource with inline parameter\n\t// (POST /resource2/{inline_argument})\n\tCreateResource2(w http.ResponseWriter, r *http.Request, inlineArgument int, params CreateResource2Params)\n\t// Update a resource with inline body. The parameter name is a reserved\n\t// keyword, so make sure that gets prefixed to avoid syntax errors\n\t// (PUT /resource3/{fallthrough})\n\tUpdateResource3(w http.ResponseWriter, r *http.Request, pFallthrough int)\n\t// get response with reference\n\t// (GET /response-with-reference)\n\tGetResponseWithReference(w http.ResponseWriter, r *http.Request)\n}\n```\nServerInterface represents all server handlers.\n\n```go\ntype ServerInterfaceMock struct {\n\t// CreateResourceFunc mocks the CreateResource method.\n\tCreateResourceFunc func(w http.ResponseWriter, r *http.Request, argument string)\n\n\t// CreateResource2Func mocks the CreateResource2 method.\n\tCreateResource2Func func(w http.ResponseWriter, r *http.Request, inlineArgument int, params CreateResource2Params)\n\n\t// GetEveryTypeOptionalFunc mocks the GetEveryTypeOptional method.\n\tGetEveryTypeOptionalFunc func(w http.ResponseWriter, r *http.Request)\n\n\t// GetReservedKeywordFunc mocks the GetReservedKeyword method.\n\tGetReservedKeywordFunc func(w http.ResponseWriter, r *http.Request)\n\n\t// GetResponseWithReferenceFunc mocks the GetResponseWithReference method.\n\tGetResponseWithReferenceFunc func(w http.ResponseWriter, r *http.Request)\n\n\t// GetSimpleFunc mocks the GetSimple method.\n\tGetSimpleFunc func(w http.ResponseWriter, r *http.Request)\n\n\t// GetWithArgsFunc mocks the GetWithArgs method.\n\tGetWithArgsFunc func(w http.ResponseWriter, r *http.Request, params GetWithArgsParams)\n\n\t// GetWithContentTypeFunc mocks the GetWithContentType method.\n\tGetWithContentTypeFunc func(w http.ResponseWriter, r *http.Request, contentType GetWithContentTypeParamsContentType)\n\n\t// GetWithReferencesFunc mocks the GetWithReferences method.\n\tGetWithReferencesFunc func(w http.ResponseWriter, r *http.Request, globalArgument int64, argument string)\n\n\t// UpdateResource3Func mocks the UpdateResource3 method.\n\tUpdateResource3Func func(w http.ResponseWriter, r *http.Request, pFallthrough int)\n\t// contains filtered or unexported fields\n}\n```\nServerInterfaceMock is a mock implementation of ServerInterface.\n\n\tfunc TestSomethingThatUsesServerInterface(t *testing.T) {\n\n\t\t// make and configure a mocked ServerInterface\n\t\tmockedServerInterface := \u0026ServerInterfaceMock{\n\t\t\tCreateResourceFunc: func(w http.ResponseWriter, r *http.Request, argument string)  {\n\t\t\t\tpanic(\"mock out the CreateResource method\")\n\t\t\t},\n\t\t\tCreateResource2Func: func(w http.ResponseWriter, r *http.Request, inlineArgument int, params CreateResource2Params)  {\n\t\t\t\tpanic(\"mock out the CreateResource2 method\")\n\t\t\t},\n\t\t\tGetEveryTypeOptionalFunc: func(w http.ResponseWriter, r *http.Request)  {\n\t\t\t\tpanic(\"mock out the GetEveryTypeOptional method\")\n\t\t\t},\n\t\t\tGetReservedKeywordFunc: func(w http.ResponseWriter, r *http.Request)  {\n\t\t\t\tpanic(\"mock out the GetReservedKeyword method\")\n\t\t\t},\n\t\t\tGetResponseWithReferenceFunc: func(w http.ResponseWriter, r *http.Request)  {\n\t\t\t\tpanic(\"mock out the GetResponseWithReference method\")\n\t\t\t},\n\t\t\tGetSimpleFunc: func(w http.ResponseWriter, r *http.Request)  {\n\t\t\t\tpanic(\"mock out the GetSimple method\")\n\t\t\t},\n\t\t\tGetWithArgsFunc: func(w http.ResponseWriter, r *http.Request, params GetWithArgsParams)  {\n\t\t\t\tpanic(\"mock out the GetWithArgs method\")\n\t\t\t},\n\t\t\tGetWithContentTypeFunc: func(w http.ResponseWriter, r *http.Request, contentType GetWithContentTypeParamsContentType)  {\n\t\t\t\tpanic(\"mock out the GetWithContentType method\")\n\t\t\t},\n\t\t\tGetWithReferencesFunc: func(w http.ResponseWriter, r *http.Request, globalArgument int64, argument string)  {\n\t\t\t\tpanic(\"mock out the GetWithReferences method\")\n\t\t\t},\n\t\t\tUpdateResource3Func: func(w http.ResponseWriter, r *http.Request, pFallthrough int)  {\n\t\t\t\tpanic(\"mock out the UpdateResource3 method\")\n\t\t\t},\n\t\t}\n\n\t\t// use mockedServerInterface in code that requires ServerInterface\n\t\t// and then make assertions.\n\n\t}\n\n```go\nfunc (mock *ServerInterfaceMock) CreateResource(w http.ResponseWriter, r *http.Request, argument string)\n```\nCreateResource calls CreateResourceFunc.\n\n```go\nfunc (mock *ServerInterfaceMock) CreateResource2(w http.ResponseWriter, r *http.Request, inlineArgument int, params CreateResource2Params)\n```\nCreateResource2 calls CreateResource2Func.\n\n```go\nfunc (mock *ServerInterfaceMock) CreateResource2Calls() []struct {\n\tW              http.ResponseWriter\n\tR              *http.Request\n\tInlineArgument int\n\tParams         CreateResource2Params\n}\n```\nCreateResource2Calls gets all the calls that were made to CreateResource2. Check the length with:\n\n\tlen(mockedServerInterface.CreateResource2Calls())\n\n```go\nfunc (mock *ServerInterfaceMock) CreateResourceCalls() []struct {\n\tW        http.ResponseWriter\n\tR        *http.Request\n\tArgument string\n}\n```\nCreateResourceCalls gets all the calls that were made to CreateResource. Check the length with:\n\n\tlen(mockedServerInterface.CreateResourceCalls())\n\n```go\nfunc (mock *ServerInterfaceMock) GetEveryTypeOptional(w http.ResponseWriter, r *http.Request)\n```\nGetEveryTypeOptional calls GetEveryTypeOptionalFunc.\n\n```go\nfunc (mock *ServerInterfaceMock) GetEveryTypeOptionalCalls() []struct {\n\tW http.ResponseWriter\n\tR *http.Request\n}\n```\nGetEveryTypeOptionalCalls gets all the calls that were made to GetEveryTypeOptional. Check the length with:\n\n\tlen(mockedServerInterface.GetEveryTypeOptionalCalls())\n\n```go\nfunc (mock *ServerInterfaceMock) GetReservedKeyword(w http.ResponseWriter, r *http.Request)\n```\nGetReservedKeyword calls GetReservedKeywordFunc.\n\n```go\nfunc (mock *ServerInterfaceMock) GetReservedKeywordCalls() []struct {\n\tW http.ResponseWriter\n\tR *http.Request\n}\n```\nGetReservedKeywordCalls gets all the calls that were made to GetReservedKeyword. Check the length with:\n\n\tlen(mockedServerInterface.GetReservedKeywordCalls())\n\n```go\nfunc (mock *ServerInterfaceMock) GetResponseWithReference(w http.ResponseWriter, r *http.Request)\n```\nGetResponseWithReference calls GetResponseWithReferenceFunc.\n\n```go\nfunc (mock *ServerInterfaceMock) GetResponseWithReferenceCalls() []struct {\n\tW http.ResponseWriter\n\tR *http.Request\n}\n```\nGetResponseWithReferenceCalls gets all the calls that were made to GetResponseWithReference. Check the length with:\n\n\tlen(mockedServerInterface.GetResponseWithReferenceCalls())\n\n```go\nfunc (mock *ServerInterfaceMock) GetSimple(w http.ResponseWriter, r *http.Request)\n```\nGetSimple calls GetSimpleFunc.\n\n```go\nfunc (mock *ServerInterfaceMock) GetSimpleCalls() []struct {\n\tW http.ResponseWriter\n\tR *http.Request\n}\n```\nGetSimpleCalls gets all the calls that were made to GetSimple. Check the length with:\n\n\tlen(mockedServerInterface.GetSimpleCalls())\n\n```go\nfunc (mock *ServerInterfaceMock) GetWithArgs(w http.ResponseWriter, r *http.Request, params GetWithArgsParams)\n```\nGetWithArgs calls GetWithArgsFunc.\n\n```go\nfunc (mock *ServerInterfaceMock) GetWithArgsCalls() []struct {\n\tW      http.ResponseWriter\n\tR      *http.Request\n\tParams GetWithArgsParams\n}\n```\nGetWithArgsCalls gets all the calls that were made to GetWithArgs. Check the length with:\n\n\tlen(mockedServerInterface.GetWithArgsCalls())\n\n```go\nfunc (mock *ServerInterfaceMock) GetWithContentType(w http.ResponseWriter, r *http.Request, contentType GetWithContentTypeParamsContentType)\n```\nGetWithContentType calls GetWithContentTypeFunc.\n\n```go\nfunc (mock *ServerInterfaceMock) GetWithContentTypeCalls() []struct {\n\tW           http.ResponseWriter\n\tR           *http.Request\n\tContentType GetWithContentTypeParamsContentType\n}\n```\nGetWithContentTypeCalls gets all the calls that were made to GetWithContentType. Check the length with:\n\n\tlen(mockedServerInterface.GetWithContentTypeCalls())\n\n```go\nfunc (mock *ServerInterfaceMock) GetWithReferences(w http.ResponseWriter, r *http.Request, globalArgument int64, argument string)\n```\nGetWithReferences calls GetWithReferencesFunc.\n\n```go\nfunc (mock *ServerInterfaceMock) GetWithReferencesCalls() []struct {\n\tW              http.ResponseWriter\n\tR              *http.Request\n\tGlobalArgument int64\n\tArgument       string\n}\n```\nGetWithReferencesCalls gets all the calls that were made to GetWithReferences. Check the length with:\n\n\tlen(mockedServerInterface.GetWithReferencesCalls())\n\n```go\nfunc (mock *ServerInterfaceMock) UpdateResource3(w http.ResponseWriter, r *http.Request, pFallthrough int)\n```\nUpdateResource3 calls UpdateResource3Func.\n\n```go\nfunc (mock *ServerInterfaceMock) UpdateResource3Calls() []struct {\n\tW            http.ResponseWriter\n\tR            *http.Request\n\tPFallthrough int\n}\n```\nUpdateResource3Calls gets all the calls that were made to UpdateResource3. Check the length with:\n\n\tlen(mockedServerInterface.UpdateResource3Calls())\n\n```go\ntype ServerInterfaceWrapper struct {\n\tHandler            ServerInterface\n\tHandlerMiddlewares []MiddlewareFunc\n\tErrorHandlerFunc   func(w http.ResponseWriter, r *http.Request, err error)\n}\n```\nServerInterfaceWrapper converts contexts to parameters.\n\n```go\nfunc (siw *ServerInterfaceWrapper) CreateResource(w http.ResponseWriter, r *http.Request)\n```\nCreateResource operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) CreateResource2(w http.ResponseWriter, r *http.Request)\n```\nCreateResource2 operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) GetEveryTypeOptional(w http.ResponseWriter, r *http.Request)\n```\nGetEveryTypeOptional operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) GetReservedKeyword(w http.ResponseWriter, r *http.Request)\n```\nGetReservedKeyword operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) GetResponseWithReference(w http.ResponseWriter, r *http.Request)\n```\nGetResponseWithReference operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) GetSimple(w http.ResponseWriter, r *http.Request)\n```\nGetSimple operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) GetWithArgs(w http.ResponseWriter, r *http.Request)\n```\nGetWithArgs operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) GetWithContentType(w http.ResponseWriter, r *http.Request)\n```\nGetWithContentType operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) GetWithReferences(w http.ResponseWriter, r *http.Request)\n```\nGetWithReferences operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) UpdateResource3(w http.ResponseWriter, r *http.Request)\n```\nUpdateResource3 operation middleware\n\n```go\ntype SimpleResponse struct {\n\tName string `json:\"name\"`\n}\n```\nSimpleResponse defines model for SimpleResponse.\n\n```go\ntype SomeObject struct {\n\tName string `json:\"name\"`\n}\n```\nSomeObject defines model for some\\_object.\n\n```go\ntype TooManyValuesForParamError struct {\n\tParamName string\n\tCount     int\n}\n```\n\n```go\nfunc (e *TooManyValuesForParamError) Error() string\n```\n\n```go\ntype UnescapedCookieParamError struct {\n\tParamName string\n\tErr       error\n}\n```\n\n```go\nfunc (e *UnescapedCookieParamError) Error() string\n```\n\n```go\nfunc (e *UnescapedCookieParamError) Unwrap() error\n```\n\n```go\ntype Unimplemented struct{}\n```\n\n```go\nfunc (_ Unimplemented) CreateResource(w http.ResponseWriter, r *http.Request, argument Argument)\n```\nCreate a resource (POST /resource/{argument})\n\n```go\nfunc (_ Unimplemented) CreateResource2(w http.ResponseWriter, r *http.Request, inlineArgument int, params CreateResource2Params)\n```\nCreate a resource with inline parameter (POST /resource2/{inline\\_argument})\n\n```go\nfunc (_ Unimplemented) GetEveryTypeOptional(w http.ResponseWriter, r *http.Request)\n```\nget every type optional (GET /every-type-optional)\n\n```go\nfunc (_ Unimplemented) GetReservedKeyword(w http.ResponseWriter, r *http.Request)\n```\nget with reserved keyword (GET /reserved-keyword)\n\n```go\nfunc (_ Unimplemented) GetResponseWithReference(w http.ResponseWriter, r *http.Request)\n```\nget response with reference (GET /response-with-reference)\n\n```go\nfunc (_ Unimplemented) GetSimple(w http.ResponseWriter, r *http.Request)\n```\nGet resource via simple path (GET /get-simple)\n\n```go\nfunc (_ Unimplemented) GetWithArgs(w http.ResponseWriter, r *http.Request, params GetWithArgsParams)\n```\nGetter with referenced parameter and referenced response (GET /get-with-args)\n\n```go\nfunc (_ Unimplemented) GetWithContentType(w http.ResponseWriter, r *http.Request, contentType GetWithContentTypeParamsContentType)\n```\nGet an object by ID (GET /get-with-type/{content\\_type})\n\n```go\nfunc (_ Unimplemented) GetWithReferences(w http.ResponseWriter, r *http.Request, globalArgument int64, argument Argument)\n```\nGetter with referenced parameter and referenced response (GET /get-with-references/{global\\_argument}/{argument})\n\n```go\nfunc (_ Unimplemented) UpdateResource3(w http.ResponseWriter, r *http.Request, pFallthrough int)\n```\nUpdate a resource with inline body. The parameter name is a reserved keyword, so make sure that gets prefixed to avoid syntax errors (PUT /resource3/{fallthrough})\n\n```go\ntype UnmarshalingParamError struct {\n\tParamName string\n\tErr       error\n}\n```\n\n```go\nfunc (e *UnmarshalingParamError) Error() string\n```\n\n```go\nfunc (e *UnmarshalingParamError) Unwrap() error\n```\n\n```go\ntype UpdateResource3JSONBody struct {\n\tId   *int    `json:\"id,omitempty\"`\n\tName *string `json:\"name,omitempty\"`\n}\n```\nUpdateResource3JSONBody defines parameters for UpdateResource3.\n\n```go\ntype UpdateResource3JSONRequestBody UpdateResource3JSONBody\n```\nUpdateResource3JSONRequestBody defines body for UpdateResource3 for application/json ContentType.\n\n","path":"github.com/ascendsoftware/oapi-codegen/internal/test/server","name":"server","synopsis":"Package server provides primitives to interact with the openapi HTTP API.","isRedistributable":true}
