cluster

package
v0.6.22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2023 License: Apache-2.0 Imports: 27 Imported by: 2

Documentation

Index

Constants

View Source
const CLUSTER_DELETE_SUCCESS_RESP = "Cluster deleted successfully."
View Source
const ENV_DELETE_SUCCESS_RESP = "Environment deleted successfully."

Variables

View Source
var ClusterWireSet = wire.NewSet(
	repository.NewClusterRepositoryImpl,
	wire.Bind(new(repository.ClusterRepository), new(*repository.ClusterRepositoryImpl)),
	cluster.NewClusterServiceImplExtended,
	wire.Bind(new(cluster.ClusterService), new(*cluster.ClusterServiceImplExtended)),

	repository.NewClusterDescriptionRepositoryImpl,
	wire.Bind(new(repository.ClusterDescriptionRepository), new(*repository.ClusterDescriptionRepositoryImpl)),
	repository2.NewGenericNoteHistoryRepositoryImpl,
	wire.Bind(new(repository2.GenericNoteHistoryRepository), new(*repository2.GenericNoteHistoryRepositoryImpl)),
	repository2.NewGenericNoteRepositoryImpl,
	wire.Bind(new(repository2.GenericNoteRepository), new(*repository2.GenericNoteRepositoryImpl)),
	genericNotes.NewGenericNoteHistoryServiceImpl,
	wire.Bind(new(genericNotes.GenericNoteHistoryService), new(*genericNotes.GenericNoteHistoryServiceImpl)),
	genericNotes.NewGenericNoteServiceImpl,
	wire.Bind(new(genericNotes.GenericNoteService), new(*genericNotes.GenericNoteServiceImpl)),
	cluster.NewClusterDescriptionServiceImpl,
	wire.Bind(new(cluster.ClusterDescriptionService), new(*cluster.ClusterDescriptionServiceImpl)),

	NewClusterRestHandlerImpl,
	wire.Bind(new(ClusterRestHandler), new(*ClusterRestHandlerImpl)),
	NewClusterRouterImpl,
	wire.Bind(new(ClusterRouter), new(*ClusterRouterImpl)),

	repository.NewEnvironmentRepositoryImpl,
	wire.Bind(new(repository.EnvironmentRepository), new(*repository.EnvironmentRepositoryImpl)),
	cluster.NewEnvironmentServiceImpl,
	wire.Bind(new(cluster.EnvironmentService), new(*cluster.EnvironmentServiceImpl)),
	NewEnvironmentRestHandlerImpl,
	wire.Bind(new(EnvironmentRestHandler), new(*EnvironmentRestHandlerImpl)),
	NewEnvironmentRouterImpl,
	wire.Bind(new(EnvironmentRouter), new(*EnvironmentRouterImpl)),
)
View Source
var ClusterWireSetEa = wire.NewSet(
	repository.NewClusterRepositoryImpl,
	wire.Bind(new(repository.ClusterRepository), new(*repository.ClusterRepositoryImpl)),
	cluster.NewClusterServiceImpl,
	wire.Bind(new(cluster.ClusterService), new(*cluster.ClusterServiceImpl)),

	repository.NewClusterDescriptionRepositoryImpl,
	wire.Bind(new(repository.ClusterDescriptionRepository), new(*repository.ClusterDescriptionRepositoryImpl)),
	repository2.NewGenericNoteHistoryRepositoryImpl,
	wire.Bind(new(repository2.GenericNoteHistoryRepository), new(*repository2.GenericNoteHistoryRepositoryImpl)),
	repository2.NewGenericNoteRepositoryImpl,
	wire.Bind(new(repository2.GenericNoteRepository), new(*repository2.GenericNoteRepositoryImpl)),
	genericNotes.NewGenericNoteHistoryServiceImpl,
	wire.Bind(new(genericNotes.GenericNoteHistoryService), new(*genericNotes.GenericNoteHistoryServiceImpl)),
	genericNotes.NewGenericNoteServiceImpl,
	wire.Bind(new(genericNotes.GenericNoteService), new(*genericNotes.GenericNoteServiceImpl)),
	cluster.NewClusterDescriptionServiceImpl,
	wire.Bind(new(cluster.ClusterDescriptionService), new(*cluster.ClusterDescriptionServiceImpl)),

	NewClusterRestHandlerImpl,
	wire.Bind(new(ClusterRestHandler), new(*ClusterRestHandlerImpl)),
	NewClusterRouterImpl,
	wire.Bind(new(ClusterRouter), new(*ClusterRouterImpl)),
	repository.NewEnvironmentRepositoryImpl,
	wire.Bind(new(repository.EnvironmentRepository), new(*repository.EnvironmentRepositoryImpl)),
	cluster.NewEnvironmentServiceImpl,
	wire.Bind(new(cluster.EnvironmentService), new(*cluster.EnvironmentServiceImpl)),
	NewEnvironmentRestHandlerImpl,
	wire.Bind(new(EnvironmentRestHandler), new(*EnvironmentRestHandlerImpl)),
	NewEnvironmentRouterImpl,
	wire.Bind(new(EnvironmentRouter), new(*EnvironmentRouterImpl)),
)

