Documentation ¶
Overview ¶
Package v1 contains interface definitions for v1API
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RepoInterface ¶
type RepoInterface interface { RegisterClient(models.Client) (models.Client, error) GetClient(name string) (models.Client, error) UpdateClient(models.Client) error DeleteClient(name string) error }
RepoInterface defines an interface for repository of v1API
type State ¶
type State int64
State defines the rate limiter state
const ( Deny State = 0 Allow = 1 )
Define constants for rate limit state
type Strategy ¶
Strategy is an interface for rate limiting algorithms. Any rate limiting algorithm that implements this interface can be used with fluxy
type UseCaseInterface ¶
type UseCaseInterface interface { RegisterClient(models.Client) (models.Client, error) GetClient(name string) (models.Client, error) UpdateClient(models.Client) error DeleteClient(name string) error VerifyLimit(name string) (*Result, error) }
UseCaseInterface defines the logic interface of v1API
Directories ¶
Path | Synopsis |
---|---|
Package algorithm contains all rate limiting algorithms that define the Strategy interface
|
Package algorithm contains all rate limiting algorithms that define the Strategy interface |
handlers
|
|
grpc
Package grpc defines the GRPC handler for fluxy
|
Package grpc defines the GRPC handler for fluxy |
Package repository contains the implementation of data access methods
|
Package repository contains the implementation of data access methods |
Package usecase acts as a bridge between the repository and the business logic
|
Package usecase acts as a bridge between the repository and the business logic |
Click to show internal directories.
Click to hide internal directories.