From 8d56747f1cdb8829363fb3282c64443453f92c75 Mon Sep 17 00:00:00 2001 From: Farhan Khan Date: Thu, 17 Dec 2020 01:43:00 +0000 Subject: [PATCH] Updating Makefile and fedictl sharing same header file --- Makefile | 8 +++++--- fedictl.go | 19 ------------------- 2 files changed, 5 insertions(+), 22 deletions(-) diff --git a/Makefile b/Makefile index edffc3d..b3577a7 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,9 @@ -GOFILES = fedilogue.go ctl.go headers.go instance.go poll.go stream.go web.go db.go config.go oauth.go +FEDILOGUE_GOFILES = fedilogue.go ctl.go headers.go instance.go poll.go stream.go web.go db.go config.go oauth.go +FEDICTL_GOFILES = fedictl.go headers.go build: - go build -o fedilogue $(GOFILES) + go build -o fedilogue $(FEDILOGUE_GOFILES) + go build -o fedictl $(FEDICTL_GOFILES) run: go run $(GOFILES) acctkey: @@ -9,4 +11,4 @@ acctkey: openssl genrsa -out keys/acctprivate.pem 1024 openssl rsa -in keys/acctprivate.pem -pubout -out keys/acctpublic.pem clean: - rm -f fedilogue + rm -f fedilogue fedictl diff --git a/fedictl.go b/fedictl.go index d2346eb..d3b7121 100644 --- a/fedictl.go +++ b/fedictl.go @@ -10,25 +10,6 @@ import ( "io" ) -type CommandMap struct { - Type string `json:"Type"` - Endpoint string `json:"Endpoint"` -} - -// Instance's new min_id value -type RunningInstance struct { - Software string `json:"software"` - Status int `json:"status"` - LastRun string `json:"lastrun"` - CaptureType string `json:"capturetype"` -} - -type ResponseBack struct { - Type string `json:"Type"` - Message string `json:"Message"` - RunningInstances map[string]RunningInstance `json:"RunningInstances"` -} - func main() { shutdownPtr := flag.Bool("shutdown", false, "Shutdown server")