Documentation ¶
Index ¶
- Constants
- Variables
- type K8sApplicationRestHandler
- type K8sApplicationRestHandlerImpl
- func (handler *K8sApplicationRestHandlerImpl) CreateResource(w http.ResponseWriter, r *http.Request)
- func (handler *K8sApplicationRestHandlerImpl) DeleteResource(w http.ResponseWriter, r *http.Request)
- func (handler *K8sApplicationRestHandlerImpl) GetPodLogs(w http.ResponseWriter, r *http.Request)
- func (handler *K8sApplicationRestHandlerImpl) GetResource(w http.ResponseWriter, r *http.Request)
- func (handler *K8sApplicationRestHandlerImpl) GetTerminalSession(w http.ResponseWriter, r *http.Request)
- func (handler *K8sApplicationRestHandlerImpl) ListEvents(w http.ResponseWriter, r *http.Request)
- func (handler *K8sApplicationRestHandlerImpl) UpdateResource(w http.ResponseWriter, r *http.Request)
- type K8sApplicationRouter
- type K8sApplicationRouterImpl
- type K8sApplicationService
- type K8sApplicationServiceImpl
- func (impl *K8sApplicationServiceImpl) CreateResource(request *ResourceRequestBean) (*application.ManifestResponse, error)
- func (impl *K8sApplicationServiceImpl) DeleteResource(request *ResourceRequestBean) (*application.ManifestResponse, error)
- func (impl *K8sApplicationServiceImpl) GetPodLogs(request *ResourceRequestBean) (io.ReadCloser, error)
- func (impl *K8sApplicationServiceImpl) GetResource(request *ResourceRequestBean) (*application.ManifestResponse, error)
- func (impl *K8sApplicationServiceImpl) ListEvents(request *ResourceRequestBean) (*application.EventsResponse, error)
- func (impl *K8sApplicationServiceImpl) UpdateResource(request *ResourceRequestBean) (*application.ManifestResponse, error)
- func (impl *K8sApplicationServiceImpl) ValidateResourceRequest(appIdentifier *client.AppIdentifier, request *application.K8sRequestBean) (bool, error)
- type ResourceRequestBean
Constants ¶
View Source
const DEFAULT_CLUSTER = "default_cluster"
Variables ¶
View Source
var K8sApplicationWireSet = wire.NewSet( NewK8sApplicationRouterImpl, wire.Bind(new(K8sApplicationRouter), new(*K8sApplicationRouterImpl)), NewK8sApplicationRestHandlerImpl, wire.Bind(new(K8sApplicationRestHandler), new(*K8sApplicationRestHandlerImpl)), NewK8sApplicationServiceImpl, wire.Bind(new(K8sApplicationService), new(*K8sApplicationServiceImpl)), application2.NewK8sClientServiceImpl, wire.Bind(new(application2.K8sClientService), new(*application2.K8sClientServiceImpl)), terminal.NewTerminalSessionHandlerImpl, wire.Bind(new(terminal.TerminalSessionHandler), new(*terminal.TerminalSessionHandlerImpl)), informer.NewGlobalMapClusterNamespace, informer.NewK8sInformerFactoryImpl, wire.Bind(new(informer.K8sInformerFactory), new(*informer.K8sInformerFactoryImpl)), )
Functions ¶
This section is empty.
Types ¶
type K8sApplicationRestHandler ¶
type K8sApplicationRestHandler interface { GetResource(w http.ResponseWriter, r *http.Request) CreateResource(w http.ResponseWriter, r *http.Request) UpdateResource(w http.ResponseWriter, r *http.Request) DeleteResource(w http.ResponseWriter, r *http.Request) ListEvents(w http.ResponseWriter, r *http.Request) GetPodLogs(w http.ResponseWriter, r *http.Request) GetTerminalSession(w http.ResponseWriter, r *http.Request) }
type K8sApplicationRestHandlerImpl ¶
type K8sApplicationRestHandlerImpl struct {
// contains filtered or unexported fields
}
func NewK8sApplicationRestHandlerImpl ¶
func NewK8sApplicationRestHandlerImpl(logger *zap.SugaredLogger, k8sApplicationService K8sApplicationService, pump connector.Pump, terminalSessionHandler terminal.TerminalSessionHandler, enforcer casbin.Enforcer, enforcerUtil rbac.EnforcerUtilHelm, clusterService cluster.ClusterService, helmAppService client.HelmAppService) *K8sApplicationRestHandlerImpl
func (*K8sApplicationRestHandlerImpl) CreateResource ¶
func (handler *K8sApplicationRestHandlerImpl) CreateResource(w http.ResponseWriter, r *http.Request)
func (*K8sApplicationRestHandlerImpl) DeleteResource ¶
func (handler *K8sApplicationRestHandlerImpl) DeleteResource(w http.ResponseWriter, r *http.Request)
func (*K8sApplicationRestHandlerImpl) GetPodLogs ¶
func (handler *K8sApplicationRestHandlerImpl) GetPodLogs(w http.ResponseWriter, r *http.Request)
func (*K8sApplicationRestHandlerImpl) GetResource ¶
func (handler *K8sApplicationRestHandlerImpl) GetResource(w http.ResponseWriter, r *http.Request)
func (*K8sApplicationRestHandlerImpl) GetTerminalSession ¶
func (handler *K8sApplicationRestHandlerImpl) GetTerminalSession(w http.ResponseWriter, r *http.Request)
func (*K8sApplicationRestHandlerImpl) ListEvents ¶
func (handler *K8sApplicationRestHandlerImpl) ListEvents(w http.ResponseWriter, r *http.Request)
func (*K8sApplicationRestHandlerImpl) UpdateResource ¶
func (handler *K8sApplicationRestHandlerImpl) UpdateResource(w http.ResponseWriter, r *http.Request)
type K8sApplicationRouter ¶
type K8sApplicationRouterImpl ¶
type K8sApplicationRouterImpl struct {
// contains filtered or unexported fields
}
func NewK8sApplicationRouterImpl ¶
func NewK8sApplicationRouterImpl(k8sApplicationRestHandler K8sApplicationRestHandler) *K8sApplicationRouterImpl
func (*K8sApplicationRouterImpl) InitK8sApplicationRouter ¶
func (impl *K8sApplicationRouterImpl) InitK8sApplicationRouter(k8sAppRouter *mux.Router)
type K8sApplicationService ¶
type K8sApplicationService interface { GetResource(request *ResourceRequestBean) (resp *application.ManifestResponse, err error) CreateResource(request *ResourceRequestBean) (resp *application.ManifestResponse, err error) UpdateResource(request *ResourceRequestBean) (resp *application.ManifestResponse, err error) DeleteResource(request *ResourceRequestBean) (resp *application.ManifestResponse, err error) ListEvents(request *ResourceRequestBean) (*application.EventsResponse, error) GetPodLogs(request *ResourceRequestBean) (io.ReadCloser, error) ValidateResourceRequest(appIdentifier *client.AppIdentifier, request *application.K8sRequestBean) (bool, error) }
type K8sApplicationServiceImpl ¶
type K8sApplicationServiceImpl struct {
// contains filtered or unexported fields
}
func NewK8sApplicationServiceImpl ¶
func NewK8sApplicationServiceImpl(Logger *zap.SugaredLogger, clusterService cluster.ClusterService, pump connector.Pump, k8sClientService application.K8sClientService, helmAppService client.HelmAppService) *K8sApplicationServiceImpl
func (*K8sApplicationServiceImpl) CreateResource ¶
func (impl *K8sApplicationServiceImpl) CreateResource(request *ResourceRequestBean) (*application.ManifestResponse, error)
func (*K8sApplicationServiceImpl) DeleteResource ¶
func (impl *K8sApplicationServiceImpl) DeleteResource(request *ResourceRequestBean) (*application.ManifestResponse, error)
func (*K8sApplicationServiceImpl) GetPodLogs ¶
func (impl *K8sApplicationServiceImpl) GetPodLogs(request *ResourceRequestBean) (io.ReadCloser, error)
func (*K8sApplicationServiceImpl) GetResource ¶
func (impl *K8sApplicationServiceImpl) GetResource(request *ResourceRequestBean) (*application.ManifestResponse, error)
func (*K8sApplicationServiceImpl) ListEvents ¶
func (impl *K8sApplicationServiceImpl) ListEvents(request *ResourceRequestBean) (*application.EventsResponse, error)
func (*K8sApplicationServiceImpl) UpdateResource ¶
func (impl *K8sApplicationServiceImpl) UpdateResource(request *ResourceRequestBean) (*application.ManifestResponse, error)
func (*K8sApplicationServiceImpl) ValidateResourceRequest ¶
func (impl *K8sApplicationServiceImpl) ValidateResourceRequest(appIdentifier *client.AppIdentifier, request *application.K8sRequestBean) (bool, error)
type ResourceRequestBean ¶
type ResourceRequestBean struct { AppId string `json:"appId"` AppIdentifier *client.AppIdentifier `json:"-"` K8sRequest *application.K8sRequestBean `json:"k8sRequest"` }
Click to show internal directories.
Click to hide internal directories.