Documentation ¶
Index ¶
- func GetAuditPodNamespace() string
- func GetAuditServiceAccount() string
- func GetResources() []string
- func RegisterTypes(scheme *runtime.Scheme)
- type CustomRepo
- func (cr *CustomRepo) AddAndCommit(username string, email string, message string) error
- func (cr *CustomRepo) FilterCommits(author string, since time.Time, until time.Time, resource string, ...) ([]object.Commit, error)
- func (cr *CustomRepo) HandleEvent(event auditv1.Event) error
- func (cr *CustomRepo) HandleEventList(jsonstring []byte) error
- func (cr *CustomRepo) HashToCommit(commitSha string) (*object.Commit, error)
- func (cr *CustomRepo) RemoveTag(tag string) (string, error)
- func (cr *CustomRepo) RollbackRepo(targetCommit *object.Commit) (string, error)
- func (cr *CustomRepo) TagCommit(commitSha string, tag string, tagger *object.Signature) (string, error)
- func (cr *CustomRepo) TagToCommit(tag string) (*object.Commit, error)
- type K8sClient
- func (k *K8sClient) CreateOrUpdateResource(resource *unstructured.Unstructured) error
- func (k *K8sClient) DeleteResource(resource *unstructured.Unstructured) error
- func (k *K8sClient) GetResource(resource *unstructured.Unstructured, namespace string, name string) (*unstructured.Unstructured, error)
- func (k *K8sClient) ListResource(resourceList *unstructured.UnstructuredList) (*unstructured.UnstructuredList, error)
- type StorageModeType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAuditPodNamespace ¶
func GetAuditPodNamespace() string
func GetAuditServiceAccount ¶
func GetAuditServiceAccount() string
func GetResources ¶
func GetResources() []string
func RegisterTypes ¶
Types ¶
type CustomRepo ¶
type CustomRepo struct { Repo *git.Repository K8s *K8sClient RollbackMode bool ServiceAccount string Fs billy.Filesystem Mutex sync.Mutex }
func SetupRepo ¶
func SetupRepo(k8s *K8sClient, mode StorageModeType, dir string) (*CustomRepo, error)
func (*CustomRepo) AddAndCommit ¶
func (cr *CustomRepo) AddAndCommit(username string, email string, message string) error
func (*CustomRepo) FilterCommits ¶
func (*CustomRepo) HandleEvent ¶
func (cr *CustomRepo) HandleEvent(event auditv1.Event) error
func (*CustomRepo) HandleEventList ¶
func (cr *CustomRepo) HandleEventList(jsonstring []byte) error
func (*CustomRepo) HashToCommit ¶
func (cr *CustomRepo) HashToCommit(commitSha string) (*object.Commit, error)
func (*CustomRepo) RollbackRepo ¶
func (cr *CustomRepo) RollbackRepo(targetCommit *object.Commit) (string, error)
func (*CustomRepo) TagToCommit ¶
func (cr *CustomRepo) TagToCommit(tag string) (*object.Commit, error)
type K8sClient ¶
func NewKubernetes ¶
func (*K8sClient) CreateOrUpdateResource ¶
func (k *K8sClient) CreateOrUpdateResource(resource *unstructured.Unstructured) error
func (*K8sClient) DeleteResource ¶
func (k *K8sClient) DeleteResource(resource *unstructured.Unstructured) error
func (*K8sClient) GetResource ¶
func (k *K8sClient) GetResource(resource *unstructured.Unstructured, namespace string, name string) (*unstructured.Unstructured, error)
func (*K8sClient) ListResource ¶
func (k *K8sClient) ListResource(resourceList *unstructured.UnstructuredList) (*unstructured.UnstructuredList, error)
type StorageModeType ¶
type StorageModeType string
const ( StorageModeDisk StorageModeType = "Disk" StorageModeInMemory StorageModeType = "InMemory" )
Click to show internal directories.
Click to hide internal directories.