Documentation
¶
Index ¶
- func Authenticator(next http.Handler) http.Handler
- func ChangeSessionRole(w http.ResponseWriter, r *http.Request)
- func CreateTestAdminUser(id, email, password string) *ent.AdminUser
- func CreateTestAdminUserWithDefaultRole(user *ent.AdminUser, role *ent.Role) *ent.AdminUser
- func CreateTestRole(id, name string) *ent.Role
- func HandlerWithHeaders(title, endpoint string, fetcherHeaders, uiHeaders map[string]string) http.HandlerFunc
- func Login(w http.ResponseWriter, r *http.Request)
- func Playground(title, endpoint string) http.HandlerFunc
- func ServeAdmin() http.Handler
- func ServeFS(fsys fs.FS) http.Handler
- func Signup(w http.ResponseWriter, r *http.Request)
- type ChangeSessionRoleRequest
- type LoginFormData
- type SignupFormData
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChangeSessionRole ¶
func ChangeSessionRole(w http.ResponseWriter, r *http.Request)
func CreateTestAdminUser ¶ added in v0.1.5
CreateTestAdminUser creates a test AdminUser entity
func CreateTestAdminUserWithDefaultRole ¶ added in v0.1.5
CreateTestAdminUserWithDefaultRole creates a test AdminUser with DefaultRole in Edges
func CreateTestRole ¶ added in v0.1.5
CreateTestRole creates a test Role entity
func HandlerWithHeaders ¶
func HandlerWithHeaders( title, endpoint string, fetcherHeaders, uiHeaders map[string]string, ) http.HandlerFunc
HandlerWithHeaders sets up the playground. fetcherHeaders are used by the playground's fetcher instance and will not be visible in the UI. uiHeaders are default headers that will show up in the UI headers editor.
func Login ¶
func Login(w http.ResponseWriter, r *http.Request)
TODO: 1. sanitize error messages; 2. move to api; 3. add logs;
func Playground ¶
func Playground(title, endpoint string) http.HandlerFunc
Handler responsible for setting up the playground
func ServeAdmin ¶ added in v0.1.6
Types ¶
type ChangeSessionRoleRequest ¶
type ChangeSessionRoleRequest struct {
Role string
}
type LoginFormData ¶
type SignupFormData ¶
Click to show internal directories.
Click to hide internal directories.