torc 0.20.7

Workflow management system
# This file was generated by the Julia OpenAPI Code Generator
# Do not modify this file directly. Modify the OpenAPI specification instead.

struct AdminApi <: OpenAPI.APIClientImpl
    client::OpenAPI.Clients.Client
end

"""
The default API base path for APIs in `AdminApi`.
This can be used to construct the `OpenAPI.Clients.Client` instance.
"""
basepath(::Type{ AdminApi }) = "http://localhost/torc-service/v1"

const _returntypes_reload_auth_AdminApi = Dict{Regex,Type}(
    Regex("^" * replace("200", "x"=>".") * "\$") => ReloadAuth200Response,
    Regex("^" * replace("403", "x"=>".") * "\$") => ForbiddenErrorResponse,
    Regex("^" * replace("500", "x"=>".") * "\$") => DefaultErrorResponse,
)

function _oacinternal_reload_auth(_api::AdminApi; _mediaType=nothing)
    _ctx = OpenAPI.Clients.Ctx(_api.client, "POST", _returntypes_reload_auth_AdminApi, "/admin/reload-auth", [])
    OpenAPI.Clients.set_header_accept(_ctx, ["application/json", ])
    OpenAPI.Clients.set_header_content_type(_ctx, (_mediaType === nothing) ? [] : [_mediaType])
    return _ctx
end

@doc raw"""Reload auth credentials from htpasswd file

Re-reads the htpasswd authentication file from disk without restarting the server. This is useful for adding/removing users or changing passwords. Only admin users can call this endpoint. The credential cache is cleared after reload.

Params:

Return: ReloadAuth200Response, OpenAPI.Clients.ApiResponse
"""
function reload_auth(_api::AdminApi; _mediaType=nothing)
    _ctx = _oacinternal_reload_auth(_api; _mediaType=_mediaType)
    return OpenAPI.Clients.exec(_ctx)
end

function reload_auth(_api::AdminApi, response_stream::Channel; _mediaType=nothing)
    _ctx = _oacinternal_reload_auth(_api; _mediaType=_mediaType)
    return OpenAPI.Clients.exec(_ctx, response_stream)
end

export reload_auth