Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewIngesterClient ¶
func NewIngesterClient(addr string, token string) (pb.IngesterClient, error)
NewIngesterClient gets an ingester client for a given address
Types ¶
type Server ¶
type Server struct { Auth map[string]string DatabaseAddr string DatabaseUsername string DatabasePassword string DatabaseName string }
Server handles authentication and serves
type TokenAuthenticator ¶
type TokenAuthenticator string
TokenAuthenticator is for use on a client to provide a token
func NewTokenAuthenticator ¶
func NewTokenAuthenticator(token string) TokenAuthenticator
NewTokenAuthenticator creates a new authentic
func (TokenAuthenticator) GetRequestMetadata ¶
func (a TokenAuthenticator) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error)
GetRequestMetadata gets header data for a given request
func (TokenAuthenticator) RequireTransportSecurity ¶
func (TokenAuthenticator) RequireTransportSecurity() bool
RequireTransportSecurity should be true, but isn't
type TokenVerifier ¶
type TokenVerifier struct {
// contains filtered or unexported fields
}
TokenVerifier verifies tokens against a collection of tokens
func NewTokenVerifier ¶
func NewTokenVerifier(tokens map[string]string) *TokenVerifier
NewTokenVerifier creates a verifier from a map of tokens to their projects
func (*TokenVerifier) VerifyForProject ¶
func (t *TokenVerifier) VerifyForProject(token, project string) error
VerifyForProject verifies that a token is valid for a given project
func (*TokenVerifier) VerifyForProjectInContext ¶
func (t *TokenVerifier) VerifyForProjectInContext(ctx context.Context, project string) error
VerifyForProjectInContext does VerifyForProject in a context
Click to show internal directories.
Click to hide internal directories.