|
package restapi
|
Generated documentation is available at:
https://pkg.go.dev/github.com/RedHatInsights/insights-operator-cli/restapi
Documentation in literate-programming-style is available at:
https://redhatinsights.github.io/insights-operator-cli/packages/restapi/api.html
|
import (
"github.com/RedHatInsights/insights-operator-cli/types"
)
|
API represents API to the controller service. Normally it is implemented via
REST API, but other methods can be used as well (for example for testing or
to use asynchronous mechanisms).
|
type API interface {
|
cluster related commands
|
ReadListOfClusters ( ) ( [ ] types . Cluster , error )
AddCluster ( name string ) error
DeleteCluster ( clusterID string ) error
|
configuration profiles related commands
|
ReadListOfConfigurationProfiles ( ) ( [ ] types . ConfigurationProfile , error )
ReadConfigurationProfile ( profileID string ) ( * types . ConfigurationProfile , error )
AddConfigurationProfile ( username string , description string , configuration [ ] byte ) error
DeleteConfigurationProfile ( profileID string ) error
|
configuration related commands
|
ReadListOfConfigurations ( ) ( [ ] types . ClusterConfiguration , error )
ReadClusterConfigurationByID ( configurationID string ) ( * string , error )
AddClusterConfiguration ( username string , cluster string , reason string , description string , configuration [ ] byte ) error
EnableClusterConfiguration ( configurationID string ) error
DisableClusterConfiguration ( configurationID string ) error
DeleteClusterConfiguration ( configurationID string ) error
|
trigger related commands
|
ReadListOfTriggers ( ) ( [ ] types . Trigger , error )
ReadTriggerByID ( triggerID string ) ( * types . Trigger , error )
AddTrigger ( username string , clusterName string , reason string , link string ) error
DeleteTrigger ( triggerID string ) error
ActivateTrigger ( triggerID string ) error
DeactivateTrigger ( triggerID string ) error
}
|