Documentation ¶
Index ¶
- func New(logger *slog.Logger, cfg awesomemy.Config, db *sql.DB) http.Handler
- func NewAuth(logger *slog.Logger, cfg awesomemy.Config, db *sql.DB, sm *scs.SessionManager) http.Handler
- func NewClient(logger *slog.Logger, cfg awesomemy.Config, db *sql.DB, sm *scs.SessionManager) http.Handler
- func NewPublic(logger *slog.Logger, cfg awesomemy.Config, db *sql.DB) http.Handler
- type Auth
- type Client
- func (c *Client) Account(w http.ResponseWriter, r *http.Request)
- func (c *Client) AuthenticateUser(next http.Handler) http.Handler
- func (c *Client) DeleteEvent(w http.ResponseWriter, r *http.Request)
- func (c *Client) DeleteProject(w http.ResponseWriter, r *http.Request)
- func (c *Client) Event(w http.ResponseWriter, r *http.Request)
- func (c *Client) Events(w http.ResponseWriter, r *http.Request)
- func (c *Client) Project(w http.ResponseWriter, r *http.Request)
- func (c *Client) Projects(w http.ResponseWriter, r *http.Request)
- func (c *Client) StoreEvent(w http.ResponseWriter, r *http.Request)
- func (c *Client) StoreProject(w http.ResponseWriter, r *http.Request)
- func (c *Client) UpdateEvent(w http.ResponseWriter, r *http.Request)
- func (c *Client) UpdateProject(w http.ResponseWriter, r *http.Request)
- type Event
- type Project
- type Public
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
func (*Auth) OAuth2Callback ¶
func (a *Auth) OAuth2Callback(w http.ResponseWriter, r *http.Request)
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) DeleteEvent ¶
func (c *Client) DeleteEvent(w http.ResponseWriter, r *http.Request)
func (*Client) DeleteProject ¶
func (c *Client) DeleteProject(w http.ResponseWriter, r *http.Request)
func (*Client) StoreEvent ¶
func (c *Client) StoreEvent(w http.ResponseWriter, r *http.Request)
func (*Client) StoreProject ¶
func (c *Client) StoreProject(w http.ResponseWriter, r *http.Request)
func (*Client) UpdateEvent ¶
func (c *Client) UpdateEvent(w http.ResponseWriter, r *http.Request)
func (*Client) UpdateProject ¶
func (c *Client) UpdateProject(w http.ResponseWriter, r *http.Request)
type Event ¶
type Event struct { Uuid uuid.UUID `json:"uuid"` Name string `json:"name"` Description string `json:"description"` Tags []string `json:"tags"` Website nulls.String `json:"website"` StartsAt time.Time `json:"starts_at"` EndsAt time.Time `json:"ends_at"` CreatedAt time.Time `json:"created_at"` }
func EventFromDatabase ¶
type Project ¶
type Project struct { Uuid uuid.UUID `json:"uuid"` Name string `json:"name"` Description string `json:"description"` Tags []string `json:"tags"` Repository nulls.String `json:"repository"` Website nulls.String `json:"website"` CreatedAt time.Time `json:"created_at"` }
func ProjectFromDatabase ¶
Click to show internal directories.
Click to hide internal directories.