fleet/server/mdm/android/android.go
Victor Lyuboslavsky 4b007e20e1
Android scaffold (#26274)
Android scaffold code and refactorings
- Android packages intended to be decoupled from other Fleet code

Video explaining the PR: https://www.youtube.com/watch?v=cza-35Z9Wxk

# Checklist for submitter

- [x] If database migrations are included, checked table schema to
confirm autoupdate
- For database migrations:
- [x] Checked schema for all modified table for columns that will
auto-update timestamps during migration.
- [x] Confirmed that updating the timestamps is acceptable, and will not
cause unwanted side effects.
- [x] Ensured the correct collation is explicitly set for character
columns (`COLLATE utf8mb4_unicode_ci`).
- [x] Added/updated automated tests
- [x] Manual QA for all new/changed functionality
2025-02-13 14:32:19 -06:00

30 lines
624 B
Go

package android
type SignupDetails struct {
Url string `json:"url,omitempty"`
Name string `json:"name,omitempty"`
}
type Enterprise struct {
ID uint `db:"id"`
SignupName string `db:"signup_name"`
EnterpriseID string `db:"enterprise_id"`
}
func (e Enterprise) Name() string {
return "enterprises/" + e.EnterpriseID
}
func (e Enterprise) IsValid() bool {
return e.EnterpriseID != ""
}
type EnrollmentToken struct {
Value string `json:"value"`
}
type Host struct {
HostID uint `db:"host_id"`
FleetEnterpriseID uint `db:"enterprise_id"`
DeviceID string `db:"device_id"`
}