Documentation
¶
Index ¶
- type Handler
- func (h *Handler) Create(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Delete(w http.ResponseWriter, r *http.Request)
- func (h *Handler) List(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ListGoogleSearchConsoleSites(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Read(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ReadPublicSite(w http.ResponseWriter, r *http.Request)
- func (h *Handler) SetGoogleOAuthRefreshToken(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Update(w http.ResponseWriter, r *http.Request)
- type NewParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func (*Handler) Create ¶
func (h *Handler) Create(w http.ResponseWriter, r *http.Request)
Create godoc @Description Create site. @Param params body poeticmetric.CreateOrganizationSiteParams true "Params" @Router /sites [post] @Security UserAccessTokenAuthentication @Success 201 {object} poeticmetric.OrganizationSite @Summary Create site @Tags sites
func (*Handler) Delete ¶
func (h *Handler) Delete(w http.ResponseWriter, r *http.Request)
Delete godoc @Description Delete an organization site. @Param siteID path int true "Site ID" @Router /sites/{siteID} [delete] @Security UserAccessTokenAuthentication @Success 204 @Summary Delete site @Tags sites
func (*Handler) List ¶
func (h *Handler) List(w http.ResponseWriter, r *http.Request)
List godoc @Description List sites. @Router /sites [get] @Security UserAccessTokenAuthentication @Success 200 {array} poeticmetric.OrganizationSite @Summary List sites @Tags sites
func (*Handler) ListGoogleSearchConsoleSites ¶
func (h *Handler) ListGoogleSearchConsoleSites(w http.ResponseWriter, r *http.Request)
ListGoogleSearchConsoleSites godoc @Description List Google Search Console sites for the site with Google OAuth refresh token. @Param siteID path int true "Site ID" @Router /sites/{siteID}/google-search-console-sites [get] @Security UserAccessTokenAuthentication @Success 200 {array} poeticmetric.OrganizationSite @Summary List Google Search Console sites @Tags sites
func (*Handler) Read ¶
func (h *Handler) Read(w http.ResponseWriter, r *http.Request)
Read godoc @Description Read an organization site. @Param siteID path int true "Site ID" @Router /sites/{siteID} [get] @Security UserAccessTokenAuthentication @Success 200 {array} poeticmetric.OrganizationSite @Summary Read site @Tags sites
func (*Handler) ReadPublicSite ¶
func (h *Handler) ReadPublicSite(w http.ResponseWriter, r *http.Request)
ReadPublicSite godoc @Description Read a public site by its domain. @Param siteDomain path string true "Site Domain" @Router /public-sites/{siteDomain} [get] @Success 200 {object} poeticmetric.PublicSiteResponse @Failure 404 {object} responder.DetailResponse @Summary Read public site @Tags sites
func (*Handler) SetGoogleOAuthRefreshToken ¶
func (h *Handler) SetGoogleOAuthRefreshToken(w http.ResponseWriter, r *http.Request)
SetGoogleOAuthRefreshToken godoc @Description Set site's Google OAuth refresh token using oauth. @Param siteID path int true "Site ID" @Param params body poeticmetric.SetSiteGoogleOAuthRefreshTokenParams true "Params" @Router /sites/{siteID}/google-oauth [post] @Security UserAccessTokenAuthentication @Success 200 {object} poeticmetric.OrganizationSite @Summary Set site Google OAuth refresh token @Tags sites
func (*Handler) Update ¶
func (h *Handler) Update(w http.ResponseWriter, r *http.Request)
Update godoc @Description Update organization site. @Param siteID path int true "Site ID" @Param params body poeticmetric.UpdateOrganizationSiteParams true "Params" @Router /sites/{siteID} [patch] @Security UserAccessTokenAuthentication @Success 200 {array} poeticmetric.OrganizationSite @Summary Update site @Tags sites
type NewParams ¶
type NewParams struct {
Decoder *schema.Decoder
Responder poeticmetric.RestApiResponder
SiteService poeticmetric.SiteService
}