Added basic information
This commit is contained in:
parent
023d51e90a
commit
4e93f3a2d0
10
.gitignore
vendored
10
.gitignore
vendored
@ -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
|
# Ignore everything
|
||||||
*
|
*
|
||||||
|
|
||||||
@ -18,8 +11,5 @@
|
|||||||
!README.md
|
!README.md
|
||||||
!LICENSE
|
!LICENSE
|
||||||
|
|
||||||
# !Makefile
|
|
||||||
|
|
||||||
# ...even if they are in subdirectories
|
# ...even if they are in subdirectories
|
||||||
!*/
|
!*/
|
||||||
|
|
||||||
|
19
Collection.go
Normal file
19
Collection.go
Normal file
@ -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")
|
||||||
|
}
|
||||||
|
|
2
LICENSE
2
LICENSE
@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) <year> <copyright holders>
|
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:
|
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:
|
||||||
|
|
||||||
|
15
Namespace.go
Normal file
15
Namespace.go
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
package ocean
|
||||||
|
|
||||||
|
type Namespace interface {
|
||||||
|
Collection(name string)
|
||||||
|
}
|
||||||
|
|
||||||
|
type namespace struct {
|
||||||
|
name string
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestNewNamespace() {
|
||||||
|
ns := namespace{}
|
||||||
|
ns.name = "test"
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user