Documentation
¶
Index ¶
- type ListRepo
- type QuoteRepo
- type Repos
- type Store
- func (s *Store) DeleteQuote(c echo.Context) error
- func (s *Store) GetList(c echo.Context) error
- func (s *Store) GetLists(c echo.Context) error
- func (s *Store) GetListsByToken(c echo.Context) error
- func (s *Store) GetSubscribers(c echo.Context) error
- func (s *Store) GetWebcam(c echo.Context) error
- func (s *Store) ListQuotes(c echo.Context) error
- func (s *Store) ListWebcams(c echo.Context) error
- func (s *Store) NewQuote(c echo.Context) error
- func (s *Store) SubscribeByID(c echo.Context) error
- func (s *Store) SubscribeByToken(c echo.Context) error
- func (s *Store) UnsubscribeByID(c echo.Context) error
- func (s *Store) UnsubscribeByToken(c echo.Context) error
- func (s *Store) UnsubscribeByUUID(c echo.Context) error
- func (s *Store) UpdateQuote(c echo.Context) error
- type WebcamRepo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ListRepo ¶ added in v0.9.6
type ListRepo interface {
GetLists(c echo.Context) error
GetListsByToken(c echo.Context) error
GetList(c echo.Context) error
GetSubscribers(c echo.Context) error
SubscribeByToken(c echo.Context) error
SubscribeByID(c echo.Context) error
UnsubscribeByToken(c echo.Context) error
UnsubscribeByID(c echo.Context) error
UnsubscribeByUUID(c echo.Context) error
}
Repos stores our dependencies
type QuoteRepo ¶ added in v0.9.6
type QuoteRepo interface {
ListQuotes(c echo.Context) error
NewQuote(c echo.Context) error
UpdateQuote(c echo.Context) error
DeleteQuote(c echo.Context) error
}
Repos stores our dependencies
type Store ¶ added in v0.9.6
type Store struct {
// contains filtered or unexported fields
}
Repos stores our dependencies
func (*Store) DeleteQuote ¶ added in v0.9.6
DeleteQuote handles deleting quotes @Summary Delete quote @Description deletes a quote by ID. @ID delete-quote @Tags misc-quotes @Param quoteid path int true "Quote ID" @Success 200 @Router /v1/internal/misc/quotes/{quoteid} [delete]
func (*Store) GetList ¶ added in v0.9.6
GetList handles listing a mailing list including the subscribers
@Summary Get Mailing list @Description Get a mailing list. Provides list subscribers also @ID get-mailing-list-id @Tags misc-list @Produce json @Param listid path int true "List ID" @Success 200 {object} misc.List @Router /v1/internal/misc/list/{listid} [get]
func (*Store) GetLists ¶ added in v0.9.6
GetLists handles listing mailing lists
@Summary Get Mailing lists @Description Lists all mailing lists. @ID get-mailing-lists @Tags misc-list @Produce json @Success 200 {array} misc.List @Router /v1/internal/misc/lists [get]
func (*Store) GetListsByToken ¶ added in v0.9.6
GetListsByToken handles listing mailing lists enables IsSubscribed check
@Summary Get Mailing lists by token @Description Lists all mailing lists, provides extra context for what the user has subscribed to @ID get-mailing-lists-token @Tags misc-list @Produce json @Success 200 {array} misc.List @Router /v1/internal/misc/lists/my [get]
func (*Store) GetSubscribers ¶ added in v0.9.6
GetSubscribers handles listing a mailing list's subscribers
@Summary Get subscribers @Description Get a mailing list's subscribers @ID get-mailing-list-subscribers-id @Tags misc-list @Produce json @Param listid path int true "List ID" @Success 200 {object} misc.List @Router /v1/internal/misc/list/{listid}/subscribers [get]
func (*Store) GetWebcam ¶ added in v0.9.6
GetWebcam handles reverse proxying a webcam @Summary Get webcam @Description Reverse proxies the selected webcam returns the jpeg feed as a result. @ID get-webcam @Tags misc-webcams @Param cameraID path int true "Camera ID" @Router /v1/internal/misc/webcams/{cameraID} [get]
func (*Store) ListQuotes ¶ added in v0.9.6
ListQuotes handles listing quotes by pagination @Summary List quotes @Description Lists quotes by pagination. @ID get-quotes @Tags misc-quotes @Produce json @Param amount path int true "Amount" @Param page path int true "Page" @Success 200 {array} misc.QuotePage @Router /v1/internal/misc/quotes/{amount}/{page} [get]
func (*Store) ListWebcams ¶ added in v0.9.6
ListWebcams handles listing all webcams a user can access @Summary List webcams @Description List webcams available to user by using the permission ID @ID list-webcams @Tags misc-webcams @Success 200 {array} misc.Webcam @Router /v1/internal/misc/webcams [get]
func (*Store) NewQuote ¶ added in v0.9.6
NewQuote handles creating a quote @Summary New quote @Description creates a new quote. @Description web-api will overwrite created by User ID with the token's user ID. @ID new-quote @Tags misc-quotes @Accept json @Param quote body misc.Quote true "Quote object" @Success 201 {object} int "Quote ID" @Router /v1/internal/misc/quotes [post]
func (*Store) SubscribeByID ¶ added in v0.9.6
SubscribeByID handles subscribing a user to a mailing list
@Summary Subscribe to mailing list by user ID @Description Subscribe to a mailing list by a user ID @ID new-mailing-list-subscriber-id @Tags misc-list @Accept json @Param listid path int true "List ID" @Param userid path int true "User ID" @Success 201 @Router /v1/internal/misc/list/{listid}/subscribe/{userid} [post]
func (*Store) SubscribeByToken ¶ added in v0.9.6
SubscribeByToken handles subscribing a user to a mailing list
@Summary Subscribe to mailing list by token @Description Subscribe to a mailing list by a JWT @ID new-mailing-list-subscriber-token @Tags misc-list @Accept json @Param listid path int true "List ID" @Success 201 @Router /v1/internal/misc/list/{listid}/subscribe [post]
func (*Store) UnsubscribeByID ¶ added in v0.9.6
UnsubscribeByID handles subscribing a user to a mailing list
@Summary Unsubscribe to mailing list by user ID @Description Unsubscribe to a mailing list by a user ID @ID delete-mailing-list-subscriber-id @Tags misc-list @Accept json @Param listid path int true "List ID" @Param userid path int true "User ID" @Success 200 @Router /v1/internal/misc/list/{listid}/unsubscribe/{userid} [delete]
func (*Store) UnsubscribeByToken ¶ added in v0.9.6
UnsubscribeByToken handles unsubscribing a user to a mailing list
@Summary Unsubscribe to mailing list by token @Description Unsubscribe to a mailing list by a JWT @ID delete-mailing-list-subscriber-token @Tags misc-list @Accept json @Param listid path int true "List ID" @Success 200 @Router /v1/internal/misc/list/{listid}/unsubscribe [delete]
func (*Store) UnsubscribeByUUID ¶ added in v0.9.6
UnsubscribeByUUID handles subscribing a user to a mailing list
@Summary Unsubscribe to mailing list by subscriber UUID @Description Unsubscribe to a mailing list by a subscriber UUID @ID delete-mailing-list-subscriber-uuid @Tags misc-list @Accept json @Param uuid path int true "Subscriber UUID" @Success 200 @Router /v1/list_unsubscribe/{uuid} [get]
func (*Store) UpdateQuote ¶ added in v0.9.6
UpdateQuote handles updating a quote @Summary Update quote @Description updates a quote. Still need to provide the whole Quote object, @Description web-api will overwrite created by User ID to keep with existing record. @ID update-quote @Tags misc-quotes @Accept json @Param quote body misc.Quote true "Quote object" @Success 200 @Router /v1/internal/misc/quotes [put]