Releases: devimteam/microgen
Releases · devimteam/microgen
v0.9.2
v0.9.1
v0.9.0: Merge pull request #60 from devimteam/feature/58
0.8.0
- Generate
// TODO:
comments after panics. - Style changes to
./middleware/logging.go
,./endpoints.go
and./exchanges.go
. - Add generation of opentracing #53 :
- Serves server and client side by wrapping endpoints.
- Passes spans to headers/meta for http and grpc transports.
- Add cache middleware #54 :
- Generates
Cache
interface:
type Cache interface { Set(key, value interface{}) (err error) Get(key interface{}) (value interface{}, err error) }
- Service methods will use first argument as key and all results as value.
- Or you may add code, which will replace 'key'.
// @cache-key createdAt.UTC()
- Useful on client and server sides.
- You should write your own, or adapt existing storage (e.g. sync.Map).
type InMemoryCache struct { sync.Map } func (c *InMemoryCache) Set(key, value interface{}) error { c.Store(key, value) return nil } func (c *InMemoryCache) Get(key interface{}) (interface{}, error) { value, _ := c.Load(key) // remember about _ return value, nil }
- Generates
0.7.0: Merge pull request #51 from devimteam/develop
- Verbose levels for logs
- Refactor HTTP client and server generation:
- Change HTTP method by using
// @http-method
tag (it generates POST by default) - Server side uses Gorilla mux
- For GET method use params as url variables (
http://localhost.com/count/{text}/{symbol}
) - Some changes in decoders and encoders
- Change HTTP method by using
- Update logging middleware
- Separate request and response
- Use wrappers.StringValue for grpc transport exchange type if method have one
*string
argument (result), exceptcontext.Context
(error
) - Error-Logging middleware: logs only errors if they not nil
- Fix #44