models

package
Version: v0.0.0-...-1e18dc2 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2019 License: CC0-1.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Certificate

type Certificate struct {
	gorm.Model
	Resource *certificate.Resource
}

type Domain

type Domain struct {
	gorm.Model
	Value string
}

Domain is an instance of a domain.

type DomainRoute

type DomainRoute struct {
	gorm.Model
	// The instance id of the Service in CF.
	InstanceId string `gorm:"not null;unique_index;primary_key"`

	// Instance status
	State cfdomainbroker.State

	// Our user data.
	User UserData `gorm:"not null" gorm:"foreignkey:UserRef"`

	// The DNS challenge data.
	DNSChallenge leproviders.DomainMessenger

	// Our certificate.
	Certificate *Certificate `gorm:"foreignkey:CertRef"`

	// The ELB the route is tied to.
	ELBArn string

	// The listener the certificate is tied to.
	ListenerArn string

	// DomainExternal is a slice of Domains because lots of DBs don't like array types.
	DomainExternal []Domain `gorm:"foreignkey:domains"`
	DomainInternal string

	// Cloudfront Distribution UserId.
	DistributionId string
	Origin         string
	Path           string
	InsecureOrigin bool
	ALBProxyARN    string
}

DomainRoute is a single response type for both custom domains and CDN domains.

type UserData

type UserData struct {
	gorm.Model
	UserId       string `gorm:"primary_key"`
	Email        string `gorm:"not null"`
	Registration *registration.Resource
	PublicKey    crypto.PublicKey  `gorm:"type:varchar"`
	PrivateKey   crypto.PrivateKey `gorm:"type:varchar"`
}

func (UserData) GetEmail

func (u UserData) GetEmail() string

func (UserData) GetPrivateKey

func (u UserData) GetPrivateKey() crypto.PrivateKey

func (UserData) GetRegistration

func (u UserData) GetRegistration() *registration.Resource

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL