Documentation ¶
Index ¶
- type AddProvidersRequest
- type AddProvidersResponse
- type CreateProjectRequest
- type CreateProjectResponse
- type CustomProvider
- type EncryptBodyRequest
- type GetProjectResponse
- type GetProviderResponse
- type GetProvidersResponse
- type Handler
- func (h *Handler) AddProviders(w http.ResponseWriter, r *http.Request)
- func (h *Handler) CreateProject(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DeleteProvider(w http.ResponseWriter, r *http.Request)
- func (h *Handler) EncryptProjectShares(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetProject(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetProvider(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetProviders(w http.ResponseWriter, r *http.Request)
- func (h *Handler) RegisterEncryptionKey(w http.ResponseWriter, r *http.Request)
- func (h *Handler) RegisterEncryptionSession(w http.ResponseWriter, r *http.Request)
- func (h *Handler) UpdateProvider(w http.ResponseWriter, r *http.Request)
- type KeyType
- type OpenfortProvider
- type ProviderResponse
- type ProvidersRequest
- type RegisterEncryptionKeyResponse
- type RegisterEncryptionSessionRequest
- type RegisterEncryptionSessionResponse
- type UpdateProviderRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddProvidersRequest ¶
type AddProvidersRequest struct {
Providers ProvidersRequest `json:"providers"`
}
type AddProvidersResponse ¶
type AddProvidersResponse struct {
Providers []*ProviderResponse `json:"providers"`
}
type CreateProjectRequest ¶
type CreateProjectResponse ¶
type CustomProvider ¶
type EncryptBodyRequest ¶
type EncryptBodyRequest struct {
EncryptionPart string `json:"encryption_part"`
}
type GetProjectResponse ¶
type GetProviderResponse ¶
type GetProvidersResponse ¶
type GetProvidersResponse struct {
Providers []*ProviderResponse `json:"providers"`
}
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is the REST handler for project operations
func (*Handler) AddProviders ¶
func (h *Handler) AddProviders(w http.ResponseWriter, r *http.Request)
AddProviders adds providers to a project @Summary Add providers @Description Add one or more providers to a project @Tags Project @Accept json @Produce json @Param X-API-Key header string true "API Key" @Param X-API-Secret header string true "API Secret" @Param addProvidersRequest body AddProvidersRequest true "Add Providers Request" @Success 200 {object} AddProvidersResponse "Providers added successfully" @Failure 400 "Bad Request" @Failure 500 {object} api.Error "Internal Server Error" @Router /project/providers [post]
func (*Handler) CreateProject ¶
func (h *Handler) CreateProject(w http.ResponseWriter, r *http.Request)
CreateProject creates a new project @Summary Create a new project @Description Create a new project with the provided name @Tags Project @Accept json @Produce json @Param createProjectRequest body CreateProjectRequest true "Create Project Request" @Success 201 {object} CreateProjectResponse "Project created successfully" @Failure 400 {object} api.Error "Bad Request" @Failure 500 {object} api.Error "Internal Server Error" @Router /register [post]
func (*Handler) DeleteProvider ¶
func (h *Handler) DeleteProvider(w http.ResponseWriter, r *http.Request)
DeleteProvider removes a provider from a project @Summary Delete a provider @Description Remove a specific provider from a project @Tags Project @Param X-API-Key header string true "API Key" @Param X-API-Secret header string true "API Secret" @Param provider path string true "Provider ID" @Success 200 "Provider deleted successfully" @Failure 404 "Provider not found" @Failure 500 {object} api.Error "Internal Server Error" @Router /project/providers/{provider} [delete]
func (*Handler) EncryptProjectShares ¶
func (h *Handler) EncryptProjectShares(w http.ResponseWriter, r *http.Request)
EncryptProjectShares encrypts all shares of a project (if not already encrypted) @Summary Encrypt project shares @Description Encrypt all shares of a project @Tags Project @Param X-API-Key header string true "API Key" @Param X-API-Secret header string true "API Secret" @Param encryptBodyRequest body EncryptBodyRequest true "Add Allowed Origin Request" @Success 200 "Shares encrypted successfully" @Failure 500 {object} api.Error "Internal Server Error" @Router /project/encrypt [post]
func (*Handler) GetProject ¶
func (h *Handler) GetProject(w http.ResponseWriter, r *http.Request)
GetProject retrieves a project @Summary Get a project @Description Get details of a project @Tags Project @Produce json @Param X-API-Key header string true "API Key" @Param X-API-Secret header string true "API Secret" @Success 200 {object} GetProjectResponse "Successful response" @Failure 404 {object} api.Error "Not Found" @Failure 500 {object} api.Error "Internal Server Error" @Router /project [get]
func (*Handler) GetProvider ¶
func (h *Handler) GetProvider(w http.ResponseWriter, r *http.Request)
GetProvider retrieves a specific provider @Summary Get a provider @Description Get details of a specific provider @Tags Project @Produce json @Param X-API-Key header string true "API Key" @Param X-API-Secret header string true "API Secret" @Param provider path string true "Provider ID" @Success 200 {object} GetProviderResponse "Successful response" @Failure 404 "Provider not found" @Failure 500 {object} api.Error "Internal Server Error" @Router /project/providers/{provider} [get]
func (*Handler) GetProviders ¶
func (h *Handler) GetProviders(w http.ResponseWriter, r *http.Request)
GetProviders lists all providers of a project @Summary List providers @Description Get a list of all providers associated with a project @Tags Project @Produce json @Param X-API-Key header string true "API Key" @Param X-API-Secret header string true "API Secret" @Success 200 {object} GetProvidersResponse "Successful response" @Failure 500 {object} api.Error "Internal Server Error" @Router /project/providers [get]
func (*Handler) RegisterEncryptionKey ¶
func (h *Handler) RegisterEncryptionKey(w http.ResponseWriter, r *http.Request)
RegisterEncryptionKey registers an encryption key for a project @Summary Register encryption key @Description Register an encryption key for a project @Tags Project @Accept json @Produce json @Param X-API-Key header string true "API Key" @Param X-API-Secret header string true "API Secret" @Success 200 {object} RegisterEncryptionKeyResponse "Encryption key registered successfully" @Failure 400 "Bad Request" @Failure 500 {object} api.Error "Internal Server Error" @Router /project/encryption-key [post]
func (*Handler) RegisterEncryptionSession ¶
func (h *Handler) RegisterEncryptionSession(w http.ResponseWriter, r *http.Request)
RegisterEncryptionSession registers a session with a one-time encryption key for a project @Summary Register encryption session @Description Register a session with a one-time encryption key for a project @Tags Project @Accept json @Produce json @Param X-API-Key header string true "API Key" @Param X-API-Secret header string true "API Secret" @Param registerEncryptionSessionRequest body RegisterEncryptionSessionRequest true "Add Allowed Origin Request" @Success 200 {object} RegisterEncryptionSessionResponse "Encryption session registered successfully" @Failure 400 "Bad Request" @Failure 500 {object} api.Error "Internal Server Error" @Router /project/encryption-session [post]
func (*Handler) UpdateProvider ¶
func (h *Handler) UpdateProvider(w http.ResponseWriter, r *http.Request)
UpdateProvider updates a provider's configuration @Summary Update a provider @Description Update the configuration of a specific provider @Tags Project @Accept json @Param X-API-Key header string true "API Key" @Param X-API-Secret header string true "API Secret" @Param provider path string true "Provider ID" @Param updateProviderRequest body UpdateProviderRequest true "Update Provider Request" @Success 200 "Provider updated successfully" @Failure 400 "Bad Request" @Failure 500 {object} api.Error "Internal Server Error" @Router /project/providers/{provider} [put]
type OpenfortProvider ¶
type ProviderResponse ¶
type ProvidersRequest ¶
type ProvidersRequest struct { Openfort *OpenfortProvider `json:"openfort,omitempty"` Custom *CustomProvider `json:"custom,omitempty"` }
type RegisterEncryptionKeyResponse ¶
type RegisterEncryptionKeyResponse struct {
EncryptionPart string `json:"encryption_part"`
}
type RegisterEncryptionSessionRequest ¶
type RegisterEncryptionSessionRequest struct {
EncryptionPart string `json:"encryption_part"`
}
type RegisterEncryptionSessionResponse ¶
type RegisterEncryptionSessionResponse struct {
SessionID string `json:"session_id"`
}