You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: event.go
    path of file: ./repos/kubewatch/pkg/event
    
    the code of the file until where you have to start completion: /*
Copyright 2016 Skippbox, Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the Lice
    
func New(obj interface{}, action string) Event {
	var namespace, kind, component, host, reason, status, name string

	objectMeta := utils.GetObjectMetaData(obj)
	namespace = objectMeta.Namespace
	name = objectMeta.Name
	reason = action
	status = m[action]

	switch object := obj.(type) {
	case *ext_v1beta1.DaemonSet:
		kind = "daemon set"
	case *apps_v1.Deployment:
		kind = "deployment"
	case *batch_v1.Job:
		kind = "job"
	case *api_v1.Namespace:
		kind = "namespace"
	case *ext_v1beta1.Ingress:
		kind = "ingress"
	case *api_v1.PersistentVolume:
		kind = "persistent volume"
	case *api_v1.Pod:
		kind = "pod"
		host = object.Spec.NodeName
	case *api_v1.ReplicationController:
		kind = "replication controller"
	case *ext_v1beta1.ReplicaSet:
		kind = "replica set"
	case *api_v1.Service:
		kind = "service"
		component = string(object.Spec.Type)
	case *api_v1.Secret:
		kind = "secret"
	case *api_v1.ConfigMap:
		kind = "configmap"
	case *api_v1.Node:
		kind = "node"
	case *rbac_v1beta1.ClusterRole:
		kind = "cluster role"
	case *api_v1.ServiceAccount:
		kind = "service account"
	case Event:
		name = object.Name
		kind = object.Kind
		namespace = object.Namespace
	}

	kbEvent := Event{
		Namespace: namespace,
		Kind:      kind,
		Component: component,
		Host:      host,
		Reason:    reason,
		Status:    status,
		Name:      name,
	}
	return kbEvent
}