minimal wire to be used with EA

Functions

This section is empty.

Types

type ClusterReachableResponse added in v0.6.18

type ClusterReachableResponse struct {
	ClusterReachable bool   `json:"clusterReachable"`
	ClusterName      string `json:"clusterName"`
}

type ClusterRestHandler

type ClusterRestHandler interface {
	Save(w http.ResponseWriter, r *http.Request)
	SaveClusters(w http.ResponseWriter, r *http.Request)
	ValidateKubeconfig(w http.ResponseWriter, r *http.Request)
	FindAll(w http.ResponseWriter, r *http.Request)
	FindById(w http.ResponseWriter, r *http.Request)
	FindNoteByClusterId(w http.ResponseWriter, r *http.Request)
	Update(w http.ResponseWriter, r *http.Request)
	UpdateClusterNote(w http.ResponseWriter, r *http.Request)
	FindAllForAutoComplete(w http.ResponseWriter, r *http.Request)
	DeleteCluster(w http.ResponseWriter, r *http.Request)
	GetClusterNamespaces(w http.ResponseWriter, r *http.Request)
	GetAllClusterNamespaces(w http.ResponseWriter, r *http.Request)
	FindAllForClusterPermission(w http.ResponseWriter, r *http.Request)
}

type ClusterRestHandlerImpl

type ClusterRestHandlerImpl struct {
	// contains filtered or unexported fields
}

func NewClusterRestHandlerImpl

func NewClusterRestHandlerImpl(clusterService cluster.ClusterService,
	clusterNoteService genericNotes.GenericNoteService,
	clusterDescriptionService cluster.ClusterDescriptionService,
	logger *zap.SugaredLogger,
	userService user.UserService,
	validator *validator.Validate,
	enforcer casbin.Enforcer,
	deleteService delete2.DeleteService,
	argoUserService argo.ArgoUserService,
	environmentService cluster.EnvironmentService) *ClusterRestHandlerImpl

func (*ClusterRestHandlerImpl) CheckRbacForClusterDetails added in v0.6.17

func (impl *ClusterRestHandlerImpl) CheckRbacForClusterDetails(clusterId int, token string) (authenticated bool, err error)

func (ClusterRestHandlerImpl) DeleteCluster added in v0.3.15

func (impl ClusterRestHandlerImpl) DeleteCluster(w http.ResponseWriter, r *http.Request)

func (ClusterRestHandlerImpl) FindAll

func (ClusterRestHandlerImpl) FindAllForAutoComplete

func (impl ClusterRestHandlerImpl) FindAllForAutoComplete(w http.ResponseWriter, r *http.Request)

func (ClusterRestHandlerImpl) FindAllForClusterPermission added in v0.6.11

func (impl ClusterRestHandlerImpl) FindAllForClusterPermission(w http.ResponseWriter, r *http.Request)

func (ClusterRestHandlerImpl) FindById

func (impl ClusterRestHandlerImpl) FindById(w http.ResponseWriter, r *http.Request)

func (ClusterRestHandlerImpl) FindNoteByClusterId added in v0.6.17

func (impl ClusterRestHandlerImpl) FindNoteByClusterId(w http.ResponseWriter, r *http.Request)

func (ClusterRestHandlerImpl) GetAllClusterNamespaces added in v0.6.10

func (impl ClusterRestHandlerImpl) GetAllClusterNamespaces(w http.ResponseWriter, r *http.Request)

func (ClusterRestHandlerImpl) GetClusterNamespaces added in v0.6.11

func (impl ClusterRestHandlerImpl) GetClusterNamespaces(w http.ResponseWriter, r *http.Request)

func (ClusterRestHandlerImpl) Save

func (ClusterRestHandlerImpl) SaveClusters added in v0.6.18

func (impl ClusterRestHandlerImpl) SaveClusters(w http.ResponseWriter, r *http.Request)

func (ClusterRestHandlerImpl) Update

func (ClusterRestHandlerImpl) UpdateClusterNote added in v0.6.17

func (impl ClusterRestHandlerImpl) UpdateClusterNote(w http.ResponseWriter, r *http.Request)

func (ClusterRestHandlerImpl) ValidateKubeconfig added in v0.6.18

func (impl ClusterRestHandlerImpl) ValidateKubeconfig(w http.ResponseWriter, r *http.Request)

type ClusterRouter

type ClusterRouter interface {
	InitClusterRouter(clusterRouter *mux.Router)
}

