 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- func ServerResourceForGroupVersionKind(discoveryClient discovery.DiscoveryInterface, gvk schema.GroupVersionKind) (*metav1.APIResource, error)
- type ApplyResourcesRequest
- type ApplyResourcesResponse
- type EventsResponse
- type GetAllApiResourcesResponse
- type HeaderAdder
- type K8sApiResource
- type K8sClientService
- type K8sClientServiceImpl
- func (impl K8sClientServiceImpl) ApplyResource(ctx context.Context, restConfig *rest.Config, request *K8sRequestBean, ...) (*ManifestResponse, error)
- func (impl K8sClientServiceImpl) CreateResource(ctx context.Context, restConfig *rest.Config, request *K8sRequestBean, ...) (*ManifestResponse, error)
- func (impl K8sClientServiceImpl) DeleteResource(ctx context.Context, restConfig *rest.Config, request *K8sRequestBean) (*ManifestResponse, error)
- func (impl K8sClientServiceImpl) GetApiResources(restConfig *rest.Config, includeOnlyVerb string) ([]*K8sApiResource, error)
- func (impl K8sClientServiceImpl) GetPodLogs(ctx context.Context, restConfig *rest.Config, request *K8sRequestBean) (io.ReadCloser, error)
- func (impl K8sClientServiceImpl) GetResource(ctx context.Context, restConfig *rest.Config, request *K8sRequestBean) (*ManifestResponse, error)
- func (impl K8sClientServiceImpl) GetResourceIf(restConfig *rest.Config, request *K8sRequestBean) (resourceIf dynamic.NamespaceableResourceInterface, namespaced bool, err error)
- func (impl K8sClientServiceImpl) GetResourceIfWithAcceptHeader(restConfig *rest.Config, request *K8sRequestBean) (resourceIf dynamic.NamespaceableResourceInterface, namespaced bool, err error)
- func (impl K8sClientServiceImpl) GetResourceList(ctx context.Context, restConfig *rest.Config, request *K8sRequestBean) (*ResourceListResponse, bool, error)
- func (impl K8sClientServiceImpl) ListEvents(ctx context.Context, restConfig *rest.Config, request *K8sRequestBean) (*EventsResponse, error)
- func (impl K8sClientServiceImpl) PatchResource(ctx context.Context, restConfig *rest.Config, pt types.PatchType, ...) (*ManifestResponse, error)
- func (impl K8sClientServiceImpl) UpdateResource(ctx context.Context, restConfig *rest.Config, request *K8sRequestBean) (*ManifestResponse, error)
 
- type K8sRequestBean
- type ManifestResponse
- type PodLogsRequest
- type ResourceIdentifier
- type ResourceListResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ServerResourceForGroupVersionKind ¶
func ServerResourceForGroupVersionKind(discoveryClient discovery.DiscoveryInterface, gvk schema.GroupVersionKind) (*metav1.APIResource, error)
Types ¶
type ApplyResourcesRequest ¶ added in v0.6.11
type ApplyResourcesResponse ¶ added in v0.6.11
type EventsResponse ¶
type GetAllApiResourcesResponse ¶ added in v0.6.11
type GetAllApiResourcesResponse struct {
	ApiResources []*K8sApiResource `json:"apiResources"`
	AllowedAll   bool              `json:"allowedAll"`
}
    type HeaderAdder ¶ added in v0.6.11
type HeaderAdder struct {
	// contains filtered or unexported fields
}
    type K8sApiResource ¶ added in v0.6.11
type K8sApiResource struct {
	Gvk        schema.GroupVersionKind `json:"gvk"`
	Namespaced bool                    `json:"namespaced"`
}
    type K8sClientService ¶
type K8sClientService interface {
	GetResource(ctx context.Context, restConfig *rest.Config, request *K8sRequestBean) (resp *ManifestResponse, err error)
	CreateResource(ctx context.Context, restConfig *rest.Config, request *K8sRequestBean, manifest string) (resp *ManifestResponse, err error)
	UpdateResource(ctx context.Context, restConfig *rest.Config, request *K8sRequestBean) (resp *ManifestResponse, err error)
	DeleteResource(ctx context.Context, restConfig *rest.Config, request *K8sRequestBean) (resp *ManifestResponse, err error)
	ListEvents(ctx context.Context, restConfig *rest.Config, request *K8sRequestBean) (*EventsResponse, error)
	GetPodLogs(ctx context.Context, restConfig *rest.Config, request *K8sRequestBean) (io.ReadCloser, error)
	GetApiResources(restConfig *rest.Config, includeOnlyVerb string) ([]*K8sApiResource, error)
	GetResourceList(ctx context.Context, restConfig *rest.Config, request *K8sRequestBean) (*ResourceListResponse, bool, error)
	ApplyResource(ctx context.Context, restConfig *rest.Config, request *K8sRequestBean, manifest string) (*ManifestResponse, error)
	PatchResource(ctx context.Context, restConfig *rest.Config, pt types.PatchType, request *K8sRequestBean, manifest string) (*ManifestResponse, error)
}
    type K8sClientServiceImpl ¶
