Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kenanbek/go-memui
JSON API for in-memory objects. An experimental Go-lang project.
https://github.com/kenanbek/go-memui
go golang in-memory json json-api
Last synced: 23 days ago
JSON representation
JSON API for in-memory objects. An experimental Go-lang project.
- Host: GitHub
- URL: https://github.com/kenanbek/go-memui
- Owner: KenanBek
- Created: 2021-12-28T14:14:31.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-10T21:32:01.000Z (almost 3 years ago)
- Last Synced: 2024-05-02T04:29:06.749Z (7 months ago)
- Topics: go, golang, in-memory, json, json-api
- Language: Go
- Homepage: https://bit.ly/go-memui
- Size: 188 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# Go MemUI
> đ¨đŧâđģ Work in progress
*go-memu* - is in-memory object storage which can generate an automated JSON API for added values.
đ It is an experimental Open Source Go package for learning purposes.
## âšī¸ Learning Materials
The whole development process is available as a step-by-step tutorial series. You can check the video course here:
#### [âī¸ Building Go-MemUI Project](https://bit.ly/go-memui)
## đ How to use?
![go-memui demo](docs/demo.gif "JSON API for in-memory objects. An experimental Go-lang project. ")
#### How to install?
Use go get to install the latest version of the package:
```sh
go get github.com/kenanbek/go-memui
```Then, import `go-memui` in your project:
```go
import "github.com/KenanBek/go-memui"
```Please note that when using `go-memui` in the source code, Go will drop the `go-` part and let you use only `memui`. See the example below.
#### Example:
```go
package mainimport (
"fmt"
"log""github.com/KenanBek/go-memui"
)...
func main() {
fmt.Println("Hello, World!")d1 := Department{Name: "IT"}
d2 := Department{Name: "HR"}p1 := Person{"John", 30, &d1}
p2 := Person{"Mary", 25, &d2}mui := memui.New()
err := mui.Register(&p1, &p2, &d1, &d2)
if err != nil {
fmt.Println(err)
}log.Fatalln(mui.ServerHTTP())
}
```See the `testapp` folder for detailed examples.