Initial import.

This commit is contained in:
Kyle Isom 2023-05-24 21:05:34 -07:00
commit 23f980bb36
3 changed files with 41 additions and 0 deletions

3
go.mod Normal file
View File

@ -0,0 +1,3 @@
module git.wntrmute.dev/kyle/overpush
go 1.20

21
proto/Makefile Normal file
View File

@ -0,0 +1,21 @@
PROTOFILES = $(wildcard *.proto)
GO_TARGETS = $(patsubst %.proto,%.pb.go,$(PROTOFILES))
DEBIAN_DEPS = protobuf-compiler protoc-gen-go
.PHONY: all
all: $(GO_TARGETS)
%.pb.go: %.proto
protoc -I=$(PWD) --go_out=$(PWD) $<
.PHONY: install-debian-deps
install-debian-deps:
sudo apt-get install $(DEBIAN_DEPS)
.PHONY: uninstall-debian-deps
uninstall-debian-deps:
sudo apt-get remove $(DEBIAN_DEPS)
.PHONY: clean
clean:
rm -f *.pb.go

17
proto/alert.proto Normal file
View File

@ -0,0 +1,17 @@
syntax = 'proto3';
package overpush;
option go_package = '.;pb';
enum AlertType {
AlertTypeInvalid = 0;
AlertTypeMessage = 1;
AlertTypeMessageWithTitle = 2;
AlertTypeMessageWithAttachment = 3;
}
message Alert {
string title = 3;
string text = 4;
bytes attachment = 5;
}