Documentation ¶
Index ¶
- Constants
- type Auth0Authenticator
- type AuthConfig
- type Config
- type Core
- type Request
- func (r *Request) BoolFromQuery(param string, w *ResponseWriter) (bool, bool)
- func (r *Request) CommitID(w *ResponseWriter) (ksuid.KSUID, bool)
- func (r *Request) JournalIDFromQuery(param string, w *ResponseWriter) (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(arg string, w *ResponseWriter) (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) SetContentType(ct string)
- func (w *ResponseWriter) Write(b []byte) (int, error)
- func (w *ResponseWriter) ZioWriter() zio.WriteCloser
- func (w *ResponseWriter) ZioWriterWithOpts(opts anyio.WriterOpts) 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 // ClientID and Domain are sent in the /auth/method response so that api // clients can interact with the right Auth0 tenant (production, testing, etc) // to obtain tokens. ClientID string Domain string }
func (*AuthConfig) SetFlags ¶
func (c *AuthConfig) SetFlags(fs *flag.FlagSet)
type Config ¶
type Config struct { Auth AuthConfig Logger *zap.Logger Root *storage.URI RootContent io.ReadSeeker Version string }
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(param string, w *ResponseWriter) (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 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) SetContentType ¶
func (w *ResponseWriter) SetContentType(ct string)
func (*ResponseWriter) ZioWriter ¶
func (w *ResponseWriter) ZioWriter() zio.WriteCloser
func (*ResponseWriter) ZioWriterWithOpts ¶
func (w *ResponseWriter) ZioWriterWithOpts(opts anyio.WriterOpts) zio.WriteCloser
Source Files ¶
Click to show internal directories.
Click to hide internal directories.