code: func (t *Topology) Scan(value interface{}) error {
  	switch v := value.(type) {
  	case []byte:
  		*t = Topology(v)
  	case string:
  		*t = Topology(v)
  	case Topology:
  		*t = v
  	default:
  		return errs.Errorf("failed to convert value of type %[1]T to topology: %[1]v", value)
  	}
  	return t.CheckValid()
  }
docs: // Scan implements the https://golang.org/pkg/database/sql/#Scanner interface
  // See also https://stackoverflow.com/a/25374979/835098
  // See also https://github.com/jinzhu/gorm/issues/302#issuecomment-80566841