models

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2025 License: BSD-2-Clause Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SliceHasResult

func SliceHasResult(s []*Result, r *Result) bool

Types

type Result

type Result struct {
	ID uint `json:"id" gorm:"primarykey"`

	TestId       string    `json:"test_id"`
	FQDN         string    `json:"fqdn" gorm:"index:idx_exists"`
	RType        string    `json:"result_type"`
	IPv4         string    `json:"ipv4,omitempty"`
	IPv6         string    `json:"ipv6,omitempty"`
	Target       string    `json:"target,omitempty"`
	Ptr          string    `json:"ptr,omitempty"`
	Txt          string    `json:"txt,omitempty"`
	CloudProduct string    `json:"cloud_product,omitempty"`
	ProbedAt     time.Time `json:"probed_at"`

	DC bool `json:"dc"`
	GC bool `json:"gc"`

	Exists bool `json:"exists"`

	// Failed flag set if the result should be considered failed
	Failed       bool   `json:"failed" gorm:"index:idx_exists"`
	FailedReason string `json:"failed_reason,omitempty"`
}

Result is a github.com/helviojunior/enumdnsenumdns result

func (Result) Clone

func (result Result) Clone() *Result

func (Result) Equal added in v0.1.8

func (result Result) Equal(r1 Result) bool

func (Result) GetCompHash added in v0.1.8

func (result Result) GetCompHash() string

func (Result) GetHash added in v0.1.3

func (result Result) GetHash() string

func (Result) MarshalJSON

func (result Result) MarshalJSON() ([]byte, error)

Custom Marshaller for Result

func (Result) String

func (result Result) String() string

Jump to

Keyboard shortcuts

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