Documentation ¶
Overview ¶
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen/v2 version v2.2.1-0.20240604070534-2f0ff757704b DO NOT EDIT.
Index ¶
- Constants
- func GetSwagger() (swagger *openapi3.T, err error)
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, m *http.ServeMux) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, m *http.ServeMux, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options StdHTTPServerOptions) http.Handler
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- type After
- type AuthCreateSession200JSONResponse
- type AuthCreateSession200ResponseHeaders
- type AuthCreateSession401JSONResponse
- type AuthCreateSessionJSONRequestBody
- type AuthCreateSessionRequestObject
- type AuthCreateSessionResponseObject
- type AuthCreateSessiondefaultJSONResponse
- type AuthGetSession200JSONResponse
- type AuthGetSessionRequestObject
- type AuthGetSessionResponseObject
- type Credentials
- func (t Credentials) AsPasswordCredentials() (PasswordCredentials, error)
- func (t *Credentials) FromPasswordCredentials(v PasswordCredentials) error
- func (t Credentials) MarshalJSON() ([]byte, error)
- func (t *Credentials) MergePasswordCredentials(v PasswordCredentials) error
- func (t *Credentials) UnmarshalJSON(b []byte) error
- type CredentialsKind
- type Error
- type ErrorJSONResponse
- type File
- type FileDelete200JSONResponse
- type FileDelete404JSONResponse
- type FileDeleteRequestObject
- type FileDeleteResponseObject
- type FileDeletedefaultJSONResponse
- type FileID
- type FileList
- type FilePatch
- type FilePatch200JSONResponse
- type FilePatch400JSONResponse
- type FilePatch404JSONResponse
- type FilePatchJSONRequestBody
- type FilePatchRequestObject
- type FilePatchResponseObject
- type FilePatchdefaultJSONResponse
- type FilePrefix
- type FileType
- type FileUpload
- type FileUploadResponse
- type FilesList200JSONResponse
- type FilesListParams
- type FilesListRequestObject
- type FilesListResponseObject
- type FilesListdefaultJSONResponse
- type FilesUpload200JSONResponse
- type FilesUpload400JSONResponse
- type FilesUploadMultipartRequestBody
- type FilesUploadRequestObject
- type FilesUploadResponseObject
- type FilesUploaddefaultJSONResponse
- type First
- type InstanceSetup200JSONResponse
- type InstanceSetup400JSONResponse
- type InstanceSetup409JSONResponse
- type InstanceSetupJSONRequestBody
- type InstanceSetupRequest
- type InstanceSetupRequestObject
- type InstanceSetupResponse
- type InstanceSetupResponseObject
- type InstanceSetupdefaultJSONResponse
- type InstanceStatus
- type InstanceStatus200JSONResponse
- type InstanceStatusRequestObject
- type InstanceStatusResponseObject
- type InstanceStatusStatusDatabase
- type InstanceStatusStatusFileStorage
- type InstanceStatusdefaultJSONResponse
- type InternalError
- type InternalErrorJSONResponse
- type InvalidFileParamError
- type InvalidFileParamsError
- type InvalidFileParamsErrorError
- type InvalidParamFormatError
- type InvalidParams
- type InvalidParamsError
- type InvalidParamsErrorError
- type InvalidParamsJSONResponse
- type ListInfo
- type MiddlewareFunc
- type NotFound
- type NotFoundError
- type NotFoundErrorError
- type NotFoundJSONResponse
- type PasswordCredentials
- type PasswordCredentialsKind
- type RequiredHeaderError
- type RequiredParamError
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) AuthCreateSession(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) AuthGetSession(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) FileDelete(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) FilePatch(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) FilesList(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) FilesUpload(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) InstanceSetup(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) InstanceStatus(w http.ResponseWriter, r *http.Request)
- type Session
- type SessionRequest
- type StdHTTPServerOptions
- type StrictHTTPServerOptions
- type StrictHandlerFunc
- type StrictMiddlewareFunc
- type StrictServerInterface
- type TooManyValuesForParamError
- type UnescapedCookieParamError
- type UnmarshalingParamError
- type User
Constants ¶
const (
SessionScopes = "session.Scopes"
)
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, m *http.ServeMux) http.Handler
HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
func HandlerWithOptions ¶
func HandlerWithOptions(si ServerInterface, options StdHTTPServerOptions) http.Handler
HandlerWithOptions creates http.Handler with additional options
Types ¶
type AuthCreateSession200JSONResponse ¶
type AuthCreateSession200JSONResponse struct { Body Session Headers AuthCreateSession200ResponseHeaders }
func (AuthCreateSession200JSONResponse) VisitAuthCreateSessionResponse ¶
func (response AuthCreateSession200JSONResponse) VisitAuthCreateSessionResponse(w http.ResponseWriter) error
type AuthCreateSession200ResponseHeaders ¶
type AuthCreateSession200ResponseHeaders struct {
SetCookie string
}
type AuthCreateSession401JSONResponse ¶
type AuthCreateSession401JSONResponse struct{ ErrorJSONResponse }
func (AuthCreateSession401JSONResponse) VisitAuthCreateSessionResponse ¶
func (response AuthCreateSession401JSONResponse) VisitAuthCreateSessionResponse(w http.ResponseWriter) error
type AuthCreateSessionJSONRequestBody ¶
type AuthCreateSessionJSONRequestBody = SessionRequest
AuthCreateSessionJSONRequestBody defines body for AuthCreateSession for application/json ContentType.
type AuthCreateSessionRequestObject ¶
type AuthCreateSessionRequestObject struct {
Body *AuthCreateSessionJSONRequestBody
}
type AuthCreateSessionResponseObject ¶
type AuthCreateSessionResponseObject interface {
VisitAuthCreateSessionResponse(w http.ResponseWriter) error
}
type AuthCreateSessiondefaultJSONResponse ¶
func (AuthCreateSessiondefaultJSONResponse) VisitAuthCreateSessionResponse ¶
func (response AuthCreateSessiondefaultJSONResponse) VisitAuthCreateSessionResponse(w http.ResponseWriter) error
type AuthGetSession200JSONResponse ¶
type AuthGetSession200JSONResponse Session
func (AuthGetSession200JSONResponse) VisitAuthGetSessionResponse ¶
func (response AuthGetSession200JSONResponse) VisitAuthGetSessionResponse(w http.ResponseWriter) error
type AuthGetSessionRequestObject ¶
type AuthGetSessionRequestObject struct { }
type AuthGetSessionResponseObject ¶
type AuthGetSessionResponseObject interface {
VisitAuthGetSessionResponse(w http.ResponseWriter) error
}
type Credentials ¶
type Credentials struct { Kind CredentialsKind `json:"kind"` // contains filtered or unexported fields }
Credentials defines model for Credentials.
func (Credentials) AsPasswordCredentials ¶
func (t Credentials) AsPasswordCredentials() (PasswordCredentials, error)
AsPasswordCredentials returns the union data inside the Credentials as a PasswordCredentials
func (*Credentials) FromPasswordCredentials ¶
func (t *Credentials) FromPasswordCredentials(v PasswordCredentials) error
FromPasswordCredentials overwrites any union data inside the Credentials as the provided PasswordCredentials
func (Credentials) MarshalJSON ¶
func (t Credentials) MarshalJSON() ([]byte, error)
func (*Credentials) MergePasswordCredentials ¶
func (t *Credentials) MergePasswordCredentials(v PasswordCredentials) error
MergePasswordCredentials performs a merge with any union data inside the Credentials, using the provided PasswordCredentials
func (*Credentials) UnmarshalJSON ¶
func (t *Credentials) UnmarshalJSON(b []byte) error
type CredentialsKind ¶
type CredentialsKind string
CredentialsKind defines model for Credentials.Kind.
const (
CredentialsKindPassword CredentialsKind = "password"
)
Defines values for CredentialsKind.
type Error ¶
type Error struct { // Error machine-readable error tag Error string `json:"error"` // Message human readable error message Message string `json:"message"` }
Error defines model for Error.
type ErrorJSONResponse ¶
type ErrorJSONResponse Error
type File ¶
type File struct { ContentType string `json:"contentType"` Id openapi_types.UUID `json:"id"` Name string `json:"name"` Path string `json:"path"` // Size Size of the file in bytes Size int `json:"size"` Type FileType `json:"type"` }
File defines model for File.
type FileDelete200JSONResponse ¶
type FileDelete200JSONResponse File
func (FileDelete200JSONResponse) VisitFileDeleteResponse ¶
func (response FileDelete200JSONResponse) VisitFileDeleteResponse(w http.ResponseWriter) error
type FileDelete404JSONResponse ¶
type FileDelete404JSONResponse struct{ NotFoundJSONResponse }
func (FileDelete404JSONResponse) VisitFileDeleteResponse ¶
func (response FileDelete404JSONResponse) VisitFileDeleteResponse(w http.ResponseWriter) error
type FileDeleteRequestObject ¶
type FileDeleteRequestObject struct {
Id FileID `json:"id"`
}
type FileDeleteResponseObject ¶
type FileDeleteResponseObject interface {
VisitFileDeleteResponse(w http.ResponseWriter) error
}
type FileDeletedefaultJSONResponse ¶
func (FileDeletedefaultJSONResponse) VisitFileDeleteResponse ¶
func (response FileDeletedefaultJSONResponse) VisitFileDeleteResponse(w http.ResponseWriter) error
type FileList ¶
type FileList struct { // Count number of items in the current slice of the collection Count int `json:"count"` Items []File `json:"items"` // Next Cursor of the next element, to be used as the `after` parameter in paginated operations Next *string `json:"next"` // Total total number of items in the collection Total int `json:"total"` }
FileList defines model for FileList.
type FilePatch ¶
type FilePatch struct { // Path New path of the file. // To simply rename it, set to the current path with the last segment changed. // E.g.: path/to/file.txt -> path/to/renamed.txt Path *string `json:"path,omitempty"` }
FilePatch defines model for FilePatch.
type FilePatch200JSONResponse ¶
type FilePatch200JSONResponse File
func (FilePatch200JSONResponse) VisitFilePatchResponse ¶
func (response FilePatch200JSONResponse) VisitFilePatchResponse(w http.ResponseWriter) error
type FilePatch400JSONResponse ¶
type FilePatch400JSONResponse struct{ InvalidParamsJSONResponse }
func (FilePatch400JSONResponse) VisitFilePatchResponse ¶
func (response FilePatch400JSONResponse) VisitFilePatchResponse(w http.ResponseWriter) error
type FilePatch404JSONResponse ¶
type FilePatch404JSONResponse struct{ NotFoundJSONResponse }
func (FilePatch404JSONResponse) VisitFilePatchResponse ¶
func (response FilePatch404JSONResponse) VisitFilePatchResponse(w http.ResponseWriter) error
type FilePatchJSONRequestBody ¶
type FilePatchJSONRequestBody = FilePatch
FilePatchJSONRequestBody defines body for FilePatch for application/json ContentType.
type FilePatchRequestObject ¶
type FilePatchRequestObject struct { Id FileID `json:"id"` Body *FilePatchJSONRequestBody }
type FilePatchResponseObject ¶
type FilePatchResponseObject interface {
VisitFilePatchResponse(w http.ResponseWriter) error
}
type FilePatchdefaultJSONResponse ¶
func (FilePatchdefaultJSONResponse) VisitFilePatchResponse ¶
func (response FilePatchdefaultJSONResponse) VisitFilePatchResponse(w http.ResponseWriter) error
type FileUpload ¶
type FileUpload struct { File openapi_types.File `json:"file"` Path string `json:"path"` }
FileUpload defines model for FileUpload.
type FileUploadResponse ¶
FileUploadResponse defines model for FileUploadResponse.
type FilesList200JSONResponse ¶
type FilesList200JSONResponse FileList
func (FilesList200JSONResponse) VisitFilesListResponse ¶
func (response FilesList200JSONResponse) VisitFilesListResponse(w http.ResponseWriter) error
type FilesListParams ¶
type FilesListParams struct { // First Limit the number of items to return to only the first N First *First `form:"first,omitempty" json:"first,omitempty"` // After Cursor to fetch the next slice of the collection After *After `form:"after,omitempty" json:"after,omitempty"` // Prefix Prefix to filter files for. This is matched against the directory the files resides in, not as a generic prefix. // E.g. a prefix `hello` will match `hello/world.txt` but not `hello/dear/world.txt`. Prefix *FilePrefix `form:"prefix,omitempty" json:"prefix,omitempty"` }
FilesListParams defines parameters for FilesList.
type FilesListRequestObject ¶
type FilesListRequestObject struct {
Params FilesListParams
}
type FilesListResponseObject ¶
type FilesListResponseObject interface {
VisitFilesListResponse(w http.ResponseWriter) error
}
type FilesListdefaultJSONResponse ¶
func (FilesListdefaultJSONResponse) VisitFilesListResponse ¶
func (response FilesListdefaultJSONResponse) VisitFilesListResponse(w http.ResponseWriter) error
type FilesUpload200JSONResponse ¶
type FilesUpload200JSONResponse FileUploadResponse
func (FilesUpload200JSONResponse) VisitFilesUploadResponse ¶
func (response FilesUpload200JSONResponse) VisitFilesUploadResponse(w http.ResponseWriter) error
type FilesUpload400JSONResponse ¶
type FilesUpload400JSONResponse struct{ ErrorJSONResponse }
func (FilesUpload400JSONResponse) VisitFilesUploadResponse ¶
func (response FilesUpload400JSONResponse) VisitFilesUploadResponse(w http.ResponseWriter) error
type FilesUploadMultipartRequestBody ¶
type FilesUploadMultipartRequestBody = FileUpload
FilesUploadMultipartRequestBody defines body for FilesUpload for multipart/form-data ContentType.
type FilesUploadResponseObject ¶
type FilesUploadResponseObject interface {
VisitFilesUploadResponse(w http.ResponseWriter) error
}
type FilesUploaddefaultJSONResponse ¶
func (FilesUploaddefaultJSONResponse) VisitFilesUploadResponse ¶
func (response FilesUploaddefaultJSONResponse) VisitFilesUploadResponse(w http.ResponseWriter) error
type InstanceSetup200JSONResponse ¶
type InstanceSetup200JSONResponse InstanceSetupResponse
func (InstanceSetup200JSONResponse) VisitInstanceSetupResponse ¶
func (response InstanceSetup200JSONResponse) VisitInstanceSetupResponse(w http.ResponseWriter) error
type InstanceSetup400JSONResponse ¶
type InstanceSetup400JSONResponse struct{ ErrorJSONResponse }
func (InstanceSetup400JSONResponse) VisitInstanceSetupResponse ¶
func (response InstanceSetup400JSONResponse) VisitInstanceSetupResponse(w http.ResponseWriter) error
type InstanceSetup409JSONResponse ¶
type InstanceSetup409JSONResponse Error
func (InstanceSetup409JSONResponse) VisitInstanceSetupResponse ¶
func (response InstanceSetup409JSONResponse) VisitInstanceSetupResponse(w http.ResponseWriter) error
type InstanceSetupJSONRequestBody ¶
type InstanceSetupJSONRequestBody = InstanceSetupRequest
InstanceSetupJSONRequestBody defines body for InstanceSetup for application/json ContentType.
type InstanceSetupRequest ¶
type InstanceSetupRequest struct { Admin struct { Password string `json:"password"` Username string `json:"username"` } `json:"admin"` }
InstanceSetupRequest defines model for InstanceSetupRequest.
type InstanceSetupRequestObject ¶
type InstanceSetupRequestObject struct {
Body *InstanceSetupJSONRequestBody
}
type InstanceSetupResponse ¶
type InstanceSetupResponse struct {
Ok bool `json:"ok"`
}
InstanceSetupResponse defines model for InstanceSetupResponse.
type InstanceSetupResponseObject ¶
type InstanceSetupResponseObject interface {
VisitInstanceSetupResponse(w http.ResponseWriter) error
}
type InstanceSetupdefaultJSONResponse ¶
func (InstanceSetupdefaultJSONResponse) VisitInstanceSetupResponse ¶
func (response InstanceSetupdefaultJSONResponse) VisitInstanceSetupResponse(w http.ResponseWriter) error
type InstanceStatus ¶
type InstanceStatus struct { Status struct { Database InstanceStatusStatusDatabase `json:"database"` FileStorage InstanceStatusStatusFileStorage `json:"fileStorage"` PublicURL string `json:"publicURL"` SetupCompleted bool `json:"setupCompleted"` } `json:"status"` }
InstanceStatus defines model for InstanceStatus.
type InstanceStatus200JSONResponse ¶
type InstanceStatus200JSONResponse InstanceStatus
func (InstanceStatus200JSONResponse) VisitInstanceStatusResponse ¶
func (response InstanceStatus200JSONResponse) VisitInstanceStatusResponse(w http.ResponseWriter) error
type InstanceStatusRequestObject ¶
type InstanceStatusRequestObject struct { }
type InstanceStatusResponseObject ¶
type InstanceStatusResponseObject interface {
VisitInstanceStatusResponse(w http.ResponseWriter) error
}
type InstanceStatusStatusDatabase ¶
type InstanceStatusStatusDatabase string
InstanceStatusStatusDatabase defines model for InstanceStatus.Status.Database.
const ( Postgres InstanceStatusStatusDatabase = "postgres" Sqlite InstanceStatusStatusDatabase = "sqlite" )
Defines values for InstanceStatusStatusDatabase.
type InstanceStatusStatusFileStorage ¶
type InstanceStatusStatusFileStorage string
InstanceStatusStatusFileStorage defines model for InstanceStatus.Status.FileStorage.
const ( Filesystem InstanceStatusStatusFileStorage = "filesystem" S3 InstanceStatusStatusFileStorage = "s3" )
Defines values for InstanceStatusStatusFileStorage.
type InstanceStatusdefaultJSONResponse ¶
func (InstanceStatusdefaultJSONResponse) VisitInstanceStatusResponse ¶
func (response InstanceStatusdefaultJSONResponse) VisitInstanceStatusResponse(w http.ResponseWriter) error
type InternalErrorJSONResponse ¶
type InternalErrorJSONResponse Error
type InvalidFileParamError ¶
type InvalidFileParamError struct { Message string `json:"message"` // Param The name of the invalid parameter Param string `json:"param"` Reason string `json:"reason"` }
InvalidFileParamError defines model for InvalidFileParamError.
type InvalidFileParamsError ¶
type InvalidFileParamsError struct { Error InvalidFileParamsErrorError `json:"error"` Errors []InvalidFileParamError `json:"errors"` // Message human readable error message Message string `json:"message"` }
InvalidFileParamsError defines model for InvalidFileParamsError.
type InvalidFileParamsErrorError ¶
type InvalidFileParamsErrorError string
InvalidFileParamsErrorError defines model for InvalidFileParamsError.Error.
const (
InvalidFileParamsErrorErrorInvalidParams InvalidFileParamsErrorError = "invalid_params"
)
Defines values for InvalidFileParamsErrorError.
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type InvalidParams ¶
type InvalidParams = InvalidFileParamsError
InvalidParams defines model for InvalidParams.
type InvalidParamsError ¶
type InvalidParamsError struct { Error InvalidParamsErrorError `json:"error"` // Message human readable error message Message string `json:"message"` }
InvalidParamsError defines model for InvalidParamsError.
type InvalidParamsErrorError ¶
type InvalidParamsErrorError string
InvalidParamsErrorError defines model for InvalidParamsError.Error.
const (
InvalidParamsErrorErrorInvalidParams InvalidParamsErrorError = "invalid_params"
)
Defines values for InvalidParamsErrorError.
type InvalidParamsJSONResponse ¶
type InvalidParamsJSONResponse InvalidFileParamsError
type ListInfo ¶
type ListInfo struct { // Count number of items in the current slice of the collection Count int `json:"count"` // Next Cursor of the next element, to be used as the `after` parameter in paginated operations Next *string `json:"next"` // Total total number of items in the collection Total int `json:"total"` }
ListInfo defines model for ListInfo.
type NotFoundError ¶
type NotFoundError struct { Error NotFoundErrorError `json:"error"` // Message human readable error message Message string `json:"message"` }
NotFoundError defines model for NotFoundError.
type NotFoundErrorError ¶
type NotFoundErrorError string
NotFoundErrorError defines model for NotFoundError.Error.
const (
NotFoundErrorErrorNotFound NotFoundErrorError = "not_found"
)
Defines values for NotFoundErrorError.
type NotFoundJSONResponse ¶
type NotFoundJSONResponse NotFoundError
type PasswordCredentials ¶
type PasswordCredentials struct { Kind PasswordCredentialsKind `json:"kind"` Password string `json:"password"` Username string `json:"username"` }
PasswordCredentials defines model for PasswordCredentials.
type PasswordCredentialsKind ¶
type PasswordCredentialsKind string
PasswordCredentialsKind defines model for PasswordCredentials.Kind.
const (
PasswordCredentialsKindPassword PasswordCredentialsKind = "password"
)
Defines values for PasswordCredentialsKind.
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 { // List all available files // (GET /api/files) FilesList(w http.ResponseWriter, r *http.Request, params FilesListParams) // Upload a file to Oxidrive // (POST /api/files) FilesUpload(w http.ResponseWriter, r *http.Request) // Delete a file // (DELETE /api/files/{id}) FileDelete(w http.ResponseWriter, r *http.Request, id FileID) // Change a file's metadata // (PATCH /api/files/{id}) FilePatch(w http.ResponseWriter, r *http.Request, id FileID) // Get the instance status // (GET /api/instance) InstanceStatus(w http.ResponseWriter, r *http.Request) // Setup the instance and create the initial admin user // (POST /api/instance/setup) InstanceSetup(w http.ResponseWriter, r *http.Request) // Return the user information related to the current session // (GET /api/session) AuthGetSession(w http.ResponseWriter, r *http.Request) // Create a new session and generate the corresponding cookie // (POST /api/sessions) AuthCreateSession(w http.ResponseWriter, r *http.Request) }
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) AuthCreateSession ¶
func (siw *ServerInterfaceWrapper) AuthCreateSession(w http.ResponseWriter, r *http.Request)
AuthCreateSession operation middleware
func (*ServerInterfaceWrapper) AuthGetSession ¶
func (siw *ServerInterfaceWrapper) AuthGetSession(w http.ResponseWriter, r *http.Request)
AuthGetSession operation middleware
func (*ServerInterfaceWrapper) FileDelete ¶
func (siw *ServerInterfaceWrapper) FileDelete(w http.ResponseWriter, r *http.Request)
FileDelete operation middleware
func (*ServerInterfaceWrapper) FilePatch ¶
func (siw *ServerInterfaceWrapper) FilePatch(w http.ResponseWriter, r *http.Request)
FilePatch operation middleware
func (*ServerInterfaceWrapper) FilesList ¶
func (siw *ServerInterfaceWrapper) FilesList(w http.ResponseWriter, r *http.Request)
FilesList operation middleware
func (*ServerInterfaceWrapper) FilesUpload ¶
func (siw *ServerInterfaceWrapper) FilesUpload(w http.ResponseWriter, r *http.Request)
FilesUpload operation middleware
func (*ServerInterfaceWrapper) InstanceSetup ¶
func (siw *ServerInterfaceWrapper) InstanceSetup(w http.ResponseWriter, r *http.Request)
InstanceSetup operation middleware
func (*ServerInterfaceWrapper) InstanceStatus ¶
func (siw *ServerInterfaceWrapper) InstanceStatus(w http.ResponseWriter, r *http.Request)
InstanceStatus operation middleware
type SessionRequest ¶
type SessionRequest struct {
Credentials Credentials `json:"credentials"`
}
SessionRequest defines model for SessionRequest.
type StdHTTPServerOptions ¶
type StdHTTPServerOptions struct { BaseURL string BaseRouter *http.ServeMux Middlewares []MiddlewareFunc ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error) }
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 { // List all available files // (GET /api/files) FilesList(ctx context.Context, request FilesListRequestObject) (FilesListResponseObject, error) // Upload a file to Oxidrive // (POST /api/files) FilesUpload(ctx context.Context, request FilesUploadRequestObject) (FilesUploadResponseObject, error) // Delete a file // (DELETE /api/files/{id}) FileDelete(ctx context.Context, request FileDeleteRequestObject) (FileDeleteResponseObject, error) // Change a file's metadata // (PATCH /api/files/{id}) FilePatch(ctx context.Context, request FilePatchRequestObject) (FilePatchResponseObject, error) // Get the instance status // (GET /api/instance) InstanceStatus(ctx context.Context, request InstanceStatusRequestObject) (InstanceStatusResponseObject, error) // Setup the instance and create the initial admin user // (POST /api/instance/setup) InstanceSetup(ctx context.Context, request InstanceSetupRequestObject) (InstanceSetupResponseObject, error) // Return the user information related to the current session // (GET /api/session) AuthGetSession(ctx context.Context, request AuthGetSessionRequestObject) (AuthGetSessionResponseObject, error) // Create a new session and generate the corresponding cookie // (POST /api/sessions) AuthCreateSession(ctx context.Context, request AuthCreateSessionRequestObject) (AuthCreateSessionResponseObject, 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 UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error
type User ¶
type User struct { Id openapi_types.UUID `json:"id"` Username string `json:"username"` }
User defines model for User.