type K8sClientServiceImpl struct {
	// contains filtered or unexported fields
}
    func NewK8sClientServiceImpl ¶
func NewK8sClientServiceImpl(logger *zap.SugaredLogger, clusterRepository repository.ClusterRepository) *K8sClientServiceImpl
func (K8sClientServiceImpl) ApplyResource ¶ added in v0.6.11
func (impl K8sClientServiceImpl) ApplyResource(ctx context.Context, restConfig *rest.Config, request *K8sRequestBean, manifest string) (*ManifestResponse, error)
func (K8sClientServiceImpl) CreateResource ¶
func (impl K8sClientServiceImpl) CreateResource(ctx context.Context, restConfig *rest.Config, request *K8sRequestBean, manifest string) (*ManifestResponse, error)
func (K8sClientServiceImpl) DeleteResource ¶
func (impl K8sClientServiceImpl) DeleteResource(ctx context.Context, restConfig *rest.Config, request *K8sRequestBean) (*ManifestResponse, error)
func (K8sClientServiceImpl) GetApiResources ¶ added in v0.6.11
func (impl K8sClientServiceImpl) GetApiResources(restConfig *rest.Config, includeOnlyVerb string) ([]*K8sApiResource, error)
if verb is supplied empty, that means - return all
func (K8sClientServiceImpl) GetPodLogs ¶
func (impl K8sClientServiceImpl) GetPodLogs(ctx context.Context, restConfig *rest.Config, request *K8sRequestBean) (io.ReadCloser, error)
func (K8sClientServiceImpl) GetResource ¶
func (impl K8sClientServiceImpl) GetResource(ctx context.Context, restConfig *rest.Config, request *K8sRequestBean) (*ManifestResponse, error)
func (K8sClientServiceImpl) GetResourceIf ¶
func (impl K8sClientServiceImpl) GetResourceIf(restConfig *rest.Config, request *K8sRequestBean) (resourceIf dynamic.NamespaceableResourceInterface, namespaced bool, err error)
func (K8sClientServiceImpl) GetResourceIfWithAcceptHeader ¶ added in v0.6.11
func (impl K8sClientServiceImpl) GetResourceIfWithAcceptHeader(restConfig *rest.Config, request *K8sRequestBean) (resourceIf dynamic.NamespaceableResourceInterface, namespaced bool, err error)
func (K8sClientServiceImpl) GetResourceList ¶ added in v0.6.11
func (impl K8sClientServiceImpl) GetResourceList(ctx context.Context, restConfig *rest.Config, request *K8sRequestBean) (*ResourceListResponse, bool, error)
func (K8sClientServiceImpl) ListEvents ¶
func (impl K8sClientServiceImpl) ListEvents(ctx context.Context, restConfig *rest.Config, request *K8sRequestBean) (*EventsResponse, error)
func (K8sClientServiceImpl) PatchResource ¶ added in v0.6.17
func (impl K8sClientServiceImpl) PatchResource(ctx context.Context, restConfig *rest.Config, pt types.PatchType, request *K8sRequestBean, manifest string) (*ManifestResponse, error)
func (K8sClientServiceImpl) UpdateResource ¶
func (impl K8sClientServiceImpl) UpdateResource(ctx context.Context, restConfig *rest.Config, request *K8sRequestBean) (*ManifestResponse, error)
type K8sRequestBean ¶
type K8sRequestBean struct {
	ResourceIdentifier ResourceIdentifier `json:"resourceIdentifier"`
	Patch              string             `json:"patch,omitempty"`
	PodLogsRequest     PodLogsRequest     `json:"podLogsRequest,omitempty"`
}
    type ManifestResponse ¶
type ManifestResponse struct {
	Manifest unstructured.Unstructured `json:"manifest,omitempty"`
}
    type PodLogsRequest ¶
type ResourceIdentifier ¶
type ResourceIdentifier struct {
	Name             string                  `json:"name"` //pod name for logs request
	Namespace        string                  `json:"namespace"`
	GroupVersionKind schema.GroupVersionKind `json:"groupVersionKind"`
}
    type ResourceListResponse ¶ added in v0.6.11
type ResourceListResponse struct {
	Resources unstructured.UnstructuredList `json:"resources,omitempty"`
}
     Click to show internal directories. 
   Click to hide internal directories.