type ClusterRouterImpl

type ClusterRouterImpl struct {
	// contains filtered or unexported fields
}

func NewClusterRouterImpl

func NewClusterRouterImpl(handler ClusterRestHandler) *ClusterRouterImpl

func (ClusterRouterImpl) InitClusterRouter

func (impl ClusterRouterImpl) InitClusterRouter(clusterRouter *mux.Router)

type EnvironmentRestHandler

type EnvironmentRestHandler interface {
	Create(w http.ResponseWriter, r *http.Request)
	Get(w http.ResponseWriter, r *http.Request)
	GetAll(w http.ResponseWriter, r *http.Request)
	GetAllActive(w http.ResponseWriter, r *http.Request)
	Update(w http.ResponseWriter, r *http.Request)
	FindById(w http.ResponseWriter, r *http.Request)
	GetEnvironmentListForAutocomplete(w http.ResponseWriter, r *http.Request)
	GetCombinedEnvironmentListForDropDown(w http.ResponseWriter, r *http.Request)
	GetEnvironmentConnection(w http.ResponseWriter, r *http.Request)
	DeleteEnvironment(w http.ResponseWriter, r *http.Request)
	GetCombinedEnvironmentListForDropDownByClusterIds(w http.ResponseWriter, r *http.Request)
}

type EnvironmentRestHandlerImpl

type EnvironmentRestHandlerImpl struct {
	// contains filtered or unexported fields
}

func NewEnvironmentRestHandlerImpl

func NewEnvironmentRestHandlerImpl(svc request.EnvironmentService, logger *zap.SugaredLogger, userService user.UserService, validator *validator.Validate, enforcer casbin.Enforcer, deleteService delete2.DeleteService, k8sUtil *k8s2.K8sUtil, k8sCommonService k8s.K8sCommonService) *EnvironmentRestHandlerImpl

func (EnvironmentRestHandlerImpl) CheckAuthorizationByEmailInBatchForGlobalEnvironment added in v0.6.17

func (handler EnvironmentRestHandlerImpl) CheckAuthorizationByEmailInBatchForGlobalEnvironment(emailId string, object []string) map[string]bool

func (EnvironmentRestHandlerImpl) CheckAuthorizationForGlobalEnvironment added in v0.3.14

func (handler EnvironmentRestHandlerImpl) CheckAuthorizationForGlobalEnvironment(token string, object string) bool

func (EnvironmentRestHandlerImpl) Create

func (EnvironmentRestHandlerImpl) DeleteEnvironment added in v0.3.15

func (impl EnvironmentRestHandlerImpl) DeleteEnvironment(w http.ResponseWriter, r *http.Request)

func (EnvironmentRestHandlerImpl) FindById

func (EnvironmentRestHandlerImpl) Get

func (EnvironmentRestHandlerImpl) GetAll

func (EnvironmentRestHandlerImpl) GetAllActive

func (impl EnvironmentRestHandlerImpl) GetAllActive(w http.ResponseWriter, r *http.Request)

func (EnvironmentRestHandlerImpl) GetCombinedEnvironmentListForDropDown added in v0.3.14

func (impl EnvironmentRestHandlerImpl) GetCombinedEnvironmentListForDropDown(w http.ResponseWriter, r *http.Request)

func (EnvironmentRestHandlerImpl) GetCombinedEnvironmentListForDropDownByClusterIds added in v0.3.14

func (impl EnvironmentRestHandlerImpl) GetCombinedEnvironmentListForDropDownByClusterIds(w http.ResponseWriter, r *http.Request)

func (EnvironmentRestHandlerImpl) GetEnvironmentConnection added in v0.6.18

func (impl EnvironmentRestHandlerImpl) GetEnvironmentConnection(w http.ResponseWriter, r *http.Request)

func (EnvironmentRestHandlerImpl) GetEnvironmentListForAutocomplete

func (impl EnvironmentRestHandlerImpl) GetEnvironmentListForAutocomplete(w http.ResponseWriter, r *http.Request)

func (EnvironmentRestHandlerImpl) Update

type EnvironmentRouter

type EnvironmentRouter interface {
	InitEnvironmentClusterMappingsRouter(clusterAccountsRouter *mux.Router)
}

type EnvironmentRouterImpl

type EnvironmentRouterImpl struct {
	// contains filtered or unexported fields
}

func NewEnvironmentRouterImpl

func NewEnvironmentRouterImpl(environmentClusterMappingsRestHandler EnvironmentRestHandler) *EnvironmentRouterImpl

func (EnvironmentRouterImpl) InitEnvironmentClusterMappingsRouter

func (impl EnvironmentRouterImpl) InitEnvironmentClusterMappingsRouter(environmentClusterMappingsRouter *mux.Router)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL