mirror of
https://github.com/status-im/status-go.git
synced 2025-01-09 22:26:30 +00:00
21 lines
441 B
Go
21 lines
441 B
Go
package requests
|
|
|
|
import "errors"
|
|
|
|
var ErrUpsertSwitcherCardInvalidCardID = errors.New("upsert-switcher-card: invalid card id")
|
|
|
|
type UpsertSwitcherCard struct {
|
|
CardID string `json:"cardId,omitempty"`
|
|
Type int `json:"type"`
|
|
Clock uint64 `json:"clock"`
|
|
ScreenID string `json:"screenId"`
|
|
}
|
|
|
|
func (a *UpsertSwitcherCard) Validate() error {
|
|
if len(a.CardID) == 0 {
|
|
return ErrUpsertSwitcherCardInvalidCardID
|
|
}
|
|
|
|
return nil
|
|
}
|