period

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FarFuture = ValidityPeriod{
	Days: 0,

	NotAfter: time.Date(2099, 12, 31, 23, 59, 0, 0, time.UTC),
}

Functions

This section is empty.

Types

type Days

type Days int
const (
	DaysAuto        Days = -1
	DaysImmediately Days = 0
)

func (Days) String

func (d Days) String() string

func (Days) ToDuration added in v0.3.0

func (d Days) ToDuration() time.Duration

func (*Days) UnmarshalFlag

func (d *Days) UnmarshalFlag(s string) error

func (*Days) UnmarshalYAML

func (d *Days) UnmarshalYAML(unmarshal func(interface{}) error) error

type ValidityPeriod

type ValidityPeriod struct {
	// Days specifies the number of days that the issued cert would be valid for.
	// Days count is ignored if NotAfter is specified to non-zero.
	Days

	// NotAfter specifies the timestamp where the cert is considered valid to (inclusive).
	NotAfter time.Time
}

func (ValidityPeriod) GetNotAfter

func (p ValidityPeriod) GetNotAfter(base time.Time) time.Time

func (ValidityPeriod) String

func (p ValidityPeriod) String() string

func (*ValidityPeriod) UnmarshalFlag

func (p *ValidityPeriod) UnmarshalFlag(s string) error

func (*ValidityPeriod) UnmarshalYAML

func (p *ValidityPeriod) UnmarshalYAML(unmarshal func(interface{}) error) error

Jump to

Keyboard shortcuts

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