From 5de105cb79cf7e98ebf404cf341e73fdd6e72c26 Mon Sep 17 00:00:00 2001 From: howieyuen Date: Thu, 15 Dec 2022 15:12:01 +0800 Subject: [PATCH] chore: delete unused package pkg/types (#197) --- pkg/types/constant.go | 25 ------------------------- pkg/types/errors.go | 7 ------- pkg/types/resource.go | 21 --------------------- 3 files changed, 53 deletions(-) delete mode 100644 pkg/types/constant.go delete mode 100644 pkg/types/errors.go delete mode 100644 pkg/types/resource.go diff --git a/pkg/types/constant.go b/pkg/types/constant.go deleted file mode 100644 index 9a64cb4d..00000000 --- a/pkg/types/constant.go +++ /dev/null @@ -1,25 +0,0 @@ -package types - -type ResourceType string - -const ( - K8SObject = ResourceType("K8SObject") -) - -type ResourceAction string - -const ( - ResourceGet = ResourceAction("Get") - ResourceCreate = ResourceAction("Create") - ResourceApply = ResourceAction("Apply") - ResourceDelete = ResourceAction("Delete") - ResourceAnnotate = ResourceAction("Annotate") - ResourceDescribe = ResourceAction("Describe") - ResourceLabel = ResourceAction("Label") - ResourcePatch = ResourceAction("Patch") - ResourceDiff = ResourceAction("Diff") -) - -const ( - EntranceFileName = "main.k" -) diff --git a/pkg/types/errors.go b/pkg/types/errors.go deleted file mode 100644 index 7174622d..00000000 --- a/pkg/types/errors.go +++ /dev/null @@ -1,7 +0,0 @@ -package types - -type UnsupportedErr struct{} - -func (e *UnsupportedErr) Error() string { - return "unsupported" -} diff --git a/pkg/types/resource.go b/pkg/types/resource.go deleted file mode 100644 index 3de1f140..00000000 --- a/pkg/types/resource.go +++ /dev/null @@ -1,21 +0,0 @@ -package types - -type K8SResource string - -const ( - K8sPod = K8SResource("Pod") - K8sDeployment = K8SResource("Deployment") - K8sService = K8SResource("Service") - K8sDaemonSet = K8SResource("DaemonSet") - K8sReplicaSet = K8SResource("ReplicaSet") - K8sStatefulSet = K8SResource("StatefulSet") - K8sHorizontalPodAutoscaler = K8SResource("HorizontalPodAutoscaler") - K8sJob = K8SResource("HorizontalPodAutoscaler") - K8sNode = K8SResource("Node") - K8sNamespace = K8SResource("Namespace") - K8sNetworkPolicy = K8SResource("NetworkPolicy") - K8sRoleBinding = K8SResource("RoleBinding") - K8sClusterRole = K8SResource("ClusterRole") - K8sClusterRoleBinding = K8SResource("ClusterRoleBinding") - K8sServiceAccount = K8SResource("ServiceAccount") -)