# Functions
HandlerDeleteAccount handles the request for deleting an Account in the inventory @Summary Deletes an Account in the inventory @Description Deletes an Account present in the inventory by its Name @Tags Accounts @Accept json @Produce json @Success 200 {object} nil @Failure 500 {object} nil @Router /accounts/:account_name [delete] TODO: Not Implemented.
HandlerDeleteCluster handles the request for removing a Cluster in the inventory @Summary Deletes a Cluster in the inventory @Description Deletes a Cluster present in the inventory by its Name @Tags Clusters @Accept json @Produce json @Success 200 {object} nil @Failure 500 {object} nil @Router /clusters/:cluster_id [delete] TODO: Not Implemented.
HandlerDeleteInstance handles the request for removing an Instance in the inventory @Summary Deletes an Instance in the inventory @Description Deletes an Instance present in the inventory by its ID @Tags Instances @Accept json @Produce json @Success 200 {object} nil @Failure 500 {object} nil @Router /instances/:instance_id [delete] TODO: Not Implemented.
HandlerGetAccounts handles the request for obtaining the entire Account list @Summary Obtain every Account @Description Returns a list of Accounts with a single Account filtered by Name @Tags Accounts @Accept json @Produce json @Success 200 {object} AccountListResponse @Failure 500 {object} nil @Router /accounts/ [get].
HandlerGetAccountsByName handles the request for obtain an Account by its Name @Summary Obtain a single Account by its Name @Description Returns a list of Accounts with a single Account filtered by Name @Tags Accounts @Accept json @Produce json @Success 200 {object} AccountListResponse @Failure 404 {object} nil @Failure 500 {object} nil @Router /accounts/:account_name [get].
HandlerGetClusters handles the request for obtaining the entire Cluster list @Summary Obtain every Cluster @Description Returns a list of Clusters with a single instance filtered by Name @Tags Clusters @Accept json @Produce json @Success 200 {object} ClusterListResponse @Failure 500 {object} nil @Router /clusters/ [get].
HandlerGetClustersByID handles the request for obtain an Cluster by its Name @Summary Obtain a single Cluster by its Name @Description Returns a list of Clusters with a single Cluster filtered by Name @Tags Clusters @Accept json @Produce json @Success 200 {object} ClusterListResponse @Failure 404 {object} nil @Failure 500 {object} nil @Router /clusters/:cluster_id [get].
HandlerGetClustersOnAccount handles the request for obtain the list of clusters deployed on a specific Account @Summary Obtain Cluster list on an Account @Description Returns a list of Clusters which belongs to an Account given by Name @Tags Accounts @Accept json @Produce json @Success 200 {object} AccountListResponse @Failure 500 {object} nil @Router /accounts/:account_name/clusters [get].
HandlerGetClusterTags handles the request for obtain the list of tags of a Cluster @Summary Obtain Cluster Tags @Description Returns a list of Tags belonging to an Cluster given by ID @Tags Clusters @Accept json @Produce json @Success 200 {object} TagListResponse @Failure 500 {object} nil @Router /clusters/:cluster_id/instances [get].
HandlerGetExpenses handles the request for obtain the entire Expenses list @Summary Obtain every Expense @Description Returns a list of Expense with every Expensein the inventory @Tags Expense @Accept json @Produce json @Success 200 {object} ExpenseListResponse @Failure 500 {object} nil @Router /expenses/ [get].
HandlerGetExpenseByID handles the request for obtain an Expense by its ID @Summary Obtain a single Expense by its ID @Description Returns a list of Expenses with a single Expense filtered by ID @Tags Expenses @Accept json @Produce json @Success 200 {object} ExpenseListResponse @Failure 404 {object} nil @Failure 500 {object} nil @Router /expenses/:instance_id [get].
HandlerGetInstanceByID handles the request for obtain an Instance by its ID @Summary Obtain a single Instance by its ID @Description Returns a list of Instances with a single Instance filtered by ID @Tags Instances @Accept json @Produce json @Success 200 {object} InstanceListResponse @Failure 404 {object} nil @Failure 500 {object} nil @Router /instances/:instance_id [get].
HandlerGetInstances handles the request for obtain the entire Instances list @Summary Obtain every Instance @Description Returns a list of Instances with every Instance in the inventory @Tags Instances @Accept json @Produce json @Success 200 {object} InstanceListResponse @Failure 500 {object} nil @Router /instances/ [get].
HandlerGetInstancesForBillingUpdate handles the request for obtain a list of instances that needs to update its billing information @Summary Obtain instances list with missing billing data @Description Returns a list of Instances with outdated expenses or without any expense @Tags Instance @Accept json @Produce json @Success 200 {object} InstanceListResponse @Failure 500 {object} nil @Router /instances/expense_update [get].
HandlerGetInstancesOnCluster handles the request for obtain the list of Instances belonging to a specific Cluster @Summary Obtain Instances list belonging to a Cluster @Description Returns a list of Instances belonging to an Cluster given by Name @Tags Clusters @Accept json @Produce json @Success 200 {object} InstanceListResponse @Failure 500 {object} nil @Router /clusters/:cluster_id/instances [get].
HandlerHealthCheck handles the request for checking the health level of the API @Summary Runs HealthChecks @Description Runs several checks for evaulating the health level of ClusterIQ @Tags Health @Accept json @Produce json @Success 200 {object} HealthCheckResponse @Router /health_check/ [get].
HandlerPatchAccount handles the request for patching an Account in the inventory @Summary Patches an Account in the inventory @Description Receives and patch into the DB the information for an existing Account @Tags Accounts @Accept json @Produce json @Param Account body inventory.Account true "Account to be modified" @Success 200 {object} nil @Failure 500 {object} nil @Router /accounts/:account_name [patch].
HandlerPatchCluster handles the request for patching a Cluster in the inventory @Summary Patches a Cluster in the inventory @Description Receives and patch into the DB the information for an existing Cluster @Tags Clusters @Accept json @Produce json @Param instance body inventory.Cluster true "Cluster to be modified" @Success 200 {object} nil @Failure 500 {object} nil @Router /clusters/:cluster_id [patch].
HandlerPatchInstance handles the request for patching an Instance in the inventory @Summary Patches an Instance in the inventory @Description Receives and patch into the DB the information for an existing Instance @Tags Instances @Accept json @Produce json @Param instance body inventory.Instance true "Instance to be modified" @Success 200 {object} nil @Failure 500 {object} nil @Router /instances/:instance_id [patch].
HandlerPostAccount handles the request for writting a new Account in the inventory @Summary Creates a new Account in the inventory @Description Receives and write into the DB the information for a new Account @Tags Accounts @Accept json @Produce json @Param account body inventory.Account true "New Account to be added" @Success 200 {object} nil @Failure 500 {object} nil @Router /accounts/ [post].
HandlerPostCluster handles the request for writting a new Cluster in the inventory @Summary Creates a new Cluster in the inventory @Description Receives and write into the DB the information for a new Cluster @Tags Clusters @Accept json @Produce json @Param cluster body inventory.Cluster true "New Cluster to be added" @Success 200 {object} nil @Failure 500 {object} nil @Router /clusters/ [post].
HandlerPostExpense handles the request for writting a new Expense in the inventory @Summary Creates a new Expense in the inventory @Description Receives and write into the DB the information for a new Expense @Tags Expenses @Accept json @Produce json @Param instance body []inventory.Expense true "New Expense to be added" @Success 200 {object} nil @Failure 500 {object} nil @Router /expenses/ [post].
HandlerPostInstance handles the request for writting a new Instance in the inventory @Summary Creates a new Instance in the inventory @Description Receives and write into the DB the information for a new Instance @Tags Instances @Accept json @Produce json @Param instance body []inventory.Instance true "New Instance to be added" @Success 200 {object} nil @Failure 500 {object} nil @Router /instances [post].
HandlerRefreshInventory handles the request for refreshing the entire inventory just after a full scan.
NewAccountListResponse creates a new ClusterListResponse instance and controls if there is any cluster in the incoming list.
NewClusterListResponse creates a new ClusterListResponse instance and controls if there is any cluster in the incoming list.
NewExpenseListResponse creates a new ExpenseListResponse instance and controls if there is any Expense in the incoming list.
NewInstanceListResponse creates a new InstanceListResponse instance and controls if there is any Instance in the incoming list.
NewTagListResponse creates a new TagListResponse Tag and controls if there is any Tag in the incoming list.
# Constants
No description provided by the author
DeleteAccountQuery removes an account by its name.
DeleteClusterQuery removes an cluster by its name.
DeleteInstanceQuery removes an instance by its ID.
DeleteTagsQuery removes a Tag by its key and instance reference.
InsertAccountsQuery inserts into a new instance in its table.
InsertClustersQuery inserts into a new instance in its table.
InsertExpensesQuery inserts into a new expense for an instance.
InsertInstancesQuery inserts into a new instance in its table.
InsertTagsQuery inserts into a new tag for an instance.
SelectAccountsByNameQuery returns an instance by its Name.
SelectAccountsQuery returns every instance in the inventory ordered by Name.
SelectClustersByIDuery returns an cluster by its Name.
SelectClustersOnAccountQuery returns an cluster by its Name.
SelectClustersQuery returns every cluster in the inventory ordered by Name.
SelectClusterTags returns the cluster's tags.
SelectExpensesByInstanceQuery returns expense in the inventory for a specific InstanceID.
SelectExpensesQuery returns every expense in the inventory ordered by instanceID.
SelectInstancesByIDQuery returns an instance by its ID.
SelectInstancesOnClusterQuery returns every instance belonging to a acluster.
SelectInstancesQuery returns every instance in the inventory ordered by ID.
SelectLastExpensesQuery returns the last expense for every instance older than 1 day.
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
AccountListResponse represents the API response containing a list of accounts.
ClusterListResponse represents the API response containing a list of clusters.
ExpenseListResponse represents the API response containing a list of expenses.
HealthCheckResponse represents the API response for the Health Check report.
HealthChecks represents the different HealthChecks performed by the API.
InstanceDB is an intermediate struct to map the Instances and its tags into inventory.Instance objects.
InstanceListResponse represents the API response containing a list of instances.
TagListResponse represents the API response containing a list of instances.