From 4e93f3a2d0000dc722f2e86a4c706c6863d33fc0 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Wed, 5 Jul 2023 00:20:26 +0200 Subject: [PATCH] Added basic information --- .gitignore | 10 ---------- Collection.go | 19 +++++++++++++++++++ LICENSE | 2 +- Namespace.go | 15 +++++++++++++++ go.mod | 3 +++ 5 files changed, 38 insertions(+), 11 deletions(-) create mode 100644 Collection.go create mode 100644 Namespace.go create mode 100644 go.mod diff --git a/.gitignore b/.gitignore index 5cbdfa9..420c61b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,3 @@ -# ---> Go.AllowList -# Allowlisting gitignore template for GO projects prevents us -# from adding various unwanted local files, such as generated -# files, developer configurations or IDE-specific files etc. -# -# Recommended: Go.AllowList.gitignore - # Ignore everything * @@ -18,8 +11,5 @@ !README.md !LICENSE -# !Makefile - # ...even if they are in subdirectories !*/ - diff --git a/Collection.go b/Collection.go new file mode 100644 index 0000000..67be42f --- /dev/null +++ b/Collection.go @@ -0,0 +1,19 @@ +package ocean + +import "sync" + +type Collection interface { + Get(key string) +} + +type collection struct { + data sync.Map + name string +} + +func TestNewCollection() { + users := collection{} + users.name = "User" + users.data.Store("1", "Test") +} + diff --git a/LICENSE b/LICENSE index 2071b23..40d5bcd 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) +Copyright (c) 2023 Eduard Urbach Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/Namespace.go b/Namespace.go new file mode 100644 index 0000000..cdbc387 --- /dev/null +++ b/Namespace.go @@ -0,0 +1,15 @@ +package ocean + +type Namespace interface { + Collection(name string) +} + +type namespace struct { + name string +} + +func TestNewNamespace() { + ns := namespace{} + ns.name = "test" +} + diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..e0ad0ca --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module git.akyoto.dev/go/ocean + +go 1.20