entities

package
v0.0.7-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AUTHORIZATION_INDEX_URL = "url"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ACMEAccount

type ACMEAccount struct {
	ID                     uint64      `yaml:"id" json:"id"`
	Contact                []string    `yaml:"contact" json:"contact,omitempty"`
	CreatedAt              time.Time   `yaml:"created" json:"created"`
	ExternalAccountBinding interface{} `yaml:"externalAccountBinding" json:"externalAccountBinding,omitempty"`
	Key                    string      `yaml:"key" json:"key"`
	OnlyReturnExisting     bool        `yaml:"onlyReturnExisting" json:"onlyReturnExisting,omitempty"`
	Orders                 string      `yaml:"orders" json:"orders"`
	Status                 string      `yaml:"status" json:"status"`
	TermsOfServiceAgreed   bool        `yaml:"termsOfServiceAgreed" json:"termsOfServiceAgreed,omitempty"`
	URL                    string      `yaml:"url" json:"url"`
}

func (*ACMEAccount) EntityID

func (account *ACMEAccount) EntityID() uint64

func (*ACMEAccount) SetEntityID

func (account *ACMEAccount) SetEntityID(id uint64)

type ACMEAuthorization

type ACMEAuthorization struct {
	ID         uint64          `yaml:"id" json:"id"`
	Identifier ACMEIdentifier  `yaml:"identifier" json:"identifier"`
	Status     string          `yaml:"status" json:"status"`
	Expires    string          `yaml:"expires" json:"expires"`
	Challenges []ACMEChallenge `yaml:"challenges" json:"challenges"`
	Wildcard   bool            `yaml:"wildcard" json:"wildcard"`
	AccountID  uint64          `yaml:"account-id" json:"account_id"`
	OrderID    uint64
	URL        string `yaml:"url" json:"url"`
}

func (*ACMEAuthorization) EntityID

func (account *ACMEAuthorization) EntityID() uint64

func (*ACMEAuthorization) SetEntityID

func (account *ACMEAuthorization) SetEntityID(id uint64)

type ACMECertificate

type ACMECertificate struct {
	ID        uint64    `yaml:"id" json:"id"`
	CertURL   string    `yaml:"cert-url"  json:"cert_url"`
	PEM       string    `yaml:"pem" json:"pem"`
	IssuedAt  time.Time `yaml:"issued" json:"issued"`
	Status    string    `yaml:"status" json:"status"`
	ExpiresAt time.Time `yaml:"expires" json:"expires"`
}

func (*ACMECertificate) EntityID

func (cert *ACMECertificate) EntityID() uint64

func (*ACMECertificate) SetEntityID

func (cert *ACMECertificate) SetEntityID(id uint64)

type ACMEChallenge

type ACMEChallenge struct {
	ID              uint64 `yaml:"id" json:"id"`
	Type            string `yaml:"type" json:"type"`
	URL             string `yaml:"url" json:"url"`
	Status          string `yaml:"status" json:"status"`
	Token           string `yaml:"token" json:"token"`
	Validated       string `yaml:"validated" json:"validated,omitempty"`
	Error           *Error `yaml:"error" json:"error,omitempty"`
	AccountID       uint64 `yaml:"account-id" json:"account_id"`
	AuthorizationID uint64 `yaml:"authorization-id" json:"authorization_id"`
}

func (*ACMEChallenge) EntityID

func (challenge *ACMEChallenge) EntityID() uint64

func (*ACMEChallenge) SetEntityID

func (challenge *ACMEChallenge) SetEntityID(id uint64)

type ACMEIdentifier

type ACMEIdentifier struct {
	Type  string `yaml:"type" json:"type"`
	Value string `yaml:"value" json:"value"`
}

type ACMENonce

type ACMENonce struct {
	ID                      uint64 `json:"id" yaml:"id"`
	Value                   []byte `json:"value" yaml:"value"`
	ExpiresAt               int64  `json:"expires" yaml:"expires"`
	entities.KeyValueEntity `json:"-" yaml:"-"`
}

func (*ACMENonce) EntityID

func (nonce *ACMENonce) EntityID() uint64

func (*ACMENonce) SetEntityID

func (nonce *ACMENonce) SetEntityID(id uint64)

type ACMEOrder

type ACMEOrder struct {
	ID             uint64           `yaml:"id" json:"id"`
	Status         string           `yaml:"status" json:"status"`
	Expires        string           `yaml:"expires" json:"expires,omitempty"`
	Identifiers    []ACMEIdentifier `yaml:"identifiers" json:"identifiers"`
	NotBefore      string           `yaml:"not-before" json:"notBefore,omitempty"`
	NotAfter       string           `yaml:"not-after" json:"notAfter,omitempty"`
	Error          *Error           `yaml:"error" json:"error,omitempty"`
	Authorizations []string         `yaml:"authorizations" json:"authorizations"`
	Finalize       string           `yaml:"finalize" json:"finalize"`
	Certificate    string           `yaml:"certificate" json:"certificate,omitempty"`
	CertificateURL string           `yaml:"certificate-url" json:"certificate_url,omitempty"`
	XSignedOrder   *ACMEOrder       `yaml:"x-signed-order" json:"x-signed-order,omitempty"`
	AccountID      uint64           `yaml:"account-id" json:"account_id"`
	URL            string           `yaml:"url" json:"url"`
}

func (*ACMEOrder) EntityID

func (order *ACMEOrder) EntityID() uint64

func (*ACMEOrder) SetEntityID

func (order *ACMEOrder) SetEntityID(id uint64)

type Error

type Error struct {
	Type        string          `json:"type"`
	Detail      string          `json:"detail"`
	Status      int             `json:"-"`
	SubProblems []SubProblem    `json:"subproblems,omitempty"`
	Identifier  *ACMEIdentifier `json:"identifier,omitempty"`
	Instance    string          `json:"instance,omitempty"`
}

Error represents an ACME error as per RFC 8555.

func NewError

func NewError(errType, detail string, status int, subproblems []SubProblem) *Error

NewError creates a new ACME error.

func (*Error) Error

func (e *Error) Error() string

Implements the error interface

type SubProblem

type SubProblem struct {
	Type       string          `json:"type"`
	Detail     string          `json:"detail"`
	Identifier *ACMEIdentifier `json:"identifier,omitempty"`
}

SubProblem represents a subproblem in a compound error per RFC 8555.

Jump to

Keyboard shortcuts

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