Esempio n. 1
0
func (i *inBandMsgTypeScanner) Scan(src interface{}) error {
	if src == nil {
		return nil
	}
	if raw, ok := src.(int); ok {
		t := gregor.InBandMsgType(raw)
		switch t {
		case gregor.InBandMsgTypeUpdate, gregor.InBandMsgTypeSync:
			i.t = t
		default:
			return ErrBadScan
		}
	}
	return nil
}
Esempio n. 2
0
func (m Metadata) InBandMsgType() gregor.InBandMsgType { return gregor.InBandMsgType(m.InBandMsgType_) }