v1alpha1

package
v0.0.0-...-05d506c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BanyanNamespace = "banyan"
	BanyanGroup     = "banyan.argonauts.dev"
	BanyanVersion   = "v1alpha1"

	DomainKind     = "Domain"
	DomainSingular = "domain"
	DomainPlural   = "domains"
	DomainListKind = "DomainList"
	DomainFullName = DomainPlural + "." + BanyanGroup
)

Variables

View Source
var (
	// SchemeBuilder initializes a scheme builder
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme is a global function that registers this API group & version to a scheme
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var DomainCRD = &apiextensionsv1beta1.CustomResourceDefinition{
	TypeMeta: metav1.TypeMeta{
		Kind:       DomainKind,
		APIVersion: BanyanVersion,
	},
	ObjectMeta: metav1.ObjectMeta{
		Name: DomainFullName,
	},
	Spec: apiextensionsv1beta1.CustomResourceDefinitionSpec{
		Group:   BanyanGroup,
		Version: BanyanVersion,
		Names: apiextensionsv1beta1.CustomResourceDefinitionNames{
			Singular:   DomainSingular,
			Plural:     DomainPlural,
			Kind:       DomainKind,
			ListKind:   DomainListKind,
			Categories: []string{"banyan"},
		},
		Scope: apiextensionsv1beta1.NamespaceScoped,
		Validation: &apiextensionsv1beta1.CustomResourceValidation{
			OpenAPIV3Schema: &apiextensionsv1beta1.JSONSchemaProps{
				Type: "object",
				Properties: map[string]apiextensionsv1beta1.JSONSchemaProps{
					"apiVersion": apiextensionsv1beta1.JSONSchemaProps{
						Type: "string",
					},
					"kind": apiextensionsv1beta1.JSONSchemaProps{
						Type: "string",
					},
					"metadata": apiextensionsv1beta1.JSONSchemaProps{
						Type: "object",
					},
					"spec": apiextensionsv1beta1.JSONSchemaProps{
						Type: "object",
						Properties: map[string]apiextensionsv1beta1.JSONSchemaProps{
							"Name": {
								Type:    "string",
								Pattern: "^[a-zA-Z0-9.-]*$",
							},
							"AutoRenew": {
								Type: "boolean",
							},
							"DurationInYears": {
								Type: "integer",
							},
							"AdminContact": {
								Type: "object",
								Properties: map[string]apiextensionsv1beta1.JSONSchemaProps{
									"ContactType": {
										Type: "string",
										Enum: []apiextensionsv1beta1.JSON{
											{
												Raw: []byte(`"person"`),
											},
											{
												Raw: []byte(`"organization"`),
											},
										},
									},
									"FirstName": {
										Type: "string",
									},
									"LastName": {
										Type: "string",
									},
									"AddressLine1": {
										Type: "string",
									},
									"AddressLine2": {
										Type: "string",
									},
									"City": {
										Type: "string",
									},
									"CountryCode": {
										Type: "string",
									},
									"Email": {
										Type: "string",
									},
									"Fax": {
										Type: "string",
									},
									"OrganizationName": {
										Type: "string",
									},
									"PhoneNumber": {
										Type: "string",
									},
									"State": {
										Type: "string",
									},
									"ZipCode": {
										Type: "string",
									},
								},
							},
							"PrivacyProtectAdminContact": {
								Type: "boolean",
							},
							"RegistrantContact": {
								Type: "object",
								Properties: map[string]apiextensionsv1beta1.JSONSchemaProps{
									"ContactType": {
										Type: "string",
										Enum: []apiextensionsv1beta1.JSON{
											{
												Raw: []byte(`"person"`),
											},
											{
												Raw: []byte(`"organization"`),
											},
										},
									},
									"FirstName": {
										Type: "string",
									},
									"LastName": {
										Type: "string",
									},
									"AddressLine1": {
										Type: "string",
									},
									"AddressLine2": {
										Type: "string",
									},
									"City": {
										Type: "string",
									},
									"CountryCode": {
										Type: "string",
									},
									"Email": {
										Type: "string",
									},
									"Fax": {
										Type: "string",
									},
									"OrganizationName": {
										Type: "string",
									},
									"PhoneNumber": {
										Type: "string",
									},
									"State": {
										Type: "string",
									},
									"ZipCode": {
										Type: "string",
									},
								},
							},
							"PrivacyProtectRegistrantContact": {
								Type: "boolean",
							},
							"TechContact": {
								Type: "object",
								Properties: map[string]apiextensionsv1beta1.JSONSchemaProps{
									"ContactType": {
										Type: "string",
										Enum: []apiextensionsv1beta1.JSON{
											{
												Raw: []byte(`"person"`),
											},
											{
												Raw: []byte(`"organization"`),
											},
										},
									},
									"FirstName": {
										Type: "string",
									},
									"LastName": {
										Type: "string",
									},
									"AddressLine1": {
										Type: "string",
									},
									"AddressLine2": {
										Type: "string",
									},
									"City": {
										Type: "string",
									},
									"CountryCode": {
										Type: "string",
									},
									"Email": {
										Type: "string",
									},
									"Fax": {
										Type: "string",
									},
									"OrganizationName": {
										Type: "string",
									},
									"PhoneNumber": {
										Type: "string",
									},
									"State": {
										Type: "string",
									},
									"ZipCode": {
										Type: "string",
									},
								},
							},
							"PrivacyProtectTechContact": {
								Type: "boolean",
							},
						},
						Required: []string{"Name"},
					},
					"status": apiextensionsv1beta1.JSONSchemaProps{
						Type: "object",
					},
				},
			},
		},
		Subresources: &apiextensionsv1beta1.CustomResourceSubresources{
			Status: &apiextensionsv1beta1.CustomResourceSubresourceStatus{},
		},
		PreserveUnknownFields: &domainPreserveUnknownFields,
	},
}

DomainCRD holds the representation and validation options for the Domain CustomResourceDefinition

View Source
var SchemeGroupVersion = schema.GroupVersion{Group: banyan.GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type ContactDetail

type ContactDetail struct {
	// Indicates whether the contact is a person, company, association, or public
	// organization.
	ContactType  string `json:"contactType"`
	FirstName    string `json:"firstName"`
	LastName     string `json:"lastName"`
	AddressLine1 string `json:"addressLine1"`
	AddressLine2 string `json:"addressLine2,omitempty"`
	City         string `json:"city"`
	CountryCode  string `json:"countryCode"`
	Email        string `json:"email"`
	// ExtraParams []*ExtraParam `type:"list"`
	Fax string `json:"fax"`
	// Name of the organization for contact types other than PERSON.
	OrganizationName string `json:"organizationalName,omitempty"`
	PhoneNumber      string `json:"phoneNumber"`
	State            string `json:"state"`
	ZipCode          string `json:"zipCode"`
}

ContactDetail holds contact information for domains

func (*ContactDetail) DeepCopy

func (in *ContactDetail) DeepCopy() *ContactDetail

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContactDetail.

func (*ContactDetail) DeepCopyInto

func (in *ContactDetail) DeepCopyInto(out *ContactDetail)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Domain

type Domain struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   DomainSpec   `json:"spec"`
	Status DomainStatus `json:"status"`
}

Domain describes a DNS domain and is used when interacting with public registrars

func (*Domain) DeepCopy

func (in *Domain) DeepCopy() *Domain

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Domain.

func (*Domain) DeepCopyInto

func (in *Domain) DeepCopyInto(out *Domain)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Domain) DeepCopyObject

