foo2.go 563 B

1234567891011121314151617181920212223242526272829
  1. package livedemo
  2. import (
  3. "context"
  4. pb "go-common/app/interface/live/live-demo/api/http"
  5. "go-common/app/interface/live/live-demo/conf"
  6. )
  7. // Foo2Service struct
  8. type Foo2Service struct {
  9. conf *conf.Config
  10. // optionally add other properties here, such as dao
  11. // dao *dao.Dao
  12. }
  13. //NewFoo2Service init
  14. func NewFoo2Service(c *conf.Config) (s *Foo2Service) {
  15. s = &Foo2Service{
  16. conf: c,
  17. }
  18. return s
  19. }
  20. // Hello implementation
  21. func (s *Foo2Service) Hello(ctx context.Context, req *pb.Bar1Req) (resp *pb.Bar1Resp, err error) {
  22. resp = &pb.Bar1Resp{}
  23. return
  24. }