github.com/status-im/status-go@v1.1.0/services/mailservers/service.go (about) 1 package mailservers 2 3 import ( 4 "github.com/ethereum/go-ethereum/p2p" 5 "github.com/ethereum/go-ethereum/rpc" 6 ) 7 8 func NewService(db *Database) *Service { 9 return &Service{db: db} 10 } 11 12 type Service struct { 13 db *Database 14 } 15 16 func (s *Service) Start() error { 17 return nil 18 } 19 20 func (s *Service) Stop() error { 21 return nil 22 } 23 24 func (s *Service) APIs() []rpc.API { 25 return []rpc.API{ 26 { 27 Namespace: "mailservers", 28 Version: "0.1.0", 29 Service: NewAPI(s.db), 30 }, 31 } 32 } 33 34 func (s *Service) Protocols() []p2p.Protocol { 35 return nil 36 }