types

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	RequestParameters url.Values
	Headers           http.Header
	UserAgent         string
	RemoteAddr        string
}

Event contains the http request of catcher - body/query parameters, headers and user agent

func NewEvent

func NewEvent(requestParameters url.Values, headers http.Header, userAgent, remoteAddr string) *Event

NewEvent creates a new event to be stored

type OwnerHostname added in v0.0.3

type OwnerHostname struct {
	Username     string
	Hostname     string
	Subscription Subscription
}

OwnerHostname is the hostname registered by owner

func NewOwnerHostname added in v0.0.3

func NewOwnerHostname(
	username string,
	hostname string,
	subscription Subscription,
) OwnerHostname

NewOwnerHostname creates OwnerHostname

type Subscription added in v0.0.3

type Subscription struct {
	ID        string
	ExpiresAt time.Time
}

Subscription represents when the trial for hostname is active

func NewSubscription added in v0.0.3

func NewSubscription(now time.Time) Subscription

NewSubscription creates Subscription

func (Subscription) Expired added in v0.0.3

func (s Subscription) Expired() bool

Expired checks if subscription has expired

type SubscriptionWithHostname added in v0.0.3

type SubscriptionWithHostname struct {
	Subscription Subscription
	Hostname     string
}

SubscriptionWithHostname subsciption with hostname

Jump to

Keyboard shortcuts

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