Documentation
¶
Index ¶
- Constants
- func AccountStatusHandler(svc *services.BillingAccountService, accountStatusRequest string) http.HandlerFunc
- func AddFileDataLoader(appCfg *appconfig.Config, c STSClient, k services.KeycloakClient) http.HandlerFunc
- func AddUser(svc *services.WorkspaceService) http.HandlerFunc
- func CreateAccount(svc *services.BillingAccountService) http.HandlerFunc
- func CreateLinkedAccount(svc *services.LinkedAccountService) http.HandlerFunc
- func CreateWorkspace(svc *services.WorkspaceService) http.HandlerFunc
- func CreateWorkspaceSession(kc KeycloakClient) http.HandlerFunc
- func DeleteAccount(svc *services.BillingAccountService) http.HandlerFunc
- func DeleteFileDataLoader(appCfg *appconfig.Config, c STSClient, k services.KeycloakClient) http.HandlerFunc
- func DeleteLinkedAccount(svc *services.LinkedAccountService) http.HandlerFunc
- func DeleteWorkspace(svc *services.WorkspaceService) http.HandlerFunc
- func DeleteWorkspaceBlockFile(svc *services.FileService) http.HandlerFunc
- func DeleteWorkspaceObjectFile(svc *services.FileService) http.HandlerFunc
- func GetAccount(svc *services.BillingAccountService) http.HandlerFunc
- func GetAccounts(svc *services.BillingAccountService) http.HandlerFunc
- func GetLinkedAccounts(svc *services.LinkedAccountService) http.HandlerFunc
- func GetS3Credentials(roleArn string, c STSClient, k services.KeycloakClient, r *http.Request) (awsclient.S3Credentials, error)
- func GetUser(svc *services.WorkspaceService) http.HandlerFunc
- func GetUsers(svc *services.WorkspaceService) http.HandlerFunc
- func GetWorkspace(svc *services.WorkspaceService) http.HandlerFunc
- func GetWorkspaceBlockFileMetadata(svc *services.FileService) http.HandlerFunc
- func GetWorkspaceFiles(svc *services.FileService) http.HandlerFunc
- func GetWorkspaceObjectFileMetadata(svc *services.FileService) http.HandlerFunc
- func GetWorkspaces(svc *services.WorkspaceService) http.HandlerFunc
- func PatchWorkspace(svc *services.WorkspaceService) http.HandlerFunc
- func RemoveUser(svc *services.WorkspaceService) http.HandlerFunc
- func RequestS3CredentialsHandler(roleArn string, c STSClient, k services.KeycloakClient) http.HandlerFunc
- func UpdateAccount(svc *services.BillingAccountService) http.HandlerFunc
- func UpdateWorkspace(svc *services.WorkspaceService) http.HandlerFunc
- func UploadWorkspaceBlockFiles(svc *services.FileService) http.HandlerFunc
- func UploadWorkspaceObjectFiles(svc *services.FileService) http.HandlerFunc
- func ValidateAirbusLinkedAccount(svc *services.LinkedAccountService) http.HandlerFunc
- func ValidatePlanetLinkedAccount(svc *services.LinkedAccountService) http.HandlerFunc
- type AuthSessionResponse
- type DataLoaderFileUpload
- type DataLoaderFilesDelete
- type KeycloakClient
- type STSClient
Constants ¶
const TimeFormat string = "2006-01-02T15:04:05Z"
Variables ¶
This section is empty.
Functions ¶
func AccountStatusHandler ¶
func AccountStatusHandler(svc *services.BillingAccountService, accountStatusRequest string) http.HandlerFunc
ApproveAccount handles account approval requests
func AddFileDataLoader ¶
func AddFileDataLoader(appCfg *appconfig.Config, c STSClient, k services.KeycloakClient) http.HandlerFunc
AddFileDataLoader is a handler that uploads a file to S3
func AddUser ¶
func AddUser(svc *services.WorkspaceService) http.HandlerFunc
@Summary Add a user to a workspace @Description Add a user to the specified workspace by providing the workspace ID and username. @Tags Workspace Management @Accept json @Produce json @Param workspace-id path string true "Workspace ID" @Param username path string true "Username" @Success 204 {string} string @Failure 400 {object} string @Failure 401 {object} string @Failure 404 {object} string @Failure 500 {object} string @Router /workspaces/{workspace-id}/users/{username} [put]
func CreateAccount ¶
func CreateAccount(svc *services.BillingAccountService) http.HandlerFunc
CreateAccount handles HTTP requests for creating a new account.
func CreateLinkedAccount ¶
func CreateLinkedAccount(svc *services.LinkedAccountService) http.HandlerFunc
CreateAccount handles HTTP requests for creating a new account.
func CreateWorkspace ¶
func CreateWorkspace(svc *services.WorkspaceService) http.HandlerFunc
CreateWorkspace handles HTTP requests for creating a new workspace.
func CreateWorkspaceSession ¶
func CreateWorkspaceSession(kc KeycloakClient) http.HandlerFunc
@Summary Request workspace scoped session credentials @Description Request workspace scoped session credentials for user access to a single workspace. {user-id} can be set to "me" to use the token owner's user id. @Tags Workspace Management @Accept json @Produce json @Param workspace-id path string true "Workspace ID" example(my-workspace) @Param user-id path string true "User ID" example(me) @Success 200 {object} AuthSessionResponse @Failure 400 {object} string @Failure 401 {object} string @Failure 403 {object} string @Failure 500 {object} string @Router /workspaces/{workspace-id}/{user-id}/sessions [post]
func DeleteAccount ¶
func DeleteAccount(svc *services.BillingAccountService) http.HandlerFunc
DeleteAccount handles HTTP requests for deleting an account.
func DeleteFileDataLoader ¶
func DeleteFileDataLoader(appCfg *appconfig.Config, c STSClient, k services.KeycloakClient) http.HandlerFunc
DeleteFileDataLoader is a handler that deletes files from S3
func DeleteLinkedAccount ¶
func DeleteLinkedAccount(svc *services.LinkedAccountService) http.HandlerFunc
DeleteAccount handles HTTP requests for deleting an account.
func DeleteWorkspace ¶
func DeleteWorkspace(svc *services.WorkspaceService) http.HandlerFunc
DeleteWorkspace handles HTTP requests for deleting a workspace
func DeleteWorkspaceBlockFile ¶
func DeleteWorkspaceBlockFile(svc *services.FileService) http.HandlerFunc
@Summary Delete a file from the workspace block store @Description Delete a file from the workspace block store. @Tags Workspace Files Management @Security BearerAuth @Accept json @Produce json @Param workspace-id path string true "Workspace ID" @Param file query string true "File name to delete" @Success 200 {object} services.FileDeleteResponse @Failure 400 {object} string @Failure 401 {object} string @Failure 403 {object} string @Failure 404 {object} string @Failure 409 {object} services.FileDeleteResponse @Failure 500 {object} string @Router /workspaces/{workspace-id}/files/block [delete]
func DeleteWorkspaceObjectFile ¶
func DeleteWorkspaceObjectFile(svc *services.FileService) http.HandlerFunc
@Summary Delete a file from the workspace object store @Description Delete a file from the workspace object store. @Tags Workspace Files Management @Security BearerAuth @Accept json @Produce json @Param workspace-id path string true "Workspace ID" @Param file query string true "File name to delete" @Success 200 {object} services.FileDeleteResponse @Failure 400 {object} string @Failure 401 {object} string @Failure 403 {object} string @Failure 404 {object} string @Failure 409 {object} services.FileDeleteResponse @Failure 500 {object} string @Router /workspaces/{workspace-id}/files/object [delete]
func GetAccount ¶
func GetAccount(svc *services.BillingAccountService) http.HandlerFunc
GetAccount retrieves a billing account by ID. @Summary Get a billing account @Description Retrieve details of a specific billing account by its unique ID. @Tags Billing and Billing Accounts @Accept json @Produce json @Param id path string true "Account ID" @Success 200 {object} models.Account @Failure 400 {object} string @Failure 401 {object} string @Failure 404 {object} string @Failure 500 {object} string @Router /accounts/{id} [get]
func GetAccounts ¶
func GetAccounts(svc *services.BillingAccountService) http.HandlerFunc
GetAccounts retrieves all billing accounts for the authenticated user. @Summary Get billing accounts @Description Retrieve a list of billing accounts owned by the authenticated user. @Tags Billing and Billing Accounts @Accept json @Produce json @Success 200 {array} models.Account @Failure 401 {object} string @Failure 500 {object} string @Router /accounts [get]
func GetLinkedAccounts ¶
func GetLinkedAccounts(svc *services.LinkedAccountService) http.HandlerFunc
GetAccounts handles HTTP requests for retrieving accounts.
func GetS3Credentials ¶
func GetS3Credentials(roleArn string, c STSClient, k services.KeycloakClient, r *http.Request) (awsclient.S3Credentials, error)
GetS3Credentials extracts the core logic to retrieve S3 credentials
func GetUser ¶
func GetUser(svc *services.WorkspaceService) http.HandlerFunc
@Summary Get a user of a workspace @Description Retrieve details of a specific user that is a member of the specified workspace. @Tags Workspace Management @Accept json @Produce json @Param workspace-id path string true "Workspace ID" @Param username path string true "Username" @Success 200 {object} models.User @Failure 400 {object} string @Failure 401 {object} string @Failure 404 {object} string @Failure 500 {object} string @Router /workspaces/{workspace-id}/users/{username} [get]
func GetUsers ¶
func GetUsers(svc *services.WorkspaceService) http.HandlerFunc
@Summary Get users of a workspace @Description Retrieve a list of users who are members of the specified workspace. @Tags Workspace Management @Accept json @Produce json @Param workspace-id path string true "Workspace ID" @Success 200 {array} models.User @Failure 400 {object} string @Failure 401 {object} string @Failure 500 {object} string @Router /workspaces/{workspace-id}/users [get]
func GetWorkspace ¶
func GetWorkspace(svc *services.WorkspaceService) http.HandlerFunc
@Summary Get a workspace by ID @Description Retrieve a specific workspace using its ID for the authenticated user. @Tags Workspace Management @Accept json @Produce json @Param workspace-id path string true "Workspace ID" // Workspace ID from the URL path @Success 200 {object} ws_manager.WorkspaceSettings @Failure 400 {object} string @Failure 401 {object} string @Failure 500 {object} string @Router /workspaces/{workspace-id} [get]
func GetWorkspaceBlockFileMetadata ¶
func GetWorkspaceBlockFileMetadata(svc *services.FileService) http.HandlerFunc
@Summary Get block store file metadata @Description Get metadata for a single file in the workspace block store. @Tags Workspace Files Management @Security BearerAuth @Accept json @Produce json @Param workspace-id path string true "Workspace ID" @Param file query string true "File name within the workspace" @Success 200 {object} services.FileMetadataResponse @Failure 400 {object} string @Failure 401 {object} string @Failure 403 {object} string @Failure 404 {object} string @Failure 500 {object} string @Router /workspaces/{workspace-id}/files/block/metadata [get]
func GetWorkspaceFiles ¶
func GetWorkspaceFiles(svc *services.FileService) http.HandlerFunc
@Summary List files in a workspace @Description List files for object and/or block stores in a workspace. @Tags Workspace Files Management @Security BearerAuth @Accept json @Produce json @Param workspace-id path string true "Workspace ID" @Param store query string false "Store type: object or block" @Success 200 {object} services.FileListResponse @Failure 400 {object} string @Failure 401 {object} string @Failure 403 {object} string @Failure 404 {object} string @Failure 500 {object} string @Router /workspaces/{workspace-id}/files [get]
func GetWorkspaceObjectFileMetadata ¶
func GetWorkspaceObjectFileMetadata(svc *services.FileService) http.HandlerFunc
@Summary Get object store file metadata @Description Get metadata for a single file in the workspace object store. @Tags Workspace Files Management @Security BearerAuth @Accept json @Produce json @Param workspace-id path string true "Workspace ID" @Param file query string true "File name within the workspace" @Success 200 {object} services.FileMetadataResponse @Failure 400 {object} string @Failure 401 {object} string @Failure 403 {object} string @Failure 404 {object} string @Failure 500 {object} string @Router /workspaces/{workspace-id}/files/object/metadata [get]
func GetWorkspaces ¶
func GetWorkspaces(svc *services.WorkspaceService) http.HandlerFunc
@Summary Get a list of workspaces you are a member of @Description Retrieve a list of workspaces for the authenticated user. @Tags Workspace Management @Accept json @Produce json @Success 200 {array} ws_manager.WorkspaceSettings @Failure 401 {object} string @Failure 500 {object} string @Router /workspaces [get]
func PatchWorkspace ¶
func PatchWorkspace(svc *services.WorkspaceService) http.HandlerFunc
PatchWorkspace handles HTTP requests for partially updating a specific workspace by ID. This is a placeholder for the actual implementation.
func RemoveUser ¶
func RemoveUser(svc *services.WorkspaceService) http.HandlerFunc
@Summary Remove a user from a workspace @Description Remove a user from the specified workspace by providing the workspace ID and username. @Tags Workspace Management @Accept json @Produce json @Param workspace-id path string true "Workspace ID" @Param username path string true "Username" @Success 204 {string} string @Failure 400 {object} string @Failure 401 {object} string @Failure 404 {object} string @Failure 500 {object} string @Router /workspaces/{workspace-id}/users/{username} [delete]
func RequestS3CredentialsHandler ¶
func RequestS3CredentialsHandler(roleArn string, c STSClient, k services.KeycloakClient) http.HandlerFunc
@Summary Request S3 session credentials @Description Request S3 session credentials for user access to a single workspace. {user-id} can be set to "me" to use the token owner's user id. @Tags Workspace Management @Accept json @Produce json @Param workspace-id path string true "Workspace ID" example(my-workspace) @Param user-id path string true "User ID" example(me) @Success 200 {object} awsclient.S3Credentials @Failure 400 {object} string @Failure 401 {object} string @Failure 500 {object} string @Router /workspaces/{workspace-id}/{user-id}/s3-tokens [post]
func UpdateAccount ¶
func UpdateAccount(svc *services.BillingAccountService) http.HandlerFunc
UpdateAccount handles HTTP requests for updating an account.
func UpdateWorkspace ¶
func UpdateWorkspace(svc *services.WorkspaceService) http.HandlerFunc
UpdateWorkspace handles HTTP requests for updating a specific workspace by ID. This is a placeholder for the actual implementation.
func UploadWorkspaceBlockFiles ¶
func UploadWorkspaceBlockFiles(svc *services.FileService) http.HandlerFunc
@Summary Upload files to the workspace block store @Description Upload files to the workspace block store. @Tags Workspace Files Management @Security BearerAuth @Accept multipart/form-data @Produce json @Param workspace-id path string true "Workspace ID" @Param files formData file true "Files to upload" @Success 201 {object} services.FileUploadResponse @Failure 400 {object} string @Failure 401 {object} string @Failure 403 {object} string @Failure 404 {object} string @Failure 500 {object} string @Router /workspaces/{workspace-id}/files/block [post]
func UploadWorkspaceObjectFiles ¶
func UploadWorkspaceObjectFiles(svc *services.FileService) http.HandlerFunc
@Summary Upload files to the workspace object store @Description Upload files to the workspace object store. @Tags Workspace Files Management @Security BearerAuth @Accept multipart/form-data @Produce json @Param workspace-id path string true "Workspace ID" @Param files formData file true "Files to upload" @Success 201 {object} services.FileUploadResponse @Failure 400 {object} string @Failure 401 {object} string @Failure 403 {object} string @Failure 404 {object} string @Failure 500 {object} string @Router /workspaces/{workspace-id}/files/object [post]
func ValidateAirbusLinkedAccount ¶
func ValidateAirbusLinkedAccount(svc *services.LinkedAccountService) http.HandlerFunc
ValidateAirbusLinkedAccount handles HTTP requests for validating an Airbus linked account.
func ValidatePlanetLinkedAccount ¶
func ValidatePlanetLinkedAccount(svc *services.LinkedAccountService) http.HandlerFunc
ValidatePlanetLinkedAccount handles HTTP requests for validating an Planet linked account.
Types ¶
type AuthSessionResponse ¶
type DataLoaderFileUpload ¶
type DataLoaderFilesDelete ¶
type DataLoaderFilesDelete struct {
Keys []string `json:"keys"`
}
type KeycloakClient ¶
type KeycloakClient interface {
ExchangeToken(token, scope string) (*services.TokenResponse, error)
}