apiv1

package
v0.0.0-...-ca3ac9b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2023 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const APIVersion = "1"

APIVersion the actual implemented api version

Variables

View Source
var APIKey string

APIKey the apikey of this service

View Source
var BaseURL = fmt.Sprintf("/api/v%s", APIVersion)

BaseURL is the url all endpoints will be available under

BlobStore the blobstorage implementation to use

Functions

func APIRoutes

func APIRoutes(cfn config.Config, trc opentracing.Tracer) (*chi.Mux, error)

APIRoutes defining all api v1 routes

func AdminRoutes

func AdminRoutes() (string, *chi.Mux)

AdminRoutes getting all routes for the admin endpoint

func BlobRoutes

func BlobRoutes() (string, *chi.Mux)

BlobRoutes getting a router with all blob routes active

func ConfigRoutes

func ConfigRoutes() (string, *chi.Mux)

ConfigRoutes getting all routes for the config endpoint

func DeleteBlob

func DeleteBlob(response http.ResponseWriter, request *http.Request)

DeleteBlob delete a dedicated blob from the storage for the tenant path param id: the id of the blob to remove

func DeleteTenant

func DeleteTenant(response http.ResponseWriter, request *http.Request)

DeleteTenant deleting the store for a tenant, this will automatically delete all data in the store async @Summary deleting the store for a tenant, this will automatically delete all data in the store. On sync you will get an empty string as process, for async operations you will get an id of the deletion process @Tags configs @Accept json @Produce json @Security api_key @Param tenant header string true "Tenant" @Success 200 {array} DeleteResponse "response with the id of the started process for deletion as json" @Failure 400 {object} serror.Serr "client error information as json" @Failure 500 {object} serror.Serr "server error information as json" @Router /config [delete]

func GetBlob

func GetBlob(response http.ResponseWriter, request *http.Request)

GetBlob getting one blob file for a tenant from the storage path parameter id: the id of the blob file

func GetBlobCheck

func GetBlobCheck(response http.ResponseWriter, request *http.Request)

GetBlobCheck getting the latest check info of a blob file from the storage path param: id: the id of the blob file

func GetBlobInfo

func GetBlobInfo(response http.ResponseWriter, request *http.Request)

GetBlobInfo getting the info of a blob file from the storage path param: id: the id of the blob file

func GetBlobResetRetention

func GetBlobResetRetention(response http.ResponseWriter, request *http.Request)

GetBlobResetRetention restting the retention time of a blob to the new value path param: id: the id of the lob file

func GetBlobs

func GetBlobs(response http.ResponseWriter, request *http.Request)

GetBlobs query all blobs from the storage for a tenant query params offset: the offset to start from limit: max count of blobs

func GetCheck

func GetCheck(response http.ResponseWriter, request *http.Request)

GetCheck starting a new check for this tenant @Summary starting a new check for this tenant @Tags configs @Accept json @Produce json @Security api_key @Param tenant header string true "Tenant" @Success 200 {array} CreateResponse "response with the id of the tenant as json" @Failure 400 {object} serror.Serr "client error information as json" @Failure 500 {object} serror.Serr "server error information as json" @Router /api/v1/admin/check [get]

func GetRestore

func GetRestore(response http.ResponseWriter, request *http.Request)

GetRestore starting a new check for this tenant @Summary starting a new check for this tenant @Tags configs @Accept json @Produce json @Security api_key @Param tenant header string true "Tenant" @Success 200 {array} CreateResponse "response with the id of the tenant as json" @Failure 400 {object} serror.Serr "client error information as json" @Failure 500 {object} serror.Serr "server error information as json" @Router /api/v1/admin/restore [get]

func GetTenantConfig

func GetTenantConfig(response http.ResponseWriter, request *http.Request)