func (in *Domain) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (Domain) GetKind

func (d Domain) GetKind() string

GetKind returns the object kind for a Domain

func (Domain) GetName

func (d Domain) GetName() string

GetName returns the domain name string

type DomainList

type DomainList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []Domain `json:"items"`
}

DomainList is a list of Domain resources

func (*DomainList) DeepCopy

func (in *DomainList) DeepCopy() *DomainList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DomainList.

func (*DomainList) DeepCopyInto

func (in *DomainList) DeepCopyInto(out *DomainList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DomainList) DeepCopyObject

func (in *DomainList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type DomainSpec

type DomainSpec struct {
	Name                            string        `json:"name"`
	AutoRenew                       bool          `json:"autoRenew"`
	DurationInYears                 int64         `json:"durationInYears"`
	AdminContact                    ContactDetail `json:"adminContact"`
	PrivacyProtectAdminContact      bool          `json:"privacyProtectAdminContact"`
	RegistrantContact               ContactDetail `json:"registrantContact"`
	PrivacyProtectRegistrantContact bool          `json:"privacyProtectRegistrantContact"`
	TechContact                     ContactDetail `json:"techContact"`
	PrivacyProtectTechContact       bool          `json:"privacyProtectTechContact"`
}

DomainSpec is the spec for a Domain resource

func (*DomainSpec) DeepCopy

func (in *DomainSpec) DeepCopy() *DomainSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DomainSpec.

func (*DomainSpec) DeepCopyInto

func (in *DomainSpec) DeepCopyInto(out *DomainSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DomainStatus

type DomainStatus struct {
	StatusList        []string      `json:"statusList"`
	Nameservers       []Nameserver  `json:"nameservers"`
	RegistrarName     string        `json:"registrarName"`
	RegistrarURL      string        `json:"registrarURL"`
	Reseller          string        `json:"reseller"`
	CreationDate      metav1.Time   `json:"creationTimestamp"`
	ExpirationDate    metav1.Time   `json:"expirationTimestamp"`
	UpdatedDate       metav1.Time   `json:"updatedTimestamp"`
	AutoRenew         bool          `json:"autoRenew"`
	AbuseContactEmail string        `json:"abuseContactEmail"`
	AbuseContactPhone string        `json:"abuseContactPhone"`
	AdminContact      ContactDetail `json:"adminContact"`
	AdminPrivacy      bool          `json:"adminPrivacy"`
	RegistrantContact ContactDetail `json:"registrantContact"`
	RegistrantPrivacy bool          `json:"registrantPrivacy"`
	TechContact       ContactDetail `json:"techContact"`
	TechPrivacy       bool          `json:"techPrivacy"`
	WhoIsServer       string        `json:"whoIsServer"`
}

DomainStatus describes the status of a Domain resource

func (*DomainStatus) DeepCopy

func (in *DomainStatus) DeepCopy() *DomainStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DomainStatus.

func (*DomainStatus) DeepCopyInto

func (in *DomainStatus) DeepCopyInto(out *DomainStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Nameserver

type Nameserver struct {
	Name    string   `json:"name"`
	GlueIps []string `json:"glueIps"`
}

Nameserver holds information about name servers

func (*Nameserver) DeepCopy

func (in *Nameserver) DeepCopy() *Nameserver

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Nameserver.

func (*Nameserver) DeepCopyInto

func (in *Nameserver) DeepCopyInto(out *Nameserver)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL