Skip to content

Commit

Permalink
Add always-omit (skip) tag to Raw struct fields
Browse files Browse the repository at this point in the history
  • Loading branch information
jessepeterson committed Jun 19, 2021
1 parent fb68ac0 commit c03b3b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions mdm/checkin.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type Authenticate struct {
Enrollment
MessageType
Topic string
Raw []byte // Original Authenticate XML plist
Raw []byte `plist:"-"` // Original Authenticate XML plist

// Fields that may be present but are not strictly required for the
// operation of the MDM protocol. Nice-to-haves.
Expand All @@ -34,15 +34,15 @@ type TokenUpdate struct {
MessageType
Push
UnlockToken []byte `plist:",omitempty"`
Raw []byte // Original TokenUpdate XML plist
Raw []byte `plist:"-"` // Original TokenUpdate XML plist
}

// CheckOut is a representation of a "CheckOut" check-in message type.
// See https://developer.apple.com/documentation/devicemanagement/checkoutrequest
type CheckOut struct {
Enrollment
MessageType
Raw []byte // Original CheckOut XML plist
Raw []byte `plist:"-"` // Original CheckOut XML plist
}

// newCheckinMessageForType returns a pointer to a check-in struct for MessageType t
Expand Down
2 changes: 1 addition & 1 deletion mdm/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type CommandResults struct {
Status string
ErrorChain []ErrorChain
RequestType string
Raw []byte // Original command result XML plist
Raw []byte `plist:"-"` // Original command result XML plist
}

// DecodeCheckin unmarshals rawMessage into results
Expand Down

0 comments on commit c03b3b8

Please sign in to comment.