sdk

package module
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2023 License: Apache-2.0 Imports: 8 Imported by: 3

README

columbus-sdk

Go Reference

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UserAgent = "Columbus-SDK" // Global User Agent for the HTTP Client

)

Functions

func Lookup

func Lookup(d string, full bool) ([]string, error)

Lookup do a lookup for given domain d. If full is true, returns the full hostname.

Known errors are: ErrInvalidDomain (d is not a valid domain), ErrBlocked (blocked IP) and ErrNotFound (the given domain is not found / not exist in the DB).

func SetURI

func SetURI(u string)

SetURI sets the global URI

Types

type Domain

type Domain struct {
	Domain string `bson:"domain" json:"domain"`
	TLD    string `bson:"tld" json:"tld"`
	Sub    string `bson:"sub" json:"sub"`
}

func (*Domain) FullDomain added in v0.8.0

func (d *Domain) FullDomain() string

Returns the domain+tld.

func (*Domain) String added in v0.7.0

func (d *Domain) String() string

Directories

Path Synopsis
fault package is used to predefine common errors in across the columbus services.
fault package is used to predefine common errors in across the columbus services.

Jump to

Keyboard shortcuts

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