initial birdwatcher client stub

This commit is contained in:
Matthias Hannig 2017-05-18 18:10:55 +02:00
parent 00b0e962e2
commit 486adf4538
2 changed files with 20 additions and 8 deletions

View File

@ -2,27 +2,35 @@ package birdwatcher
import (
"log"
"github.com/ecix/alice-lg/backend/api"
)
type Birdwatcher struct {
config *Config
config Config
}
func NewBirdwatcher(config *Config) *Birdwatcher {
func NewBirdwatcher(config Config) *Birdwatcher {
birdwatcher := &Birdwatcher{
config: config,
}
return birdwatcher
}
func (self *Birdwatcher) Status() {
func (self *Birdwatcher) Status() (api.StatusResponse, error) {
log.Println("Implement me: Status()")
return api.StatusResponse{}, nil
}
func (self *Birdwatcher) Neighbours() {
func (self *Birdwatcher) Neighbours() (api.NeighboursResponse, error) {
log.Println("Implement me: Neighbours()")
return api.NeighboursResponse{}, nil
}
func (self *Birdwatcher) Routes() {
func (self *Birdwatcher) Routes(neighbourId string) (api.RoutesResponse, error) {
log.Println("Implement me: Routes()")
return api.RoutesResponse{}, nil
}

View File

@ -1,7 +1,11 @@
package sources
import (
"github.com/ecix/alice-lg/backend/api"
)
type Source interface {
Status()
Neighbours()
Routes(neighbourId int)
Status() (api.StatusResponse, error)
Neighbours() (api.NeighboursResponse, error)
Routes(neighbourId string) (api.RoutesResponse, error)
}