Documentation
¶
Index ¶
- type Entity
- type RedisIdempotency
- type RedisLocker
- type Server
- func (s *Server) AuthMiddleware(secret string)
- func (s *Server) Close() error
- func (s *Server) RateLimitMiddleware(limit, exp int)
- func (s *Server) RateLimitPipedMiddleware(limit, exp int)
- func (s *Server) Register(base string, components ...Entity)
- func (s *Server) Start(addr string) error
- func (s *Server) Use(args ...interface{})
- func (s *Server) WithCORS()
- func (s *Server) WithCache(c *vkc.Cache)
- func (s *Server) WithIdempotency(client *redis.Client, lifetimeMinutes int64)
- func (s *Server) WithLogger(logger *slog.Logger)
- func (s *Server) WithMetrics()
- func (s *Server) WithSwagger(app string)
- type VKStorage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisIdempotency ¶
type RedisIdempotency struct {
// contains filtered or unexported fields
}
func NewRedisIdempotency ¶
func NewRedisIdempotency(c *redis.Client) *RedisIdempotency
func (RedisIdempotency) Close ¶
func (r RedisIdempotency) Close() error
func (RedisIdempotency) Delete ¶
func (r RedisIdempotency) Delete(key string) error
func (RedisIdempotency) Reset ¶
func (r RedisIdempotency) Reset() error
type RedisLocker ¶
type RedisLocker struct {
// contains filtered or unexported fields
}
func NewRedisLocker ¶
func NewRedisLocker(c *redis.Client) *RedisLocker
func (RedisLocker) Lock ¶
func (r RedisLocker) Lock(key string) error
func (RedisLocker) Unlock ¶
func (r RedisLocker) Unlock(key string) error
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) AuthMiddleware ¶
func (*Server) RateLimitMiddleware ¶
func (*Server) RateLimitPipedMiddleware ¶
func (*Server) WithIdempotency ¶
func (*Server) WithLogger ¶
func (*Server) WithMetrics ¶
func (s *Server) WithMetrics()
func (*Server) WithSwagger ¶
type VKStorage ¶
type VKStorage struct {
// contains filtered or unexported fields
}
func NewVKStorage ¶
func (*VKStorage) Close ¶
Close closes the storage and will stop any running garbage collectors and open connections.
func (*VKStorage) Delete ¶
Delete deletes the value for the given key. It returns no error if the storage does not contain the key,
Click to show internal directories.
Click to hide internal directories.