status-go/services/permissions/service.go

42 lines
699 B
Go
Raw Permalink Normal View History

package permissions
import (
"github.com/ethereum/go-ethereum/p2p"
"github.com/ethereum/go-ethereum/rpc"
)
// NewService initializes service instance.
2019-07-25 05:35:09 +00:00
func NewService(db *Database) *Service {
return &Service{db: db}
}
type Service struct {
db *Database
}
// Start a service.
func (s *Service) Start() error {
return nil
}
// Stop a service.
func (s *Service) Stop() error {
2019-07-25 05:35:09 +00:00
return nil
}
// APIs returns list of available RPC APIs.
func (s *Service) APIs() []rpc.API {
return []rpc.API{
{
Namespace: "permissions",
Version: "0.1.0",
2019-07-25 05:35:09 +00:00
Service: NewAPI(s.db),
},
}
}
// Protocols returns list of p2p protocols.
func (s *Service) Protocols() []p2p.Protocol {
return nil
}