feat: cache + paths (#1)
- Added helper function `ExpandUser` - Added basic cache impmentations for in-memory and file based caches. Reviewed-on: #1 Co-authored-by: Felipe M. <me@fmartingr.com> Co-committed-by: Felipe M. <me@fmartingr.com>
This commit is contained in:
parent
ef80892aa5
commit
98eb17d9f3
10 changed files with 984 additions and 0 deletions
26
README.md
26
README.md
|
@ -1,7 +1,25 @@
|
|||
# gotoolkit
|
||||
|
||||
[](https://pkg.go.dev/git.nakama.town/fmartingr/gotoolkit)
|
||||
|
||||
A set of basic tools to develop Go applications.
|
||||
|
||||
# Index
|
||||
|
||||
- [Cache](#cache)
|
||||
- [Database](#database)
|
||||
- [Paths](#paths)
|
||||
- [Service & Servers](#service--servers)
|
||||
- [Template](#template)
|
||||
|
||||
## Cache
|
||||
|
||||
A basic cache engine to manage the cache of the application.
|
||||
|
||||
```go
|
||||
cache := cache.NewMemoryCache()
|
||||
```
|
||||
|
||||
## Database
|
||||
|
||||
A basic database engine to manage the connection to a database.
|
||||
|
@ -13,6 +31,14 @@ if err != nil {
|
|||
}
|
||||
```
|
||||
|
||||
## Paths
|
||||
|
||||
A basic utility to manage the paths of the application.
|
||||
|
||||
```go
|
||||
path := paths.ExpandUser("~/myapp")
|
||||
```
|
||||
|
||||
## Service & Servers
|
||||
|
||||
A basic way to expose servers within one service.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue