Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.11.0 #1

Merged
merged 13 commits into from Aug 2, 2019

Conversation

@toby1991
Copy link
Contributor

commented Aug 2, 2019

Websocket

  • Feat: Websocket support

  • Feat: Name route support

  • Feat: Make Totoval more compatible with multi port serve

  • Feat: Add Totoval monitor

  • Feat: Change request.Context from struct to interface

  • Fix: move RequestUser from controller to Context

  • Fix: An User getter issue in controller which may cause each request's data cross using by different request.

  • Fix: A bug of view binding

Migration:

  1. func (d *Dashboard) Index(c *request.Context) { -> func (d *Dashboard) Index(c request.Context) {

  2. middleware

func BasicAuth(accounts map[string]string) request.HandlerFunc {
	return func(c request.Context) {
		gin.BasicAuth(accounts)(c.Context)
	}
}

|
v

func BasicAuth(accounts map[string]string) request.HandlerFunc {
	return func(c request.Context) {
		gin.BasicAuth(accounts)(c.GinContext())
	}
}
  1. func(c request.Context) {:c.Request. -> c.Request().
  2. func(c request.Context) {:c.Params -> c.Params()
  3. set c.Writer, use c.SetWriter()
  4. set c.Request, use c.SetRequest()
  5. replace .Scan(c) in controller, user c.ScanUserWithJSON(), c is the Context
  6. replace .User().Value() in controller, use c.User().Value(), c is the Context

toby1991 added some commits Jul 29, 2019

change default port binding
Signed-off-by: Toby Yan <me@tobyan.com>
Make Totoval more compatible with multi port serve
Signed-off-by: Toby Yan <me@tobyan.com>
set default timezone to UTC
Signed-off-by: Toby Yan <me@tobyan.com>
Change request.Context from struct to interface
Migration:
1. `func (d *Dashboard) Index(c *request.Context) {` -> `func (d *Dashboard) Index(c request.Context) {`

2. middleware
```go
func BasicAuth(accounts map[string]string) request.HandlerFunc {
	return func(c request.Context) {
		gin.BasicAuth(accounts)(c.Context)
	}
}
```
|
v
```go
func BasicAuth(accounts map[string]string) request.HandlerFunc {
	return func(c request.Context) {
		gin.BasicAuth(accounts)(c.GinContext())
	}
}
```

3. `func(c request.Context) {`:`c.Request.` -> `c.Request().`
4. `func(c request.Context) {`:`c.Params` -> `c.Params()`
5. set `c.Writer`, use `c.SetWriter()`
6. set `c.Request`, use `c.SetRequest()`

Signed-off-by: Toby Yan <me@tobyan.com>
Fix an User getter issue in controller
* Fix an User getter issue in controller which may cause each request’s data cross using by different request.

Signed-off-by: Toby Yan <me@tobyan.com>
Change User retrieve functions in controller
7. replace `.Scan(c)` in controller, user `c.ScanUserWithJSON()`, `c` is the `Context`
8. replace `.User().Value()` in controller, use `c.User().Value()`, `c` is the `Context`

Signed-off-by: Toby Yan <me@tobyan.com>
Add Totoval monitor
Signed-off-by: Toby Yan <me@tobyan.com>
Upgrade framework
Signed-off-by: Toby Yan <me@tobyan.com>
update views
Signed-off-by: Toby Yan <me@tobyan.com>
Add name route support
Signed-off-by: Toby Yan <me@tobyan.com>
update readme
Signed-off-by: Toby Yan <me@tobyan.com>

@toby1991 toby1991 self-assigned this Aug 2, 2019

@toby1991 toby1991 merged commit b367b8b into master Aug 2, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.