You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
499 B
33 lines
499 B
package newbie |
|
|
|
import ( |
|
"context" |
|
|
|
"go-common/app/interface/main/growup/conf" |
|
"go-common/app/interface/main/growup/dao/newbiedao" |
|
) |
|
|
|
// Service is growup service |
|
type Service struct { |
|
conf *conf.Config |
|
dao *newbiedao.Dao |
|
} |
|
|
|
// New fn |
|
func New(c *conf.Config) (s *Service) { |
|
s = &Service{ |
|
conf: c, |
|
dao: newbiedao.New(c), |
|
} |
|
return s |
|
} |
|
|
|
// Ping fn |
|
func (s *Service) Ping(c context.Context) (err error) { |
|
return s.dao.Ping(c) |
|
} |
|
|
|
// Close dao |
|
func (s *Service) Close() { |
|
s.dao.Close() |
|
}
|
|
|