domain

package
v0.0.0-...-3ae7fb4 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Copyright 2024 Rangertaha. All Rights Reserved.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Copyright 2024 Rangertaha. All Rights Reserved.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Copyright 2024 Rangertaha. All Rights Reserved.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Copyright 2024 Rangertaha. All Rights Reserved.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Copyright 2024 Rangertaha. All Rights Reserved.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(name string) internal.Domain

func NewVariant

func NewVariant(algo internal.Algorithm, names ...string) internal.Domain

func Variant

func Variant(algo internal.Algorithm, names ...string) internal.Domain

Types

type Contact

type Contact struct {
	ID           string `json:"id,omitempty"`
	Name         string `json:"name,omitempty"`
	Organization string `json:"organization,omitempty"`
	Street       string `json:"street,omitempty"`
	City         string `json:"city,omitempty"`
	Province     string `json:"province,omitempty"`
	PostalCode   string `json:"postal_code,omitempty"`
	Country      string `json:"country,omitempty"`
	Phone        string `json:"phone,omitempty"`
	PhoneExt     string `json:"phone_ext,omitempty"`
	Fax          string `json:"fax,omitempty"`
	FaxExt       string `json:"fax_ext,omitempty"`
	Email        string `json:"email,omitempty"`
	ReferralURL  string `json:"referral_url,omitempty"`
}

Contact storing domain contact info

type Domain

type Domain struct {
	PreName  string `json:"prefix,omitempty"`
	Domain   string `json:"name,omitempty"`
	SufName  string `json:"suffix,omitempty"`
	FQDN     string `json:"fqdn"`
	Punycode string `json:"idn"`

	IsLive   bool                       `json:"live,omitempty"`
	Data     map[string]json.RawMessage `json:"data,omitempty"` // used for detailed JSON nested outputs
	Metadata map[string]string          `json:"-"`              // Used for simplified table based output
	// Input       string                     `json:"input,omitempty"` // Name provded by user
	Levenshtein int  `json:"ld,omitempty"`
	Involved    bool `json:"active,omitempty"`
	Cache       bool `json:"cached,omitempty"`
	// contains filtered or unexported fields
}

Domain ...

func (*Domain) Active

func (d *Domain) Active(v ...bool) bool

func (*Domain) Algorithm

func (t *Domain) Algorithm() internal.Algorithm

func (*Domain) Cached

func (d *Domain) Cached(v ...bool) bool

func (*Domain) GetData

func (t *Domain) GetData(key string) (value json.RawMessage)

func (*Domain) GetMeta

func (t *Domain) GetMeta(key string) (value string)

func (*Domain) Idn

func (d *Domain) Idn(names ...string) string

func (*Domain) Json

func (d *Domain) Json(value ...string) (j string)

func (*Domain) Ld

func (d *Domain) Ld(v ...int) int

Ld returns the Levenshtein_distance

https://en.wikipedia.org/wiki/Levenshtein_distance

func (*Domain) Live

func (d *Domain) Live(v ...bool) bool

func (*Domain) Meta

func (t *Domain) Meta() map[string]string

func (*Domain) Name

func (d *Domain) Name(labels ...string) string

func (*Domain) Prefix

func (d *Domain) Prefix(labels ...string) string

func (*Domain) Save

func (d *Domain) Save(path string) (err error)

func (*Domain) SetData

func (t *Domain) SetData(key string, value json.RawMessage)

func (*Domain) SetMeta

func (t *Domain) SetMeta(key string, value string)

func (*Domain) String

func (d *Domain) String() (n string)

func (*Domain) Suffix

func (d *Domain) Suffix(labels ...string) string

func (*Domain) Valid

func (d *Domain) Valid() bool

type URL

type URL struct {
	Address string `json:"ip,omitempty"`
}

type WhoisDomain

type WhoisDomain struct {
	ID                   string     `json:"id,omitempty"`
	Domain               string     `json:"domain,omitempty"`
	Punycode             string     `json:"punycode,omitempty"`
	Name                 string     `json:"name,omitempty"`
	Extension            string     `json:"extension,omitempty"`
	WhoisServer          string     `json:"whois_server,omitempty"`
	Status               []string   `json:"status,omitempty"`
	NameServers          []string   `json:"name_servers,omitempty"`
	DNSSec               bool       `json:"dnssec,omitempty"`
	CreatedDate          string     `json:"created_date,omitempty"`
	CreatedDateInTime    *time.Time `json:"created_date_in_time,omitempty"`
	UpdatedDate          string     `json:"updated_date,omitempty"`
	UpdatedDateInTime    *time.Time `json:"updated_date_in_time,omitempty"`
	ExpirationDate       string     `json:"expiration_date,omitempty"`
	ExpirationDateInTime *time.Time `json:"expiration_date_in_time,omitempty"`
}

Domain storing domain name info

type WhoisRecord

type WhoisRecord struct {
	Domain         *WhoisDomain `json:"domain,omitempty"`
	Registrar      *Contact     `json:"registrar,omitempty"`
	Registrant     *Contact     `json:"registrant,omitempty"`
	Administrative *Contact     `json:"administrative,omitempty"`
	Technical      *Contact     `json:"technical,omitempty"`
	Billing        *Contact     `json:"billing,omitempty"`
}

Jump to

Keyboard shortcuts

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