github.com/status-im/status-go@v1.1.0/protocol/requests/upsert_switcher_card.go (about) 1 package requests 2 3 import "errors" 4 5 var ErrUpsertSwitcherCardInvalidCardID = errors.New("upsert-switcher-card: invalid card id") 6 7 type UpsertSwitcherCard struct { 8 CardID string `json:"cardId,omitempty"` 9 Type int `json:"type"` 10 Clock uint64 `json:"clock"` 11 ScreenID string `json:"screenId"` 12 } 13 14 func (a *UpsertSwitcherCard) Validate() error { 15 if len(a.CardID) == 0 { 16 return ErrUpsertSwitcherCardInvalidCardID 17 } 18 19 return nil 20 }