model

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ACMEChallenge

type ACMEChallenge struct {
	ID               uuid.UUID `json:"id"`
	DeviceID         uuid.UUID `json:"device_id"`
	FQDN             string    `json:"fqdn"`
	KeyAuthorization string    `json:"key_authorization"`
	CreatedAt        time.Time `json:"created_at"`
	ExpiresAt        time.Time `json:"expires_at"`
}

type Account added in v0.1.1

type Account struct {
	ID        uuid.UUID `json:"id"`
	CreatedAt time.Time `json:"created_at"`
}

type AccountDomain added in v0.1.1

type AccountDomain struct {
	ID                 uuid.UUID    `json:"id"`
	AccountID          uuid.UUID    `json:"account_id"`
	Domain             string       `json:"domain"`
	CNAMETarget        string       `json:"cname_target"`
	Status             DomainStatus `json:"status"`
	CreatedAt          time.Time    `json:"created_at"`
	ExpiresAt          *time.Time   `json:"expires_at,omitempty"`
	VerifiedAt         *time.Time   `json:"verified_at,omitempty"`
	VerifiedByDeviceID *uuid.UUID   `json:"verified_by_device_id,omitempty"`

	// Populated by list queries
	AssignedDeviceIDs []uuid.UUID `json:"assigned_devices,omitempty"`
}

type ActorType

type ActorType string
const (
	ActorTypeDevice ActorType = "device"
	ActorTypeNexus  ActorType = "nexus"
	ActorTypeSystem ActorType = "system"
)

type AuditEntry

type AuditEntry struct {
	ID           int64           `json:"id"`
	Timestamp    time.Time       `json:"timestamp"`
	ActorType    ActorType       `json:"actor_type"`
	ActorID      string          `json:"actor_id"`
	Action       string          `json:"action"`
	ResourceType string          `json:"resource_type"`
	ResourceID   *string         `json:"resource_id,omitempty"`
	Details      json.RawMessage `json:"details,omitempty"`
	IPAddress    net.IP          `json:"ip_address,omitempty"`
}

type Device

type Device struct {
	ID             uuid.UUID    `json:"id"`
	AccountID      uuid.UUID    `json:"account_id"`
	Slug           string       `json:"slug"`
	Hostname       string       `json:"hostname"`
	CustomHostname *string      `json:"custom_hostname"`
	IdentityClass  string       `json:"identity_class"`
	EKFingerprint  string       `json:"ek_fingerprint"`
	AKPublicKey    []byte       `json:"-"`
	IPAddress      net.IP       `json:"ip_address,omitempty"`
	Timezone       *string      `json:"timezone,omitempty"`
	Status         DeviceStatus `json:"status"`

	HostnameChangesThisYear int        `json:"-"`
	HostnameYear            int        `json:"-"`
	LastHostnameChangeAt    *time.Time `json:"-"`

	CreatedAt  time.Time  `json:"created_at"`
	LastSeenAt *time.Time `json:"last_seen_at,omitempty"`
}

type DeviceStatus

type DeviceStatus string
const (
	DeviceStatusActive    DeviceStatus = "active"
	DeviceStatusSuspended DeviceStatus = "suspended"
	DeviceStatusRevoked   DeviceStatus = "revoked"
)

type DomainAssignment added in v0.1.1

type DomainAssignment struct {
	DeviceID  uuid.UUID `json:"device_id"`
	Domain    string    `json:"domain"`
	CreatedAt time.Time `json:"created_at"`
}

type DomainStatus added in v0.1.1

type DomainStatus string
const (
	DomainStatusPending  DomainStatus = "pending"
	DomainStatusVerified DomainStatus = "verified"
)

type NexusInstance

type NexusInstance struct {
	ID                       uuid.UUID   `json:"id"`
	Hostname                 string      `json:"hostname"`
	ResolvedAddresses        []net.IP    `json:"resolved_addresses"`
	Region                   *string     `json:"region,omitempty"`
	HeartbeatIntervalSeconds int         `json:"heartbeat_interval_seconds"`
	Status                   NexusStatus `json:"status"`
	RegisteredAt             time.Time   `json:"registered_at"`
	LastSeenAt               time.Time   `json:"last_seen_at"`
}

type NexusStatus

type NexusStatus string
const (
	NexusStatusActive   NexusStatus = "active"
	NexusStatusInactive NexusStatus = "inactive"
)

Jump to

Keyboard shortcuts

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