From acc5067b5e14c93009c16e3f6bbc89c20758cfc1 Mon Sep 17 00:00:00 2001 From: Arzumify Date: Thu, 3 Oct 2024 19:06:53 +0100 Subject: [PATCH] Updated a lot of libraries, seperated fg-library into its own package to solve build issues with version incompatibilities across modules Signed-off-by: Arzumify --- go.mod | 3 ++- go.sum | 4 ++-- library/main.go | 39 ------------------------------------ main.go | 2 +- services-src/auth/main.go | 2 +- services-src/storage/main.go | 2 +- 6 files changed, 7 insertions(+), 45 deletions(-) delete mode 100644 library/main.go diff --git a/go.mod b/go.mod index 01341fa..bb56ee1 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,9 @@ module git.ailur.dev/ailur/fulgens -go 1.23.0 +go 1.23.1 require ( + git.ailur.dev/ailur/fg-library v0.0.0-20241003180318-4ddf4f56f935 git.ailur.dev/ailur/pow v0.0.0-20240929101731-4d0b2593b7dd github.com/cespare/xxhash/v2 v2.3.0 github.com/go-chi/chi/v5 v5.1.0 diff --git a/go.sum b/go.sum index 20411bb..aeba084 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,5 @@ +git.ailur.dev/ailur/fg-library v0.0.0-20241003180318-4ddf4f56f935 h1:CmKzDupKFyOi7g1eATrYz5sLU4o1HhG/LCyIH1sLdUE= +git.ailur.dev/ailur/fg-library v0.0.0-20241003180318-4ddf4f56f935/go.mod h1:hOUkxs2rRouSwNnNZlo7CsFVH12kmjqheyzPQ4to1N8= git.ailur.dev/ailur/pow v0.0.0-20240929101731-4d0b2593b7dd h1:yJRi9yGRICOb6NSIE9dBRbHsWU+jSUEeAFohVW59n38= git.ailur.dev/ailur/pow v0.0.0-20240929101731-4d0b2593b7dd/go.mod h1:BHl7H6B6uN+q2cCCUlno6JMhqLa2A52wkbAdJbq2izA= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= @@ -65,8 +67,6 @@ modernc.org/fileutil v1.3.0 h1:gQ5SIzK3H9kdfai/5x41oQiKValumqNTDXMvKo62HvE= modernc.org/fileutil v1.3.0/go.mod h1:XatxS8fZi3pS8/hKG2GH/ArUogfxjpEKs3Ku3aK4JyQ= modernc.org/gc/v2 v2.4.1 h1:9cNzOqPyMJBvrUipmynX0ZohMhcxPtMccYgGOJdOiBw= modernc.org/gc/v2 v2.4.1/go.mod h1:wzN5dK1AzVGoH6XOzc3YZ+ey/jPgYHLuVckd62P0GYU= -modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6 h1:5D53IMaUuA5InSeMu9eJtlQXS2NxAhyWQvkKEgXZhHI= -modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6/go.mod h1:Qz0X07sNOR1jWYCrJMEnbW/X55x206Q7Vt4mz6/wHp4= modernc.org/gc/v3 v3.0.0-20240801135723-a856999a2e4a h1:CfbpOLEo2IwNzJdMvE8aiRbPMxoTpgAJeyePh0SmO8M= modernc.org/gc/v3 v3.0.0-20240801135723-a856999a2e4a/go.mod h1:Qz0X07sNOR1jWYCrJMEnbW/X55x206Q7Vt4mz6/wHp4= modernc.org/libc v1.55.3 h1:AzcW1mhlPNrRtjS5sS+eW2ISCgSOLLNyFzRh/V3Qj/U= diff --git a/library/main.go b/library/main.go deleted file mode 100644 index b49b1cc..0000000 --- a/library/main.go +++ /dev/null @@ -1,39 +0,0 @@ -package library - -import ( - "github.com/go-chi/chi/v5" - "github.com/google/uuid" - "io/fs" - "time" -) - -type Permissions struct { - Authenticate bool `validate:"required"` - Database bool `validate:"required"` - BlobStorage bool `validate:"required"` - InterServiceCommunication bool `validate:"required"` - Resources bool `validate:"required"` -} - -type Service struct { - Name string `validate:"required"` - Permissions Permissions `validate:"required"` - ServiceID uuid.UUID `validate:"required"` -} - -type InterServiceMessage struct { - ServiceID uuid.UUID `validate:"required"` - ForServiceID uuid.UUID `validate:"required"` - MessageType uint64 `validate:"required"` - SentAt time.Time `validate:"required"` - Message any `validate:"required"` -} - -type ServiceInitializationInformation struct { - Domain string `validate:"required"` - Outbox chan<- InterServiceMessage `validate:"required"` - Inbox <-chan InterServiceMessage `validate:"required"` - Router *chi.Mux `validate:"required"` - Configuration map[string]interface{} - ResourceDir fs.FS -} diff --git a/main.go b/main.go index e7a8421..1c69a9b 100644 --- a/main.go +++ b/main.go @@ -3,7 +3,7 @@ package main import ( "errors" "fmt" - "git.ailur.dev/ailur/fulgens/library" + library "git.ailur.dev/ailur/fg-library" "github.com/go-chi/chi/v5/middleware" "io" "log" diff --git a/services-src/auth/main.go b/services-src/auth/main.go index 0d5fa54..9328d1e 100644 --- a/services-src/auth/main.go +++ b/services-src/auth/main.go @@ -2,7 +2,7 @@ package main import ( // Fulgens libraries - "git.ailur.dev/ailur/fulgens/library" + library "git.ailur.dev/ailur/fg-library" authLibrary "git.ailur.dev/ailur/fulgens/services-src/auth/library" "git.ailur.dev/ailur/pow" diff --git a/services-src/storage/main.go b/services-src/storage/main.go index 26583c9..0de13dc 100644 --- a/services-src/storage/main.go +++ b/services-src/storage/main.go @@ -3,7 +3,7 @@ package main import ( "database/sql" "errors" - "git.ailur.dev/ailur/fulgens/library" + library "git.ailur.dev/ailur/fg-library" "path/filepath" "io"