domain

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: Apache-2.0 Imports: 2 Imported by: 11

Documentation

Overview

Includes several types that represent common domain-related concepts, such as FQDN for representing fully qualified domain names.

These types can be used to store and manipulate domain-related data in Go programs.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FQDN

type FQDN struct {
	// Name is the domain name part of the FQDN.
	// It should be a valid domain name, such as "example" or "subdomain.example.com".
	Name string `json:"name"`
}

FQDN represents a Fully Qualified Domain Name.

Example
fqdn := FQDN{
	Name: "foo.example.com",
}

fmt.Println(fqdn.Name == "foo.example.com")
Output:

true

func (FQDN) AssetType

func (f FQDN) AssetType() model.AssetType

AssetType returns the asset type.

func (FQDN) JSON

func (f FQDN) JSON() ([]byte, error)

JSON returns the JSON encoding of the struct.

Jump to

Keyboard shortcuts

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