domain

package
v0.0.0-...-b69a640 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	Name     string    `json:"name"`
	DaysLeft int       `json:"daysLeft"`
	EndTime  time.Time `json:"endTime"`
	Status   string    `json:"status"`
}

Data holds additional data about a domain, also used for JSON representation

type Domain

type Domain struct {
	Name        string
	Certificate *x509.Certificate
	Error       error
}

Domain holds a domain and it's certificate

func InitDomain

func InitDomain(domain string) (*Domain, error)

InitDomain inits Domain and get the cert

func (*Domain) DaysLeft

func (domain *Domain) DaysLeft(l *time.Location) int

DaysLeft returns numer of days left (floored)

func (*Domain) EndTime

func (domain *Domain) EndTime(l *time.Location) time.Time

EndTime returns the last date the certificate is valid

func (*Domain) GetData

func (domain *Domain) GetData(l *time.Location) *Data

GetData returns all data as an struct

func (*Domain) Status

func (domain *Domain) Status() string

Status returns ok or any errors

Jump to

Keyboard shortcuts

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