class VhostController

Defined in:

lavinmq/api/controllers/vhost.cr

Constant Summary

PARSER_LIST = ["application/json"]
RESPONDER_LIST = ["application/json"]

Class Method Summary

Instance Method Summary

Instance methods inherited from class Controller

amqpserver_is_open amqpserver_is_open, api_server_is_open api_server_is_open, bad_media_type(error) : AC::Error::ContentResponse bad_media_type, bad_request_return(error) : LavinMQ::Error::CommonResponse bad_request_return, enable_cors enable_cors, forbidden_return(error) : LavinMQ::Error::CommonResponse forbidden_return, invalid_param(error) : AC::Error::ParameterResponse invalid_param, json_mal_formatted(error) : LavinMQ::Error::CommonResponse json_mal_formatted, json_serializable_error(error) : LavinMQ::Error::CommonResponse json_serializable_error, not_found(error) : LavinMQ::Error::CommonResponse not_found, precondition_failed_return(error) : LavinMQ::Error::CommonResponse precondition_failed_return, service_unavailable(error) : LavinMQ::Error::CommonResponse service_unavailable, unauthorized_return(error) : LavinMQ::Error::CommonResponse unauthorized_return

Instance methods inherited from module LavinMQ::API::ManageVhost

vhosts(user : User) vhosts

Instance methods inherited from module LavinMQ::API::ManageAuth

auth_user auth_user

Class Method Detail

def self.base_route #

Helper for obtaining base route


def self.list_all_vhosts(hash_parts : Hash(String | Symbol, Nil | Bool | Int32 | Int64 | Float32 | Float64 | String | Symbol) | Nil = nil, **tuple_parts) #

Helper methods for performing redirect_to calls


Instance Method Detail

def base_route(*args, **options) #

Helper for obtaining base route


def base_route(*args, **options, &) #

Helper for obtaining base route


def create_or_update(name : String) : Nil | LavinMQ::VHost #

Create/update vhost Create a new vhost, or update an existing vhost.


[View source]
def delete(name : String) #

Delete vhost Remove a specific vhost by name.


[View source]
def list_all_vhosts : Array(Vhost) #

List all vhosts List all vhosts in the server.


[View source]
def permissions(vhost_name : String) : Array(UserController::Permission) #

List permissions of vhost List the permissions for a vhost.


[View source]
def purge_and_close_consumers(vhost_name : String, purge_params : PurgeParams) #

Purge and Close consumers Purge and close all consumers


[View source]
def show_vhost(name : String) : Vhost #

List vhost Find a specific vhost by name.


[View source]