From 2d33c99902951f8ff39b116ca96fef11a8c0ce31 Mon Sep 17 00:00:00 2001 From: Michael Quigley Date: Wed, 21 Aug 2024 14:48:02 -0400 Subject: [PATCH] daemon model skeleton (#463) --- daemon/daemon.go | 13 +++++++++++++ daemon/model.go | 27 +++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 daemon/daemon.go create mode 100644 daemon/model.go diff --git a/daemon/daemon.go b/daemon/daemon.go new file mode 100644 index 00000000..6fe01cc5 --- /dev/null +++ b/daemon/daemon.go @@ -0,0 +1,13 @@ +package daemon + +type Daemon struct { + shares map[string]*share + accesses map[string]*access +} + +func NewDaemon() *Daemon { + return &Daemon{ + shares: make(map[string]*share), + accesses: make(map[string]*access), + } +} diff --git a/daemon/model.go b/daemon/model.go new file mode 100644 index 00000000..a32694d3 --- /dev/null +++ b/daemon/model.go @@ -0,0 +1,27 @@ +package daemon + +import ( + "github.com/openziti/zrok/sdk/golang/sdk" + "time" +) + +type share struct { + token string + + basicAuth []string + frontendSelection []string + backendMode sdk.BackendMode + insecure bool + oauthProvider string + oauthEmailAddressPatterns []string + oauthCheckInterval time.Duration + closed bool + accessGrants []string +} + +type access struct { + token string + + bindAddress string + responseHeaders []string +}