<commit_before>package webhook

import (
	"github.com/aetrion/dnsimple-go/dnsimple"
)

func switchEvent(name string, payload []byte) (Event, error) {
	var event Event

	switch name {
	case // account
		"account.update",                  // TODO
		"account.billing_settings_update", // TODO
		"account.payment_details_update",  // TODO
		"account.add_user",                // TODO
		"account.remove_user":             // TODO
		event = &AccountEvent{}
	case // contact
		"contact.create",
		"contact.update",
		"contact.delete":
		event = &ContactEvent{}
	case // domain
		"domain.auto_renewal_enable",
		"domain.auto_renewal_disable",
		"domain.create",
		"domain.delete",
		"domain.register",
		"domain.renew",
		"domain.delegation_change",  // TODO
		"domain.registrant_change",  // TODO
		"domain.resolution_enable",  // TODO
		"domain.resolution_disable", // TODO
		"domain.token_reset",
		"domain.transfer": // TODO
		event = &DomainEvent{}
	case // webhook
		"webhook.create",
		"webhook.delete":
		event = &WebhookEvent{}
	case // zone record
		"record.create",
		"record.update",
		"record.delete":
		event = &ZoneRecordEvent{}
	default:
		event = &GenericEvent{}
	}

	return event, event.parse(payload)<commit_msg>webhook: Add placeholder for not implemented webhooks<commit_after>package webhook

import (
	"github.com/aetrion/dnsimple-go/dnsimple"
)

func switchEvent(name string, payload []byte) (Event, error) {
	var event Event

	switch name {
	case // account
		"account.update",                  // TODO
		"account.billing_settings_update", // TODO
		"account.payment_details_update",  // TODO
		"account.add_user",                // TODO
		"account.remove_user":             // TODO
		event = &AccountEvent{}
	//case // certificate
	//	"certificate.issue",
	//	"certificate.reissue",
	//	"certificate.remove_private_key":
	//	event = &CertificateEvent{}
	case // contact
		"contact.create",
		"contact.update",
		"contact.delete":
		event = &ContactEvent{}
	//case // dnssec
	//	"dnssec.create",
	//	"dnssec.delete":
	//	event = &DNSSEC{}
	case // domain
		"domain.auto_renewal_enable",
		"domain.auto_renewal_disable",
		"domain.create",
		"domain.delete",
		"domain.register",
		"domain.renew",
		"domain.delegation_change",  // TODO
		"domain.registrant_change",  // TODO
		"domain.resolution_enable",  // TODO
		"domain.resolution_disable", // TODO
		"domain.token_reset",
		"domain.transfer": // TODO
		event = &DomainEvent{}
	//case // email forward
	//	"email_forward.create",
	//	"email_forward.delete":
	//	event = &EmailForwardEvent{}
	//case // name servers
	//	"name_server.deregister",
	//	"name_server.register":
	//	event = &NameServerEvent{}
	//case // push
	//	"push.accept",
	//	"push.initiate",
	//	"push.reject":
	//	event = &PushEvent{}
	case // zone record
		"record.create",
		"record.update",
		"record.delete":
		event = &ZoneRecordEvent{}
	//case // secondary dns
	//	"secondary_dns.create",
	//	"secondary_dns.update",
	//	"secondary_dns.delete":
	//	event = &SecondaryDNSEvent{}
	//case // subscription
	//	"subscription.migrate",
	//	"subscription.subscribe",
	//	"subscription.unsubscribe":
	//	event = &SubscriptionEvent{}
	//case // template
	//	"template.create",
	//	"template.delete",
	//	"template.update":
	//	event = &TemplateEvent{}
	//case // template record
	//	"template_record.create",
	//	"template_record.delete":
	//	event = &TemplateRecordEvent{}
	//case // vanity
	//	"vanity.disable",
	//	"vanity.enable":
	//	event = &VanityEvent{}
	case // webhook
		"webhook.create",
		"webhook.delete":
		event = &WebhookEvent{}
	//case // whois privacy
	//	"whois_privacy.disable",
	//	"whois_privacy.enable",
	//	"whois_privacy.renew":
	//	event = &WhoisPrivacyEvent{}
	//case // zone
	//	"zone.create",
	//	"zone.delete":
	//	event = &ZoneEvent{}
	default:
		event = &GenericEvent{}
	}

	return event, event.parse(payload)
{'fraction_non_alphanumeric': 0.17148014440433212, 'fraction_numerical': 0.0, 'mean_word_length': 3.0831578947368423, 'pattern_counts': {'":': 22, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7118831', 'n_tokens_mistral': 1435, 'n_tokens_neox': 1352, 'n_words': 244}