Files
agent-radar 2ed3415fb7
Publish Claude Code Binaries / Stage and publish binaries (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-arm64 (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build linux-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build windows-amd64 (push) Canceled after 0s
Sync Tutti Agent Skills / sync (push) Canceled after 0s
Windows Agent Adapters / Test Windows agent adapters (push) Canceled after 0s
Windows Daemon Adapters / Test Windows daemon adapters (push) Canceled after 0s
Publish Tutti App Runtime / Publish runtime catalog (push) Canceled after 0s
源码快照 @ 2026-09-01 (source-only, 剔除非源码素材)
2026-09-01 20:17:27 +08:00

71 lines
2.0 KiB
Go

package deviceauthority
import "strings"
type ensureDeviceAuthorityWireResponse struct {
AuthorityID string `json:"authorityId"`
State string `json:"state"`
Relay relayWire `json:"relay"`
Lease leaseWire `json:"lease"`
GatewayEnrollment gatewayEnrollmentWire `json:"gatewayEnrollment"`
}
type deviceGatewayIdentityWire struct {
AuthorityID string `json:"authorityId"`
IdentityID string `json:"identityId"`
KeyID string `json:"keyId"`
}
type enrollDeviceGatewayIdentityWireResponse struct {
Identity deviceGatewayIdentityWire `json:"identity"`
}
type ownerTunnelTokenWire struct {
Token string `json:"token"`
ExpiresAt string `json:"expiresAt"`
}
type issueOwnerTunnelTokenWireResponse struct {
AuthorityID string `json:"authorityId"`
State string `json:"state"`
Relay relayWire `json:"relay"`
OwnerTunnelToken ownerTunnelTokenWire `json:"ownerTunnelToken"`
Lease leaseWire `json:"lease"`
GatewayIdentityID string `json:"gatewayIdentityId"`
}
type renewLeaseWireResponse struct {
AuthorityID string `json:"authorityId"`
State string `json:"state"`
RenewedAt string `json:"renewedAt"`
ExpiresAt string `json:"expiresAt"`
}
type relayWire struct {
HostEndpoint string `json:"hostEndpoint"`
DialEndpoint string `json:"dialEndpoint"`
RelayNodeID string `json:"relayNodeId"`
}
func (r relayWire) descriptor() RelayDescriptor {
return RelayDescriptor{
HostEndpoint: strings.TrimSpace(r.HostEndpoint),
DialEndpoint: strings.TrimSpace(r.DialEndpoint),
RelayNodeID: strings.TrimSpace(r.RelayNodeID),
}
}
type leaseWire struct {
TTLSeconds int `json:"ttlSeconds"`
RenewIntervalSeconds int `json:"renewIntervalSeconds"`
}
func (l leaseWire) policy() LeasePolicy {
return LeasePolicy(l)
}
type gatewayEnrollmentWire struct {
Proof string `json:"proof"`
ExpiresAt string `json:"expiresAt"`
}