Documentation
¶
Index ¶
- Variables
- type ACMEStore
- func (s *ACMEStore) Create(ctx context.Context, c *model.ACMEChallenge) error
- func (s *ACMEStore) Delete(ctx context.Context, id uuid.UUID) error
- func (s *ACMEStore) GetByID(ctx context.Context, id uuid.UUID) (*model.ACMEChallenge, error)
- func (s *ACMEStore) GetExpired(ctx context.Context) ([]*model.ACMEChallenge, error)
- type AuditStore
- type DeviceStore
- func (s *DeviceStore) CleanupReleasedHostnames(ctx context.Context, maxAgeDays int) (int64, error)
- func (s *DeviceStore) Create(ctx context.Context, d *model.Device) error
- func (s *DeviceStore) Delete(ctx context.Context, id uuid.UUID) error
- func (s *DeviceStore) GetByEKFingerprint(ctx context.Context, fingerprint string) (*model.Device, error)
- func (s *DeviceStore) GetByID(ctx context.Context, id uuid.UUID) (*model.Device, error)
- func (s *DeviceStore) IsHostnameReleased(ctx context.Context, label string, cooldownDays int) (bool, error)
- func (s *DeviceStore) IsLabelTaken(ctx context.Context, label string) (bool, error)
- func (s *DeviceStore) ReleaseHostname(ctx context.Context, label string, deviceID uuid.UUID) error
- func (s *DeviceStore) SetCustomHostname(ctx context.Context, p SetCustomHostnameParams) error
- func (s *DeviceStore) UpdateAKPublicKey(ctx context.Context, id uuid.UUID, akPub []byte) error
- func (s *DeviceStore) UpdateLastSeen(ctx context.Context, id uuid.UUID, ip net.IP) error
- func (s *DeviceStore) UpdateStatus(ctx context.Context, id uuid.UUID, status model.DeviceStatus) error
- type NexusStore
- func (s *NexusStore) GetByHostname(ctx context.Context, hostname string) (*model.NexusInstance, error)
- func (s *NexusStore) ListActive(ctx context.Context) ([]*model.NexusInstance, error)
- func (s *NexusStore) MarkInactive(ctx context.Context, thresholdSeconds int) ([]uuid.UUID, error)
- func (s *NexusStore) UpdateResolvedAddresses(ctx context.Context, id uuid.UUID, addrs []net.IP) error
- func (s *NexusStore) Upsert(ctx context.Context, n *model.NexusInstance) error
- type SetCustomHostnameParams
- type Stores
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrChallengeNotFound = errors.New("acme challenge not found")
View Source
var ErrDeviceNotFound = errors.New("device not found")
View Source
var ErrDuplicateEK = errors.New("duplicate ek fingerprint")
View Source
var ErrDuplicateHostname = errors.New("hostname already taken")
View Source
var ErrDuplicateSlug = errors.New("duplicate slug")
View Source
var ErrNexusNotFound = errors.New("nexus instance not found")
Functions ¶
This section is empty.
Types ¶
type ACMEStore ¶
type ACMEStore struct {
// contains filtered or unexported fields
}
func NewACMEStore ¶
func (*ACMEStore) GetExpired ¶
type AuditStore ¶
type AuditStore struct {
// contains filtered or unexported fields
}
func NewAuditStore ¶
func NewAuditStore(pool *pgxpool.Pool) *AuditStore
func (*AuditStore) DeleteOlderThan ¶
func (*AuditStore) Log ¶
func (s *AuditStore) Log(ctx context.Context, entry *model.AuditEntry) error
type DeviceStore ¶
type DeviceStore struct {
// contains filtered or unexported fields
}
func NewDeviceStore ¶
func NewDeviceStore(pool *pgxpool.Pool) *DeviceStore
func (*DeviceStore) CleanupReleasedHostnames ¶
func (*DeviceStore) GetByEKFingerprint ¶
func (*DeviceStore) IsHostnameReleased ¶
func (*DeviceStore) IsLabelTaken ¶
func (*DeviceStore) ReleaseHostname ¶
func (*DeviceStore) SetCustomHostname ¶
func (s *DeviceStore) SetCustomHostname(ctx context.Context, p SetCustomHostnameParams) error
func (*DeviceStore) UpdateAKPublicKey ¶
func (*DeviceStore) UpdateLastSeen ¶
func (*DeviceStore) UpdateStatus ¶
func (s *DeviceStore) UpdateStatus(ctx context.Context, id uuid.UUID, status model.DeviceStatus) error
type NexusStore ¶
type NexusStore struct {
// contains filtered or unexported fields
}
func NewNexusStore ¶
func NewNexusStore(pool *pgxpool.Pool) *NexusStore
func (*NexusStore) GetByHostname ¶
func (s *NexusStore) GetByHostname(ctx context.Context, hostname string) (*model.NexusInstance, error)
func (*NexusStore) ListActive ¶
func (s *NexusStore) ListActive(ctx context.Context) ([]*model.NexusInstance, error)
func (*NexusStore) MarkInactive ¶
func (*NexusStore) UpdateResolvedAddresses ¶
func (*NexusStore) Upsert ¶
func (s *NexusStore) Upsert(ctx context.Context, n *model.NexusInstance) error
type SetCustomHostnameParams ¶
type Stores ¶
type Stores struct {
Device *DeviceStore
Nexus *NexusStore
ACME *ACMEStore
Audit *AuditStore
}
Click to show internal directories.
Click to hide internal directories.