initial birdwatcher client stub
This commit is contained in:
parent
00b0e962e2
commit
486adf4538
@ -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
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user