GetTenantConfig getting if a store for a tenant is initialised @Summary getting if a store for a tenant is initialised, because of the automatic store creation, the value is more likely that data is stored for this tenant @Tags configs @Accept json @Produce json @Security api_key @Param tenant header string true "Tenant" @Success 200 {array} GetResponse "response with the id of the tenant and the created flag as bool as json" @Failure 400 {object} serror.Serr "client error information as json" @Failure 500 {object} serror.Serr "server error information as json" @Router /config [get]

func GetTenantSize

func GetTenantSize(response http.ResponseWriter, request *http.Request)

GetTenantSize size of the store for a tenant @Summary Get the size of the store for a tenant @Tags configs @Accept json @Produce json @Security api_key @Param tenant header string true "Tenant" @Success 200 {array} SizeResponse "response with the size as json" @Failure 400 {object} serror.Serr "client error information as json" @Failure 500 {object} serror.Serr "server error information as json" @Router /config/size [get]

func HealthRoutes

func HealthRoutes(cfn config.Config, tracer opentracing.Tracer) *chi.Mux

HealthRoutes returning the health routes

func PostBlob

func PostBlob(response http.ResponseWriter, request *http.Request)

PostBlob creating a new blob in the storage for the tenant.

func PostBlobCheck

func PostBlobCheck(response http.ResponseWriter, request *http.Request)

PostBlobCheck starting a new check for this tenant @Summary starting a new check for this tenant @Tags configs @Accept json @Produce json @Security api_key @Param tenant header string true "Tenant" @Success 200 {array} CreateResponse "response with the id of the tenant as json" @Failure 400 {object} serror.Serr "client error information as json" @Failure 500 {object} serror.Serr "server error information as json" @Router /api/v1/admin/check [post]

func PostCheck

func PostCheck(response http.ResponseWriter, request *http.Request)

PostCheck starting a new check for this tenant @Summary starting a new check for this tenant @Tags configs @Accept json @Produce json @Security api_key @Param tenant header string true "Tenant" @Success 200 {array} CreateResponse "response with the id of the tenant as json" @Failure 400 {object} serror.Serr "client error information as json" @Failure 500 {object} serror.Serr "server error information as json" @Router /api/v1/admin/check [post]

func PostCreateTenant

func PostCreateTenant(response http.ResponseWriter, request *http.Request)

PostCreateTenant create a new store for a tenant because of the automatic store creation, this method will always return 201 @Summary create a new store for a tenant because of the automatic store creation, this method will always return 201 @Tags configs @Accept json @Produce json @Security api_key @Param tenant header string true "Tenant" @Success 200 {array} CreateResponse "response with the id of the tenant as json" @Failure 400 {object} serror.Serr "client error information as json" @Failure 500 {object} serror.Serr "server error information as json" @Router /config [post]

func PostRestore

func PostRestore(response http.ResponseWriter, request *http.Request)

PostRestore starting a new check for this tenant @Summary starting a new check for this tenant @Tags configs @Accept json @Produce json @Security api_key @Param tenant header string true "Tenant" @Success 200 {array} CreateResponse "response with the id of the tenant as json" @Failure 400 {object} serror.Serr "client error information as json" @Failure 500 {object} serror.Serr "server error information as json" @Router /api/v1/admin/restore [post]

func PutBlobInfo

func PutBlobInfo(response http.ResponseWriter, request *http.Request)

PutBlobInfo getting the info of a blob file from the storage path param: id: the id of the blob file

func SearchBlobs

func SearchBlobs(response http.ResponseWriter, request *http.Request)

SearchBlobs search for blobs meeting the criteria query params offset: the offset to start from limit: max count of blobs q: query to use

func SearchRoutes

func SearchRoutes() (string, *chi.Mux)

SearchRoutes getting a router with all routes for searching

func StoresRoutes

func StoresRoutes() (string, *chi.Mux)

StoresRoutes getting all routes for the stores endpoint, this is part of the new api. But manly here only a new name.

func TenantStoresRoutes

func TenantStoresRoutes() (string, *chi.Mux)

TenantStoresRoutes getting all routes for the stores endpoint, this is part of the new api. But mainly here only a new name.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL