Documentation
¶
Index ¶
- func NewLoginEndpoint(store streamstore.Storage, privateKey interface{}) http.Handler
- func NewSchemaEndpoint(store streamstore.Storage) http.Handler
- func NewUserEndpoint(store streamstore.Storage) http.Handler
- func NewVerifyEndpoint(publicKey interface{}) http.Handler
- type LoginEndpoint
- type LoginRequest
- type SchemaEndpoint
- type UserEndpoint
- type VerifyEndpoint
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLoginEndpoint ¶
func NewLoginEndpoint(store streamstore.Storage, privateKey interface{}) http.Handler
NewLoginEndpoint constructs a new handler instances
func NewSchemaEndpoint ¶
func NewSchemaEndpoint(store streamstore.Storage) http.Handler
NewSchemaEndpoint constructs a new handler instances
func NewUserEndpoint ¶
func NewUserEndpoint(store streamstore.Storage) http.Handler
NewUserEndpoint constructs a new handler instances
func NewVerifyEndpoint ¶
NewVerifyEndpoint constructs a new handler instances
Types ¶
type LoginEndpoint ¶
type LoginEndpoint struct {
// contains filtered or unexported fields
}
LoginEndpoint is an http.Handler which serves CRUD operations for schemas
func (*LoginEndpoint) ServeHTTP ¶
func (endpoint *LoginEndpoint) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP is the function needed to implement http.Handler
type LoginRequest ¶
type LoginRequest struct { ID string `json:"id"` Password string `json:"password"` Claims jwt.Claims `json:"claims"` }
LoginRequest is the struture of a Login Request (haha)
type SchemaEndpoint ¶
type SchemaEndpoint struct {
// contains filtered or unexported fields
}
SchemaEndpoint is an http.Handler which serves CRUD operations for schemas
func (*SchemaEndpoint) ServeHTTP ¶
func (endpoint *SchemaEndpoint) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP is the function needed to implement http.Handler
type UserEndpoint ¶
type UserEndpoint struct {
// contains filtered or unexported fields
}
UserEndpoint is an http.Handler which serves CRUD operations for users So this is CRUD + if payload is json hash the "password" field with bcrypt on all write operations (POST, PUT, PATCH) + if payload is json respect the "id" field as object key in POST requests
func (*UserEndpoint) ServeHTTP ¶
func (endpoint *UserEndpoint) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP is the function needed to implement http.Handler
type VerifyEndpoint ¶
type VerifyEndpoint struct {
// contains filtered or unexported fields
}
VerifyEndpoint is an http.Handler which serves CRUD operations for schemas
func (*VerifyEndpoint) ServeHTTP ¶
func (endpoint *VerifyEndpoint) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP is the function needed to implement http.Handler