Documentation ¶
Index ¶
Constants ¶
const EncryptionPartHeader = "X-Encryption-Part"
const EncryptionSessionHeader = "X-Encryption-Session"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetShareResponse ¶
type GetShareResponse Share
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func New ¶
func New(app *shareapp.ShareApplication) *Handler
func (*Handler) DeleteShare ¶
func (h *Handler) DeleteShare(w http.ResponseWriter, r *http.Request)
DeleteShare deletes a share @Summary Delete share @Description Delete a share for the user @Tags Share @Accept json @Produce json @Param X-API-Key header string true "API Key" @Param Authorization header string true "Bearer token" @Param X-Auth-Provider header string true "Auth Provider" @Param X-Openfort-Provider header string false "Openfort Provider" @Param X-Openfort-Token-Type header string false "Openfort Token Type" @Success 204 "Description: Share deleted successfully" @Failure 404 "Description: Not Found" @Failure 500 "Description: Internal Server Error" @Router /shares [delete]
func (*Handler) GetShare ¶
func (h *Handler) GetShare(w http.ResponseWriter, r *http.Request)
GetShare gets a share @Summary Get share @Description Get a share for the user @Tags Share @Accept json @Produce json @Param X-API-Key header string true "API Key" @Param Authorization header string true "Bearer token" @Param X-Auth-Provider header string true "Auth Provider" @Param X-Openfort-Provider header string false "Openfort Provider" @Param X-Openfort-Token-Type header string false "Openfort Token Type" @Param X-Encryption-Part header string false "Encryption Part" @Success 200 {object} GetShareResponse "Successful response" @Failure 404 "Description: Not Found" @Failure 500 "Description: Internal Server Error" @Router /shares [get]
func (*Handler) RegisterShare ¶
func (h *Handler) RegisterShare(w http.ResponseWriter, r *http.Request)
RegisterShare registers a new share @Summary Register new share @Description Register a new share for the user @Tags Share @Accept json @Produce json @Param X-API-Key header string true "API Key" @Param Authorization header string true "Bearer token" @Param X-Auth-Provider header string true "Auth Provider" @Param X-Openfort-Provider header string false "Openfort Provider" @Param X-Openfort-Token-Type header string false "Openfort Token Type" @Param registerShareRequest body RegisterShareRequest true "Register Share Request" @Success 201 "Description: Share registered successfully" @Failure 400 {object} api.Error "Bad Request" @Failure 404 {object} api.Error "Not Found" @Failure 500 {object} api.Error "Internal Server Error" @Router /shares/register [post]
func (*Handler) UpdateShare ¶
func (h *Handler) UpdateShare(w http.ResponseWriter, r *http.Request)
UpdateShare updates a share @Summary Update share @Description Update a share for the user @Tags Share @Accept json @Produce json @Param X-API-Key header string true "API Key" @Param Authorization header string true "Bearer token" @Param X-Auth-Provider header string true "Auth Provider" @Param X-Openfort-Provider header string false "Openfort Provider" @Param X-Openfort-Token-Type header string false "Openfort Token Type" @Param updateShareRequest body UpdateShareRequest true "Update Share Request" @Success 200 {object} UpdateShareResponse "Successful response" @Failure 400 {object} api.Error "Bad Request" @Failure 404 {object} api.Error "Not Found" @Failure 500 {object} api.Error "Internal Server Error" @Router /shares [put]
type RegisterShareRequest ¶
type RegisterShareRequest Share
type UpdateShareRequest ¶
type UpdateShareRequest Share
type UpdateShareResponse ¶
type UpdateShareResponse Share