signaller/internal/backend.go

14 lines
455 B
Go
Raw Normal View History

package internal
2019-07-18 14:10:43 +00:00
import (
"github.com/nxshock/signaller/internal/models"
"github.com/nxshock/signaller/internal/models/sync"
)
2019-07-18 14:10:43 +00:00
type Backend interface {
Register(username, password, device string) (token string, error *models.ApiError)
Login(username, password, device string) (token string, err *models.ApiError)
Logout(token string) *models.ApiError
Sync(token string, request sync.SyncRequest) (response *sync.SyncReply, err *models.ApiError)
2019-07-18 14:10:43 +00:00
}