common

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Envelope

type Envelope struct {
	PublicIp  ResolvedIp `json:"public_ip"`
	Signature string     `json:"signature"`
}

func (*Envelope) Validate

func (env *Envelope) Validate() error

type ResolvedIp

type ResolvedIp struct {
	IpV4      string    `json:"ipv4,omitempty"`
	IpV6      string    `json:"ipv6,omitempty"`
	Host      string    `json:"host"`
	Timestamp time.Time `json:"timestamp"`
}

func NewResolvedIp

func NewResolvedIp(host string) *ResolvedIp

func (*ResolvedIp) Equals

func (resolved *ResolvedIp) Equals(ip *ResolvedIp) bool

Equals checks for equality and ignores timestamps

func (*ResolvedIp) HasIpV4

func (resolved *ResolvedIp) HasIpV4() bool

func (*ResolvedIp) HasIpV6

func (resolved *ResolvedIp) HasIpV6() bool

func (*ResolvedIp) Hash

func (resolved *ResolvedIp) Hash() string

func (*ResolvedIp) IsValid

func (resolved *ResolvedIp) IsValid() bool

func (*ResolvedIp) String

func (resolved *ResolvedIp) String() string

func (ResolvedIp) Validate

func (resolved ResolvedIp) Validate() error

Jump to

Keyboard shortcuts

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