Files
micromdm/platform/command/service.go
Victor Vrantchan c1c1cfb175 refactor command service to use one method per file (#416)
Updated the command service to have the same structure as all the other services within platform/...
2018-05-12 17:04:05 -04:00

24 lines
500 B
Go

// Package command provides utilities for creating MDM Payloads.
package command
import (
"github.com/micromdm/micromdm/mdm/mdm"
"github.com/micromdm/micromdm/platform/pubsub"
"golang.org/x/net/context"
)
type Service interface {
NewCommand(context.Context, *mdm.CommandRequest) (*mdm.CommandPayload, error)
}
type CommandService struct {
publisher pubsub.Publisher
}
func New(pub pubsub.Publisher) (*CommandService, error) {
svc := CommandService{
publisher: pub,
}
return &svc, nil
}