Documentation
¶
Overview ¶
+build:apihttp
Index ¶
Constants ¶
View Source
const ( ConfigName = "server" DefaultPortHTTP2 = 8402 DefaultPortHTTP1 = 8401 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIKeyAuthz ¶
type APIKeyAuthz struct {
APIKeyHandler
}
func NewAPIKeyAuthz ¶
func NewAPIKeyAuthz(cfg *Config) APIKeyAuthz
func (*APIKeyAuthz) ServeHTTP ¶
func (a *APIKeyAuthz) ServeHTTP(w http.ResponseWriter, r *http.Request)
type APIKeyCreator ¶
type APIKeyCreator struct { APIKeyHandler apibin.APIKeyStoreServer }
func NewAPIKeyCreator ¶
func NewAPIKeyCreator(cfg *Config) APIKeyCreator
func (*APIKeyCreator) Create ¶
func (a *APIKeyCreator) Create( ctx context.Context, in *apibin.CreateRequest) (*flatbuffers.Builder, error)
func (*APIKeyCreator) ServeHTTP ¶
func (a *APIKeyCreator) ServeHTTP(w http.ResponseWriter, r *http.Request)
type APIKeyHandler ¶
type APIKeyHandler struct {
// contains filtered or unexported fields
}
func NewAPIKeyHandler ¶
func NewAPIKeyHandler(cfg *Config) APIKeyHandler
func (*APIKeyHandler) EnsureConnected ¶
func (h *APIKeyHandler) EnsureConnected(ctx context.Context) error
func (*APIKeyHandler) ForceReconnect ¶
func (h *APIKeyHandler) ForceReconnect(ctx context.Context) error
type ClientCollection ¶
type ClientCollection struct {
APIKeyHandler
}
func NewClientCollection ¶
func NewClientCollection(cfg *Config) ClientCollection
func (*ClientCollection) ServeHTTP ¶
func (cc *ClientCollection) ServeHTTP(w http.ResponseWriter, r *http.Request)
type ClientRecord ¶
type ClientRecord struct { apikeys.Key DisplayName string `firestore:"display_name"` Audience string `firestore:"aud"` Scope string `firestore:"scope"` }
func (*ClientRecord) MarshalJSON ¶
func (cr *ClientRecord) MarshalJSON() ([]byte, error)
MarshalJSON ensures that derived_key is marshaled as url safe form for consistency with how the parts of the apikeys are serialized
func (*ClientRecord) UnmarshalJSON ¶
func (cr *ClientRecord) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.