// GetTO returns its Transfer Object
437358
func (u *SpecialUser) GetTO(users ...*User) *SpecialUserTO {
	return &SpecialUserTO{
		original: u,
		Role:     u.Role,
		Counter:  u.Counter,
	}
}
1360069
func (p *UserPostRevision) GetTO(users ...*User) *UserPostRevisionTO {
	return &UserPostRevisionTO{
		original:  p,
		Hpid:      p.Hpid,
		Message:   p.Message,
		Time:      p.Time,
		Timestamp: p.Time.Unix(),
		RevNo:     p.RevNo,
		Counter:   p.Counter,
	}
}
310350
func (c *UserPostCommentRevision) GetTO(users ...*User) *UserPostCommentRevisionTO {
	return &UserPostCommentRevisionTO{
		original:  c,
		Hcid:      c.Hcid,
		Message:   c.Message,
		Time:      c.Time,
		Timestamp: c.Time.Unix(),
		RevNo:     c.RevNo,
		Counter:   c.Counter,
	}
}
1225211
func (l *ListCheckSuiteResults) GetTotal() int {
	if l == nil || l.Total == nil {
		return 0
	}
	return *l.Total
}
1176641
func (fms *fileMetadataStore) getOS(layer ChainID) (string, error) {
	return runtime.GOOS, nil
}
23105
func (s *Section) MapTo(v interface{}) error {
	typ := reflect.TypeOf(v)
	val := reflect.ValueOf(v)
	if typ.Kind() == reflect.Ptr {
		typ = typ.Elem()
		val = val.Elem()
	} else {
		return errors.New("cannot map to non-pointer struct")
	}

	return s.mapTo(val, false)
}
1042217
func (s *Server) SendTo(to *Node, m Message) error {
	msg, err := s.serializer.Marshal(m)
	if err != nil {
		return fmt.Errorf("marshaling message: %v", err)
	}
	msg = append([]byte{getMessageType(m)}, msg...)
	return s.defaultClient.SendMessage(context.Background(), &to.URI, msg)
}
443537
func (o *ProjectOwner) GetTO(users ...*User) *ProjectOwnerTO {
	var fromInfo, toInfo *InfoTO
	if from, e := NewUser(o.From); e == nil {
		fromInfo = from.Info().GetTO()
	}
	if to, e := NewProject(o.To); e == nil {
		toInfo = to.Info().GetTO()
	}
	return &ProjectOwnerTO{
		original:  o,
		FromInfo:  fromInfo,
		ToInfo:    toInfo,
		Time:      o.Time,
		Timestamp: o.Time.Unix(),
		ToNotify:  o.ToNotify,
		Counter:   o.Counter,
	}

}
667916
func (f *fifoProcessor) PullTo(cnx redis.Conn, src, dest string,
	timeout time.Duration) ([]byte, error) {

	bytes, err := redis.Bytes(cnx.Do("BRPOPLPUSH", src, dest, block(timeout)))
	if err != nil {
		return nil, err
	}

	return bytes, nil
}
386628
func (p *PoolData) CopyTo(dstP *PoolData) error {
	dstP.ParentKey = p.ParentKey
	dstP.Pool = types.GetIPNetCopy(p.Pool)

	if p.Range != nil {
		dstP.Range = &AddressRange{}
		dstP.Range.Sub = types.GetIPNetCopy(p.Range.Sub)
		dstP.Range.Start = p.Range.Start
		dstP.Range.End = p.Range.End
	}

	dstP.RefCount = p.RefCount
	return nil
}
951151
func (p *TZlibTransportFactory) GetTransport(trans TTransport) (TTransport, error) {
	if p.factory != nil {
		// wrap other factory
		var err error
		trans, err = p.factory.GetTransport(trans)
		if err != nil {
			return nil, err
		}
	}
	return NewTZlibTransport(trans, p.level)
}
1368768
func (us *UnSme) SerializeTo(w io.Writer) error {
	_, err := w.Write(us.Bytes())
	return err
}
836688
func (c *CommitsSearchResult) GetTotal() int {
	if c == nil || c.Total == nil {
		return 0
	}
	return *c.Total
}
361597
func (p *PostClassification) GetTO(users ...*User) *PostClassificationTO {
	return &PostClassificationTO{
		original: p,
		ID:       p.ID,
		UHpid:    p.UHpid,
		GHpid:    p.GHpid,
		Tag:      p.Tag,
	}
}
1346701
func (c *CodeSearchResult) GetTotal() int {
	if c == nil || c.Total == nil {
		return 0
	}
	return *c.Total
}
1043143
func (i *IssuesSearchResult) GetTotal() int {
	if i == nil || i.Total == nil {
		return 0
	}
	return *i.Total
}
1216419
func (p *SpecialProject) GetTO(users ...*User) *SpecialProjectTO {
	return &SpecialProjectTO{
		original: p,
		Role:     p.Role,
		Counter:  p.Counter,
	}
}