Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrLoginNotAuthorized = status.Error(codes.Unauthenticated, "Login credentials not authorized")
ErrLoginNotAuthorized is returned from LoginHandler if invalid credentials are presented.
Functions ¶
func Authenticated ¶
Types ¶
type AuthHandler ¶
AuthHandler is a function to handle authorization. The service will extract a jwt token from the bearer header and pass it to AuthHandler. AuthHandler returns nil if authorized, otherwise an error.
type LoginHandler ¶
LoginHandler takes a user name and password and returns a jwt token that the client will use in subsequent requests. LogHandler returns ErrNotAuthorized if authorization fails. Other errors maybe returned for server side problems.
type TimeseriesService ¶
type TimeseriesService interface { Search(context.Context, *api.SearchRequest) (*api.SearchResponse, error) Login(context.Context, *api.LoginRequest) (*api.LoginResponse, error) }
TimeseriesService defines endpoint for grpc calls.
func New ¶
func New(logger log.Logger, searcher storage.Searcher, hLogin LoginHandler) TimeseriesService
Directories ¶
Path | Synopsis |
---|---|
Package storage handles in memory storage and searching for time series elements.
|
Package storage handles in memory storage and searching for time series elements. |
Package subscriber handles incoming messages from Kafka.
|
Package subscriber handles incoming messages from Kafka. |
Click to show internal directories.
Click to hide internal directories.