Documentation ¶
Index ¶
- Constants
- type Auth0Authenticator
- type AuthConfig
- type Config
- type Core
- type Request
- func (r *Request) BoolFromQuery(w *ResponseWriter, param string) (bool, bool)
- func (r *Request) CommitID(w *ResponseWriter) (ksuid.KSUID, bool)
- func (r *Request) ID() string
- func (r *Request) JournalIDFromQuery(w *ResponseWriter, param string) (journal.ID, bool)
- func (r *Request) PoolID(w *ResponseWriter, root *lake.Root) (ksuid.KSUID, bool)
- func (r *Request) StringFromPath(w *ResponseWriter, arg string) (string, bool)
- func (r *Request) TagFromPath(w *ResponseWriter, arg string) (ksuid.KSUID, bool)
- func (r *Request) Unmarshal(w *ResponseWriter, body interface{}, templates ...interface{}) bool
- type ResponseWriter
- func (w *ResponseWriter) ContentType() string
- func (w *ResponseWriter) Error(err error)
- func (w *ResponseWriter) Marshal(body interface{}) bool
- func (w *ResponseWriter) Respond(status int, body interface{}) bool
- func (w *ResponseWriter) Write(b []byte) (int, error)
- func (w *ResponseWriter) ZioWriter() zio.WriteCloser
Constants ¶
View Source
const DefaultZedFormat = "zson"
DefaultZedFormat is the default Zed format that the server will assume if the value for a request's "Accept" or "Content-Type" headers are not set or set to "*/*".
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth0Authenticator ¶
type Auth0Authenticator struct {
// contains filtered or unexported fields
}
func NewAuthenticator ¶
func NewAuthenticator(ctx context.Context, logger *zap.Logger, registerer prometheus.Registerer, config AuthConfig) (*Auth0Authenticator, error)
NewAuthenticator returns an Auth0Authenticator that checks for a JWT signed by a key referenced in the JWKS file, has the required audience and issuer claims, and contains claims for a brim tenant and user id.
func (*Auth0Authenticator) MethodResponse ¶
func (a *Auth0Authenticator) MethodResponse() api.AuthMethodResponse
func (*Auth0Authenticator) Middleware ¶
func (a *Auth0Authenticator) Middleware(next func(*Core, *ResponseWriter, *Request)) func(*Core, *ResponseWriter, *Request)
type AuthConfig ¶
type AuthConfig struct { Enabled bool JWKSPath string // Audience, ClientID, and Domain are sent in the /auth/method response so API // clients can interact with the right Auth0 tenant (production, testing, etc.) // to obtain tokens. Audience string ClientID string Domain string }
func (*AuthConfig) SetFlags ¶
func (c *AuthConfig) SetFlags(fs *flag.FlagSet)
type Config ¶
type Config struct { Auth AuthConfig CORSAllowedOrigins []string DefaultResponseFormat string Root *storage.URI RootContent io.ReadSeeker Version string Logger *zap.Logger }
type Core ¶
type Core struct {
// contains filtered or unexported fields
}
func (*Core) Registry ¶
func (c *Core) Registry() *prometheus.Registry
type Request ¶
func (*Request) BoolFromQuery ¶
func (r *Request) BoolFromQuery(w *ResponseWriter, param string) (bool, bool)
func (*Request) JournalIDFromQuery ¶
func (*Request) StringFromPath ¶
func (r *Request) StringFromPath(w *ResponseWriter, arg string) (string, bool)
func (*Request) TagFromPath ¶
func (*Request) Unmarshal ¶
func (r *Request) Unmarshal(w *ResponseWriter, body interface{}, templates ...interface{}) bool
type ResponseWriter ¶
type ResponseWriter struct { http.ResponseWriter Format string Logger *zap.Logger // contains filtered or unexported fields }
func (*ResponseWriter) ContentType ¶
func (w *ResponseWriter) ContentType() string
func (*ResponseWriter) Error ¶
func (w *ResponseWriter) Error(err error)
func (*ResponseWriter) Marshal ¶
func (w *ResponseWriter) Marshal(body interface{}) bool
func (*ResponseWriter) Respond ¶
func (w *ResponseWriter) Respond(status int, body interface{}) bool
func (*ResponseWriter) ZioWriter ¶
func (w *ResponseWriter) ZioWriter() zio.WriteCloser
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package zqe provides a mechanism to create or wrap errors with information that will aid in reporting them to users and returning them to api callers.
|
Package zqe provides a mechanism to create or wrap errors with information that will aid in reporting them to users and returning them to api callers. |
Click to show internal directories.
Click to hide internal directories.