Documentation
¶
Index ¶
- Constants
- Variables
- type Collection
- type Collections
- type DirModeRequest
- type DirPresentResponse
- type DirRequest
- type DocCountRequest
- type DocDeleteRequest
- type DocFind
- type DocFindResponse
- type DocGet
- type DocGetResponse
- type DocIndexRequest
- type DocPutRequest
- type DocRequest
- type DocumentDBs
- type FileDeleteRequest
- type FileModeRequest
- type FileShareRequest
- type FileSharingReference
- type Handler
- func (h *Handler) Close() error
- func (h *Handler) DirectoryLsHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DirectoryMkdirHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DirectoryModeHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DirectoryPresentHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DirectoryRenameHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DirectoryRmdirHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DirectoryStatHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DocCountHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DocCreateHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DocDeleteHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DocEntryDelHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DocEntryGetHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DocEntryPutHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DocFindHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DocIndexJsonHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DocListHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DocLoadJsonHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DocOpenHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ExportUserHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) FileDeleteHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) FileDownloadHandlerGet(w http.ResponseWriter, r *http.Request)
- func (h *Handler) FileDownloadHandlerPost(w http.ResponseWriter, r *http.Request)
- func (h *Handler) FileModeHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) FileReceiveHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) FileReceiveInfoHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) FileRenameHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) FileShareHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) FileStatHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) FileStatusHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) FileUpdateHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) FileUploadHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) IsUserLoggedInHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) KVCountHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) KVCreateHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) KVDelHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) KVDeleteHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) KVExportHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) KVGetDataHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) KVGetHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) KVGetNextHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) KVListHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) KVLoadCSVHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) KVOpenHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) KVPresentHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) KVPutHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) KVSeekHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) LogMiddleware(next http.Handler) http.Handler
- func (h *Handler) LoginMiddleware(next http.Handler) http.Handler
- func (h *Handler) PodCloseHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) PodCreateHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) PodDeleteHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) PodForkFromReferenceHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) PodForkHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) PodListHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) PodOpenAsyncHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) PodOpenHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) PodPresentHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) PodReceiveHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) PodReceiveInfoHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) PodShareHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) PodStatHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) PodSyncAsyncHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) PodSyncHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) PublicPodFilePathHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) PublicPodGetDirHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) PublicPodGetFileHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) PublicPodKVEntryGetHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) UserDeleteHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) UserDeleteV2Handler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) UserLoginHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) UserLoginV2Handler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) UserLogoutHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) UserMigrateHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) UserPresentHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) UserPresentV2Handler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) UserSignupHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) UserSignupV2Handler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) UserStatHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) WebsocketHandler(w http.ResponseWriter, r *http.Request)
- type KVEntryDeleteRequest
- type KVEntryRequest
- type KVExportRequest
- type KVResponse
- type KVResponseRaw
- type KVTableRequest
- type ListFileResponse
- type LoginStatus
- type PodForkFromReferenceRequest
- type PodForkRequest
- type PodListResponse
- type PodNameRequest
- type PodOpenResponse
- type PodSharingReference
- type PodStatResponse
- type PresentResponse
- type ReceiveFileResponse
- type SimpleDocRequest
- type StatusResponse
- type UploadFileResponse
- type UploadResponse
- type UserDeleteRequest
- type UserExportResponse
- type UserLoginResponse
- type UserSignupResponse
Constants ¶
const (
//CompressionHeader
CompressionHeader = "fairOS-dfs-Compression"
)
const (
//DefaultSeekLimit
DefaultSeekLimit = "10"
)
const MaxExportLimit = 100
MaxExportLimit
Variables ¶
var ( //ErrInvalidCookie is used if the cookie is invalid ErrInvalidCookie = errors.New("invalid cookie") )
Functions ¶
This section is empty.
Types ¶
type Collection ¶
type Collection struct { Name string `json:"tableName"` IndexedColumns []string `json:"indexes"` CollectionType string `json:"type"` }
Collection
type DirModeRequest ¶ added in v0.9.2
type DirModeRequest struct { PodName string `json:"podName,omitempty"` DirPath string `json:"dirPath,omitempty"` Mode string `json:"mode,omitempty"` }
DirModeRequest is used for changing dir mode
type DirPresentResponse ¶
type DirPresentResponse struct { Present bool `json:"present"` Error string `json:"error,omitempty"` }
DirPresentResponse is used to represent if a directory is present
type DirRequest ¶ added in v0.9.1
type DirRequest struct { PodName string `json:"podName,omitempty"` DirectoryPath string `json:"dirPath,omitempty"` }
DirRequest is used to create directory
type DocCountRequest ¶ added in v0.9.1
type DocCountRequest struct { PodName string `json:"podName,omitempty"` TableName string `json:"tableName,omitempty"` SimpleIndex string `json:"si,omitempty"` Mutable bool `json:"mutable,omitempty"` Expression string `json:"expr,omitempty"` }
DocCountRequest is used for doc count
type DocDeleteRequest ¶ added in v0.9.1
type DocDeleteRequest struct { PodName string `json:"podName,omitempty"` TableName string `json:"tableName,omitempty"` ID string `json:"id,omitempty"` }
DocDeleteRequest is used to delete entry in doc store
type DocFind ¶ added in v0.9.2
type DocFind struct {
Docs []string `json:"docs"`
}
DocFind is used for listing rows from a document database
type DocFindResponse ¶
type DocFindResponse struct {
Docs [][]byte `json:"docs"`
}
DocFindResponse is used for listing rows from a document database
type DocGet ¶ added in v0.9.2
type DocGet struct {
Doc string `json:"doc"`
}
DocGet represents a single document row
type DocGetResponse ¶
type DocGetResponse struct {
Doc []byte `json:"doc"`
}
DocGetResponse represents a single document row
type DocIndexRequest ¶ added in v0.9.1
type DocIndexRequest struct { PodName string `json:"podName,omitempty"` TableName string `json:"tableName,omitempty"` FileName string `json:"fileName,omitempty"` }
DocIndexRequest is used to index a json file from a pod directly
type DocPutRequest ¶ added in v0.9.1
type DocPutRequest struct { PodName string `json:"podName,omitempty"` TableName string `json:"tableName,omitempty"` Document string `json:"doc,omitempty"` }
DocPutRequest is used to put entry in doc store
type DocRequest ¶ added in v0.9.1
type DocRequest struct { PodName string `json:"podName,omitempty"` TableName string `json:"tableName,omitempty"` SimpleIndex string `json:"si,omitempty"` Mutable bool `json:"mutable,omitempty"` }
DocRequest is used for creating a doc
type DocumentDBs ¶
type DocumentDBs struct {
Tables []documentDB `json:"tables"`
}
DocumentDBs represent a list of documentDB
type FileDeleteRequest ¶ added in v0.9.1
type FileDeleteRequest struct { PodName string `json:"podName,omitempty"` FilePath string `json:"filePath,omitempty"` }
FileDeleteRequest is used in the file delete request
type FileModeRequest ¶ added in v0.9.2
type FileModeRequest struct { PodName string `json:"podName,omitempty"` FilePath string `json:"filePath,omitempty"` Mode string `json:"mode,omitempty"` }
FileModeRequest is used to change file permission mode
type FileSharingReference ¶
type FileSharingReference struct {
Reference string `json:"fileSharingReference"`
}
FileSharingReference represents a file reference
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler
func New ¶ added in v0.9.2
func New(ctx context.Context, beeApi, cookieDomain, postageBlockId string, whitelistedOrigins []string, ensConfig *contracts.ENSConfig, subscriptionConfig *contracts.SubscriptionConfig, logger logging.Logger) (*Handler, error)
New
func NewMockHandler ¶ added in v0.9.1
NewMockHandler is used for tests only
func (*Handler) DirectoryLsHandler ¶
func (h *Handler) DirectoryLsHandler(w http.ResponseWriter, r *http.Request)
DirectoryLsHandler godoc
@Summary List directory @Description DirectoryLsHandler is the api handler for listing the contents of a directory. @Tags dir @Produce json @Param podName query string true "pod name" @Param dirPath query string true "dir path" @Param Cookie header string true "cookie parameter" @Success 200 {object} ListFileResponse @Failure 400 {object} response @Failure 500 {object} response @Router /v1/dir/ls [get]
func (*Handler) DirectoryMkdirHandler ¶
func (h *Handler) DirectoryMkdirHandler(w http.ResponseWriter, r *http.Request)
DirectoryMkdirHandler godoc
@Summary Create directory @Description DirectoryMkdirHandler is the api handler to create a new directory. @Tags dir @Accept json @Produce json @Param dir_request body DirRequest true "pod name and dir path" @Param Cookie header string true "cookie parameter" @Success 201 {object} response @Failure 400 {object} response @Failure 500 {object} response @Router /v1/dir/mkdir [post]
func (*Handler) DirectoryModeHandler ¶ added in v0.9.2
func (h *Handler) DirectoryModeHandler(w http.ResponseWriter, r *http.Request)
DirectoryModeHandler godoc
@Summary change mode of a directory @Description DirectoryModeHandler is the api handler to change mode of a directory @Tags dir @Accept json @Produce json @Param dir_request body DirModeRequest true "dir mode request" @Param Cookie header string true "cookie parameter" @Success 200 {object} response @Failure 400 {object} response @Failure 500 {object} response @Router /v1/dir/chmod [post]
func (*Handler) DirectoryPresentHandler ¶
func (h *Handler) DirectoryPresentHandler(w http.ResponseWriter, r *http.Request)
DirectoryPresentHandler godoc
@Summary Is directory present @Description DirectoryPresentHandler is the api handler which says if a directory is present or not @Tags dir @Produce json @Param podName query string true "pod name" @Param dirPath query string true "dir path" @Param Cookie header string true "cookie parameter" @Success 200 {object} DirPresentResponse @Failure 400 {object} response @Failure 500 {object} response @Router /v1/dir/present [get]
func (*Handler) DirectoryRenameHandler ¶ added in v0.9.1
func (h *Handler) DirectoryRenameHandler(w http.ResponseWriter, r *http.Request)
DirectoryRenameHandler godoc
@Summary Rename directory @Description DirectoryRenameHandler is the api handler to rename a directory. @Tags dir @Accept json @Produce json @Param dir_request body common.RenameRequest true "old name and new path" @Param Cookie header string true "cookie parameter" @Success 200 {object} response @Failure 400 {object} response @Failure 500 {object} response @Router /v1/dir/rename [post]
func (*Handler) DirectoryRmdirHandler ¶
func (h *Handler) DirectoryRmdirHandler(w http.ResponseWriter, r *http.Request)
DirectoryRmdirHandler godoc
@Summary Remove directory @Description DirectoryRmdirHandler is the api handler to remove a directory. @Tags dir @Accept json @Produce json @Param dir_request body DirRequest true "pod name and dir path" @Param Cookie header string true "cookie parameter" @Success 200 {object} response @Failure 400 {object} response @Failure 500 {object} response @Router /v1/dir/rmdir [delete]
func (*Handler) DirectoryStatHandler ¶
func (h *Handler) DirectoryStatHandler(w http.ResponseWriter, r *http.Request)
DirectoryStatHandler godoc
@Summary Directory stat @Description DirectoryStatHandler is the api handler which gives the information about a directory @Tags dir @Produce json @Param podName query string true "pod name" @Param dirPath query string true "dir path" @Param Cookie header string true "cookie parameter" @Success 200 {object} dir.Stats @Failure 400 {object} response @Failure 500 {object} response @Router /v1/dir/stat [get]
func (*Handler) DocCountHandler ¶
func (h *Handler) DocCountHandler(w http.ResponseWriter, r *http.Request)
DocCountHandler godoc
@Summary Count number of document in a table @Description DocCountHandler is the api handler to count the number of documents in a given document database @Tags doc @Accept json @Produce json @Param doc_request body DocCountRequest true "doc table info" @Param Cookie header string true "cookie parameter" @Success 200 {object} collection.TableKeyCount @Failure 400 {object} response @Failure 500 {object} response @Router /v1/doc/count [post]
func (*Handler) DocCreateHandler ¶
func (h *Handler) DocCreateHandler(w http.ResponseWriter, r *http.Request)
DocCreateHandler godoc
@Summary Create in doc table @Description DocCreateHandler is the api handler to create a new document database @Tags doc @Accept json @Produce json @Param doc_request body DocRequest true "doc table info. si or simple index is a comma separated list of keys and their types. eg: 'first_name=string,age=number'. valid index types can be 'string', 'number', 'map', 'list'. default index is 'id' and it should be of type string" @Param Cookie header string true "cookie parameter" @Success 201 {object} response @Failure 400 {object} response @Failure 500 {object} response @Router /v1/doc/new [post]
func (*Handler) DocDeleteHandler ¶
func (h *Handler) DocDeleteHandler(w http.ResponseWriter, r *http.Request)
DocDeleteHandler godoc
@Summary Delete a doc table @Description DocDeleteHandler is the api handler to delete the given document database @Tags doc @Accept json @Produce json @Param doc_request body SimpleDocRequest true "doc table info" @Param Cookie header string true "cookie parameter" @Success 200 {object} response @Failure 400 {object} response @Failure 500 {object} response @Router /v1/doc/delete [delete]
func (*Handler) DocEntryDelHandler ¶ added in v0.9.1
func (h *Handler) DocEntryDelHandler(w http.ResponseWriter, r *http.Request)
DocEntryDelHandler godoc
@Summary Delete a document from a document datastore @Description DocEntryDelHandler is the api handler to delete a document from a document datastore @Tags doc @Accept json @Produce json @Param doc_entry_delete_request query DocDeleteRequest true "doc entry delete" @Param Cookie header string true "cookie parameter" @Success 200 {object} response @Failure 400 {object} response @Failure 500 {object} response @Router /v1/doc/entry/del [delete]
func (*Handler) DocEntryGetHandler ¶ added in v0.9.1
func (h *Handler) DocEntryGetHandler(w http.ResponseWriter, r *http.Request)
DocEntryGetHandler godoc
@Summary Get a document from a document datastore @Description DocEntryGetHandler is the api handler to get a document from a document datastore @Tags doc @Accept json @Produce json @Param podName query string true "pod name" @Param tableName query string true "table name" @Param id query string true "id to search for" @Param Cookie header string true "cookie parameter" @Success 200 {object} DocGet "base64 encoded string" @Failure 400 {object} response @Failure 500 {object} response @Router /v1/doc/entry/get [get]
func (*Handler) DocEntryPutHandler ¶ added in v0.9.1
func (h *Handler) DocEntryPutHandler(w http.ResponseWriter, r *http.Request)
DocEntryPutHandler godoc
@Summary Add a record in document datastore @Description DocEntryPutHandler is the api handler add a document in to a document datastore @Tags doc @Accept json @Produce json @Param doc_entry_put_request query DocPutRequest true "doc put request" @Param Cookie header string true "cookie parameter" @Success 200 {object} response @Failure 400 {object} response @Failure 500 {object} response @Router /v1/doc/entry/put [post]
func (*Handler) DocFindHandler ¶
func (h *Handler) DocFindHandler(w http.ResponseWriter, r *http.Request)
DocFindHandler godoc
@Summary Get rows from a given doc datastore @Description DocFindHandler is the api handler to select rows from a given document datastore @Tags doc @Accept json @Produce json @Param podName query string true "pod name" @Param tableName query string true "table name" @Param expr query string true "expression to search for. allowed operators in expr are =, >, =>, <=, <. eg: 'first_name=>John', 'first_name=>J.', 'first_name=>.', 'age=>30', 'age<=30'. if index is string, expr supports regex. we do not have support for multiple conditions in expr yet" @Param limit query string false "number od documents" @Param Cookie header string true "cookie parameter" @Success 200 {object} DocFind "array of base64 encoded string" @Failure 400 {object} response @Failure 500 {object} response @Router /v1/doc/find [get]
func (*Handler) DocIndexJsonHandler ¶
func (h *Handler) DocIndexJsonHandler(w http.ResponseWriter, r *http.Request)
DocIndexJsonHandler godoc
@Summary Index a json file that is present in a pod, in to the given document database @Description DocIndexJsonHandler is the api handler to index a json file that is present in a pod, in to the given document database @Tags doc @Accept json @Produce json @Param index_request body DocIndexRequest true "index request" @Param Cookie header string true "cookie parameter" @Success 200 {object} response @Failure 400 {object} response @Failure 500 {object} response @Router /v1/doc/indexjson [post]
func (*Handler) DocListHandler ¶
func (h *Handler) DocListHandler(w http.ResponseWriter, r *http.Request)
DocListHandler godoc
@Summary List all doc table @Description DocListHandler is the api handler which lists all the document database in a pod @Tags doc @Accept json @Produce json @Param podName query string true "pod name" @Param Cookie header string true "cookie parameter" @Success 200 {object} DocumentDBs @Failure 400 {object} response @Failure 500 {object} response @Router /v1/doc/ls [get]
func (*Handler) DocLoadJsonHandler ¶
func (h *Handler) DocLoadJsonHandler(w http.ResponseWriter, r *http.Request)
DocLoadJsonHandler godoc
@Summary Load json file from local file system @Description DocLoadJsonHandler is the api handler that indexes a json file that is present in the local file system @Tags doc @Accept mpfd @Produce json @Param podName query string true "pod name" @Param tableName query string true "table name" @Param json formData file true "json to index" @Param Cookie header string true "cookie parameter" @Success 200 {object} response @Failure 400 {object} response @Failure 500 {object} response @Router /v1/doc/loadjson [post]
func (*Handler) DocOpenHandler ¶
func (h *Handler) DocOpenHandler(w http.ResponseWriter, r *http.Request)
DocOpenHandler godoc
@Summary Open a doc table @Description DocOpenHandler is the api handler to open a document database @Tags doc @Accept json @Produce json @Param doc_request body DocRequest true "doc table info" @Param Cookie header string true "cookie parameter" @Success 200 {object} DocumentDBs @Failure 400 {object} response @Failure 500 {object} response @Router /v1/doc/open [post]
func (*Handler) ExportUserHandler ¶
func (h *Handler) ExportUserHandler(w http.ResponseWriter, r *http.Request)
ExportUserHandler godoc
@Tags user @Deprecated @Router /v1/user/export [post]
func (*Handler) FileDeleteHandler ¶
func (h *Handler) FileDeleteHandler(w http.ResponseWriter, r *http.Request)
FileDeleteHandler godoc
@Summary Delete a file @Description FileReceiveHandler is the api handler to delete a file from a given pod @Tags file @Accept json @Produce json @Param file_delete_request body FileDeleteRequest true "pod name and file path" @Param Cookie header string true "cookie parameter" @Success 200 {object} response @Failure 400 {object} response @Failure 404 {object} response @Failure 500 {object} response @Router /v1/file/delete [delete]
func (*Handler) FileDownloadHandlerGet ¶ added in v0.9.1
func (h *Handler) FileDownloadHandlerGet(w http.ResponseWriter, r *http.Request)
FileDownloadHandlerGet godoc
@Summary Download a file @Description FileDownloadHandlerGet is the api handler to download a file from a given pod @Tags file @Accept json @Produce */* @Param podName query string true "pod name" @Param filePath query string true "file path" @Param Cookie header string true "cookie parameter" @Success 200 {array} byte @Failure 400 {object} response @Failure 500 {object} response @Router /v1/file/download [get]
func (*Handler) FileDownloadHandlerPost ¶ added in v0.9.1
func (h *Handler) FileDownloadHandlerPost(w http.ResponseWriter, r *http.Request)
FileDownloadHandlerPost godoc
@Summary Download a file @Description FileDownloadHandlerPost is the api handler to download a file from a given pod @Tags file @Accept mpfd @Produce */* @Param podName formData string true "pod name" @Param filePath formData string true "file path" @Param Cookie header string true "cookie parameter" @Success 200 {array} byte @Failure 400 {object} response @Failure 500 {object} response @Router /v1/file/download [post]
func (*Handler) FileModeHandler ¶ added in v0.9.2
func (h *Handler) FileModeHandler(w http.ResponseWriter, r *http.Request)
FileModeHandler godoc
@Summary chmod a file @Description FileModeHandler is the api handler to change mode of a file @Tags file @Accept mpfd @Produce json @Param file_request body FileModeRequest true "file mode request" @Param Cookie header string true "cookie parameter" @Success 200 {object} response @Failure 400 {object} response @Failure 500 {object} response @Router /v1/file/chmod [Post]
func (*Handler) FileReceiveHandler ¶
func (h *Handler) FileReceiveHandler(w http.ResponseWriter, r *http.Request)
FileReceiveHandler godoc
@Summary Receive a file @Description FileReceiveHandler is the api handler to receive a file in a given pod @Tags file @Accept json @Produce json @Param podName query string true "pod name" @Param sharingRef query string true "sharing reference" @Param dirPath query string true "file location" @Param Cookie header string true "cookie parameter" @Success 200 {object} FileSharingReference @Failure 400 {object} response @Failure 500 {object} response @Router /v1/file/receive [get]
func (*Handler) FileReceiveInfoHandler ¶
func (h *Handler) FileReceiveInfoHandler(w http.ResponseWriter, r *http.Request)
FileReceiveInfoHandler godoc
@Summary Receive a file info @Description FileReceiveInfoHandler is the api handler to receive a file info @Tags file @Accept json @Produce json @Param sharingRef query string true "sharing reference" @Param Cookie header string true "cookie parameter" @Success 200 {object} user.ReceiveFileInfo @Failure 400 {object} response @Failure 500 {object} response @Router /v1/file/receiveinfo [get]
func (*Handler) FileRenameHandler ¶ added in v0.9.1
func (h *Handler) FileRenameHandler(w http.ResponseWriter, r *http.Request)
FileRenameHandler godoc
@Summary Info of a file @Description FileRenameHandler is the api handler to get the information of a file @Tags file @Accept json @Produce json @Param rename_request body common.RenameRequest true "old name & new name" @Param Cookie header string true "cookie parameter" @Success 200 {object} response @Failure 400 {object} response @Failure 404 {object} response @Failure 500 {object} response @Router /v1/file/rename [post]
func (*Handler) FileShareHandler ¶
func (h *Handler) FileShareHandler(w http.ResponseWriter, r *http.Request)
FileShareHandler godoc
@Summary Share a file @Description FileShareHandler is the api handler to share a file from a given pod @Tags file @Accept json @Produce json @Param file_share_request body FileShareRequest true "file share request params" @Param Cookie header string true "cookie parameter" @Success 200 {object} FileSharingReference @Failure 400 {object} response @Failure 500 {object} response @Router /v1/file/share [post]
func (*Handler) FileStatHandler ¶
func (h *Handler) FileStatHandler(w http.ResponseWriter, r *http.Request)
FileStatHandler godoc
@Summary Info of a file @Description FileStatHandler is the api handler to get the information of a file @Tags file @Accept json @Produce json @Param podName query string true "pod name" @Param filePath query string true "file path" @Param Cookie header string true "cookie parameter" @Success 200 {object} file.Stats @Failure 400 {object} response @Failure 500 {object} response @Router /v1/file/stat [get]
func (*Handler) FileStatusHandler ¶ added in v0.9.2
func (h *Handler) FileStatusHandler(w http.ResponseWriter, r *http.Request)
FileStatusHandler godoc
@Summary Sync status of a file @Description FileStatusHandler is the api handler to check sync status of a file from a given pod @Tags file @Accept json @Produce */* @Param podName query string true "pod name" @Param filePath query string true "file path" @Param Cookie header string true "cookie parameter" @Success 200 {array} StatusResponse @Failure 400 {object} response @Failure 500 {object} response @Router /v1/file/status [get]
func (*Handler) FileUpdateHandler ¶ added in v0.9.2
func (h *Handler) FileUpdateHandler(w http.ResponseWriter, r *http.Request)
FileUpdateHandler godoc
@Summary Update a file @Description FileUpdateHandler is the api handler to update a file from a given offset @Tags file @Accept mpfd @Produce json @Param podName formData string true "pod name" @Param filePath formData string true "location" @Param file formData file true "file content to update" @Param offset formData string true "file offset" @Param Cookie header string true "cookie parameter" @Success 200 {object} response @Failure 400 {object} response @Failure 500 {object} response @Router /v1/file/update [Post]
func (*Handler) FileUploadHandler ¶
func (h *Handler) FileUploadHandler(w http.ResponseWriter, r *http.Request)
FileUploadHandler godoc
@Summary Upload a file @Description FileUploadHandler is the api handler to upload a file from a local file system to the dfs @Tags file @Accept mpfd @Produce json @Param podName formData string true "pod name" @Param dirPath formData string true "location" @Param blockSize formData string true "block size to break the file" example(4Kb, 1Mb) @Param files formData file true "file to upload" @Param fairOS-dfs-Compression header string false "cookie parameter" example(snappy, gzip) @Param Cookie header string true "cookie parameter" @Param overwrite formData string false "overwrite the file if already exists" example(true, false) @Success 200 {object} response @Failure 400 {object} response @Failure 500 {object} response @Router /v1/file/upload [Post]
func (*Handler) IsUserLoggedInHandler ¶
func (h *Handler) IsUserLoggedInHandler(w http.ResponseWriter, r *http.Request)
IsUserLoggedInHandler godoc
@Summary Is user logged-in @Description Check if the given user is logged-in @Tags user @Accept json @Produce json @Param userName query string true "username" @Success 200 {object} LoginStatus @Failure 400 {object} response @Router /v1/user/isloggedin [get]
func (*Handler) KVCountHandler ¶
func (h *Handler) KVCountHandler(w http.ResponseWriter, r *http.Request)
KVCountHandler godoc
@Summary Count rows in a key value table @Description KVCountHandler is the api handler to count the number of rows in a key value table @Tags kv @Accept json @Produce json @Param kv_table_request body KVTableRequest true "kv table request" @Param Cookie header string true "cookie parameter" @Success 200 {object} collection.TableKeyCount @Failure 400 {object} response @Failure 500 {object} response @Router /v1/kv/count [post]
func (*Handler) KVCreateHandler ¶
func (h *Handler) KVCreateHandler(w http.ResponseWriter, r *http.Request)
KVCreateHandler godoc
@Summary Create a key value table @Description KVCreateHandler is the api handler to create a key value table @Tags kv @Accept json @Produce json @Param kv_table_request body KVTableRequest true "kv table request" @Param Cookie header string true "cookie parameter" @Success 201 {object} response @Failure 400 {object} response @Failure 500 {object} response @Router /v1/kv/new [post]
func (*Handler) KVDelHandler ¶
func (h *Handler) KVDelHandler(w http.ResponseWriter, r *http.Request)
KVDelHandler godoc
@Summary Delete key-value from the kv table @Description KVDelHandler is the api handler to delete a key and value from the kv table @Tags kv @Accept json @Produce json @Param delete_request body KVEntryDeleteRequest true "delete request" @Param Cookie header string true "cookie parameter" @Success 200 {object} KVResponseRaw @Failure 400 {object} response @Failure 500 {object} response @Router /v1/kv/entry/del [delete]
func (*Handler) KVDeleteHandler ¶
func (h *Handler) KVDeleteHandler(w http.ResponseWriter, r *http.Request)
KVDeleteHandler godoc
@Summary Delete a key value table @Description KVDeleteHandler is the api handler to delete a key value table @Tags kv @Accept json @Produce json @Param kv_table_request body KVTableRequest true "kv table request" @Param Cookie header string true "cookie parameter" @Success 200 {object} response @Failure 400 {object} response @Failure 500 {object} response @Router /v1/kv/delete [delete]
func (*Handler) KVExportHandler ¶ added in v0.8.0
func (h *Handler) KVExportHandler(w http.ResponseWriter, r *http.Request)
KVExportHandler godoc
@Summary Export from a particular key with the given prefix @Description KVExportHandler is the api handler to export from a particular key with the given prefix @Tags kv @Accept json @Produce json @Param export_request body KVExportRequest true "kv export info" @Param Cookie header string true "cookie parameter" @Success 200 {object} []map[string]interface{} @Failure 400 {object} response @Failure 500 {object} response @Router /v1/kv/export [Post]
func (*Handler) KVGetDataHandler ¶ added in v0.7.3
func (h *Handler) KVGetDataHandler(w http.ResponseWriter, r *http.Request)
KVGetDataHandler godoc
@Summary get value from the kv table @Description KVGetDataHandler is the api handler to get raw value from the kv table @Tags kv @Accept json @Produce json @Param podName query string true "pod name" @Param tableName query string true "table name" @Param key query string true "key" @Param format query string false "format of the value" example(byte-string, string) @Param Cookie header string true "cookie parameter" @Success 200 {object} KVResponseRaw @Failure 400 {object} response @Failure 500 {object} response @Router /v1/kv/entry/get-data [get]
func (*Handler) KVGetHandler ¶
func (h *Handler) KVGetHandler(w http.ResponseWriter, r *http.Request)
KVGetHandler godoc
@Summary get value from the kv table @Description KVGetHandler is the api handler to get a value from the kv table @Tags kv @Accept json @Produce json @Param podName query string true "pod name" @Param tableName query string true "table name" @Param key query string true "key" @Param Cookie header string true "cookie parameter" @Success 200 {object} KVResponse @Failure 400 {object} response @Failure 500 {object} response @Router /v1/kv/entry/get [get]
func (*Handler) KVGetNextHandler ¶
func (h *Handler) KVGetNextHandler(w http.ResponseWriter, r *http.Request)
KVGetNextHandler godoc
@Summary Get next value from last seek in kv table @Description KVGetNextHandler is the api handler to get the key and value from the current seek position @Tags kv @Accept json @Produce json @Param podName query string true "pod name" @Param tableName query string true "table name" @Param Cookie header string true "cookie parameter" @Success 200 {object} KVResponse @Success 204 {object} response @Failure 400 {object} response @Failure 500 {object} response @Router /v1/kv/seek/next [Post]
func (*Handler) KVListHandler ¶
func (h *Handler) KVListHandler(w http.ResponseWriter, r *http.Request)
KVListHandler godoc
@Summary List all key value tables @Description KVListHandler is the api handler to list all the key value tables in a pod @Tags kv @Accept json @Produce json @Param podName query string true "pod name" @Param Cookie header string true "cookie parameter" @Success 200 {object} Collections @Failure 400 {object} response @Failure 500 {object} response @Router /v1/kv/ls [get]
func (*Handler) KVLoadCSVHandler ¶
func (h *Handler) KVLoadCSVHandler(w http.ResponseWriter, r *http.Request)
KVLoadCSVHandler godoc
@Summary Upload a csv file in kv table @Description KVLoadCSVHandler is the api handler to load a csv file as key and value in a KV table @Tags kv @Accept mpfd @Produce json @Param podName formData string true "pod name" @Param tableName formData string true "table name" @Param memory formData string false "keep in memory" @Param csv formData file true "file to upload" @Param Cookie header string true "cookie parameter" @Success 200 {object} response @Failure 400 {object} response @Failure 500 {object} response @Router /v1/kv/loadcsv [Post]
func (*Handler) KVOpenHandler ¶
func (h *Handler) KVOpenHandler(w http.ResponseWriter, r *http.Request)
KVOpenHandler godoc
@Summary Open a key value table @Description KVOpenHandler is the api handler to open a key value table @Tags kv @Accept json @Produce json @Param kv_table_request body KVTableRequest true "kv table request" @Param Cookie header string true "cookie parameter" @Success 201 {object} response @Failure 400 {object} response @Failure 500 {object} response @Router /v1/kv/open [post]
func (*Handler) KVPresentHandler ¶ added in v0.7.3
func (h *Handler) KVPresentHandler(w http.ResponseWriter, r *http.Request)
KVPresentHandler godoc
@Summary Check if a value exists in the kv table @Description KVPresentHandler is the api handler to check if a value exists in the kv table @Tags kv @Accept json @Produce json @Param podName query string true "pod name" @Param tableName query string true "table name" @Param key query string true "key" @Param Cookie header string true "cookie parameter" @Success 200 {object} response @Failure 400 {object} response @Failure 500 {object} response @Router /v1/kv/entry/present [get]
func (*Handler) KVPutHandler ¶
func (h *Handler) KVPutHandler(w http.ResponseWriter, r *http.Request)
KVPutHandler godoc
@Summary put key and value in the kv table @Description KVPutHandler is the api handler to put a key-value in the kv table @Tags kv @Accept json @Produce json @Param kv_entry body KVEntryRequest true "kv entry" @Param Cookie header string true "cookie parameter" @Success 200 {object} response @Failure 400 {object} response @Failure 500 {object} response @Router /v1/kv/entry/put [post]
func (*Handler) KVSeekHandler ¶
func (h *Handler) KVSeekHandler(w http.ResponseWriter, r *http.Request)
KVSeekHandler godoc
@Summary Seek in kv table @Description KVSeekHandler is the api handler to seek to a particular key with the given prefix @Tags kv @Accept json @Produce json @Param export_request body KVExportRequest true "kv seek info" @Param Cookie header string true "cookie parameter" @Success 200 {object} response @Failure 400 {object} response @Failure 500 {object} response @Router /v1/kv/seek [Post]
func (*Handler) LogMiddleware ¶
LogMiddleware the server middleware which gets called when an api handler is executed. it is used to collect certain information about the api call and log it.
func (*Handler) LoginMiddleware ¶
LoginMiddleware is a middleware that gets called before executing any of the protected handlers. this check if a there is a valid session id the request and then allows the request handler to proceed for execution.
func (*Handler) PodCloseHandler ¶
func (h *Handler) PodCloseHandler(w http.ResponseWriter, r *http.Request)
PodCloseHandler godoc
@Summary Close pod @Description PodCloseHandler is the api handler to close an open pod @Tags pod @Accept json @Produce json @Param pod_request body PodNameRequest true "pod name" @Param Cookie header string true "cookie parameter" @Success 200 {object} response @Failure 400 {object} response @Failure 500 {object} response @Router /v1/pod/close [post]
func (*Handler) PodCreateHandler ¶
func (h *Handler) PodCreateHandler(w http.ResponseWriter, r *http.Request)
PodCreateHandler godoc
@Summary Create pod @Description PodCreateHandler is the api handler to create a new pod @Tags pod @Accept json @Produce json @Param pod_request body PodNameRequest true "pod name and user password" @Param Cookie header string true "cookie parameter" @Success 201 {object} response @Failure 400 {object} response @Failure 500 {object} response @Router /v1/pod/new [post]
func (*Handler) PodDeleteHandler ¶
func (h *Handler) PodDeleteHandler(w http.ResponseWriter, r *http.Request)
PodDeleteHandler godoc
@Summary Delete pod @Description PodDeleteHandler is the api handler to delete a pod @Tags pod @Accept json @Produce json @Param pod_request body PodNameRequest true "pod name and user password" @Param Cookie header string true "cookie parameter" @Success 200 {object} response @Failure 400 {object} response @Failure 500 {object} response @Router /v1/pod/delete [delete]
func (*Handler) PodForkFromReferenceHandler ¶ added in v0.9.2
func (h *Handler) PodForkFromReferenceHandler(w http.ResponseWriter, r *http.Request)
PodForkFromReferenceHandler godoc
@Summary Fork a pod from sharing reference @Description PodForkFromReferenceHandler is the api handler to fork a pod from a given sharing reference @Tags pod @Accept json @Produce json @Param pod_request body PodForkFromReferenceRequest true "pod name and user password" @Param Cookie header string true "cookie parameter" @Success 200 {object} response @Failure 400 {object} response @Failure 500 {object} response @Router /v1/pod/fork-from-reference [post]
func (*Handler) PodForkHandler ¶ added in v0.9.2
func (h *Handler) PodForkHandler(w http.ResponseWriter, r *http.Request)
PodForkHandler godoc
@Summary Fork a pod @Description PodForkHandler is the api handler to fork a pod @Tags pod @Accept json @Produce json @Param pod_request body PodForkRequest true "pod name and user password" @Param Cookie header string true "cookie parameter" @Success 200 {object} response @Failure 400 {object} response @Failure 500 {object} response @Router /v1/pod/fork [post]
func (*Handler) PodListHandler ¶
func (h *Handler) PodListHandler(w http.ResponseWriter, r *http.Request)
PodListHandler godoc
@Summary List pods @Description PodListHandler is the api handler to list all pods @Tags pod @Accept json @Produce json @Param Cookie header string true "cookie parameter" @Success 200 {object} PodListResponse @Failure 400 {object} response @Failure 500 {object} response @Router /v1/pod/ls [get]
func (*Handler) PodOpenAsyncHandler ¶ added in v0.9.1
func (h *Handler) PodOpenAsyncHandler(w http.ResponseWriter, r *http.Request)
PodOpenAsyncHandler godoc
@Summary Open pod @Description PodOpenAsyncHandler is the api handler to open pod asynchronously @Tags pod @Accept json @Produce json @Param pod_request body PodNameRequest true "pod name and user password" @Param Cookie header string true "cookie parameter" @Success 200 {object} response @Failure 400 {object} response @Failure 500 {object} response @Router /v1/pod/open-async [post]
func (*Handler) PodOpenHandler ¶
func (h *Handler) PodOpenHandler(w http.ResponseWriter, r *http.Request)
PodOpenHandler godoc
@Summary Open pod @Description PodOpenHandler is the api handler to open pod @Tags pod @Accept json @Produce json @Param pod_request body PodNameRequest true "pod name and user password" @Param Cookie header string true "cookie parameter" @Success 200 {object} response @Failure 400 {object} response @Failure 500 {object} response @Router /v1/pod/open [post]
func (*Handler) PodPresentHandler ¶ added in v0.7.3
func (h *Handler) PodPresentHandler(w http.ResponseWriter, r *http.Request)
PodPresentHandler godoc
@Summary Is pod present @Description PodPresentHandler is the api handler to check if a pod is present @Tags pod @Accept json @Produce json @Param podName query string true "pod name" @Param Cookie header string true "cookie parameter" @Success 200 {object} response @Failure 400 {object} response @Failure 500 {object} response @Router /v1/pod/present [get]
func (*Handler) PodReceiveHandler ¶
func (h *Handler) PodReceiveHandler(w http.ResponseWriter, r *http.Request)
PodReceiveHandler godoc
@Summary Receive shared pod @Description PodReceiveHandler is the api handler to receive shared pod from shared reference @Tags pod @Accept json @Produce json @Param sharingRef query string true "pod sharing reference" @Param sharedPodName query string false "pod name to be saved as" @Param Cookie header string true "cookie parameter" @Success 200 {object} response @Failure 400 {object} response @Failure 500 {object} response @Router /v1/pod/receive [get]
func (*Handler) PodReceiveInfoHandler ¶
func (h *Handler) PodReceiveInfoHandler(w http.ResponseWriter, r *http.Request)
PodReceiveInfoHandler godoc
@Summary Receive shared pod info @Description PodReceiveInfoHandler is the api handler to receive shared pod info from shared reference @Tags pod @Accept json @Produce json @Param sharingRef query string true "pod sharing reference" @Param Cookie header string true "cookie parameter" @Success 200 {object} pod.ShareInfo @Failure 400 {object} response @Failure 500 {object} response @Router /v1/pod/receiveinfo [get]
func (*Handler) PodShareHandler ¶
func (h *Handler) PodShareHandler(w http.ResponseWriter, r *http.Request)
PodShareHandler godoc
@Summary Share pod @Description PodShareHandler is the api handler to share a pod to the public @Tags pod @Accept json @Produce json @Param pod_request body common.PodShareRequest true "pod name and user password" @Param Cookie header string true "cookie parameter" @Success 200 {object} PodSharingReference @Failure 400 {object} response @Failure 500 {object} response @Router /v1/pod/share [post]
func (*Handler) PodStatHandler ¶
func (h *Handler) PodStatHandler(w http.ResponseWriter, r *http.Request)
PodStatHandler godoc
@Summary Stats for pod @Description PodStatHandler is the api handler get information about a pod @Tags pod @Accept json @Produce json @Param podName query string true "pod name" @Param Cookie header string true "cookie parameter" @Success 200 {object} PodStatResponse @Failure 400 {object} response @Failure 500 {object} response @Router /v1/pod/stat [get]
func (*Handler) PodSyncAsyncHandler ¶ added in v0.9.2
func (h *Handler) PodSyncAsyncHandler(w http.ResponseWriter, r *http.Request)
PodSyncAsyncHandler godoc
@Summary Sync pod asynchronously @Description PodSyncAsyncHandler is the api handler to sync a pod's content @Tags pod @Accept json @Produce json @Param pod_request body PodNameRequest true "pod name" @Param Cookie header string true "cookie parameter" @Success 200 {object} response @Failure 400 {object} response @Failure 500 {object} response @Router /v1/pod/sync-async [post]
func (*Handler) PodSyncHandler ¶
func (h *Handler) PodSyncHandler(w http.ResponseWriter, r *http.Request)
PodSyncHandler godoc
@Summary Sync pod @Description PodSyncHandler is the api handler to sync a pod's content @Tags pod @Accept json @Produce json @Param pod_request body PodNameRequest true "pod name" @Param Cookie header string true "cookie parameter" @Success 200 {object} response @Failure 400 {object} response @Failure 500 {object} response @Router /v1/pod/sync [post]
func (*Handler) PublicPodFilePathHandler ¶ added in v0.9.3
func (h *Handler) PublicPodFilePathHandler(w http.ResponseWriter, r *http.Request)
PublicPodFilePathHandler godoc
@Summary download file from a shared pod @Description PublicPodFilePathHandler is the api handler to download file from a shared pod @Tags pod @Accept json @Produce json @Success 200 {object} pod.ShareInfo @Failure 400 {object} response @Failure 500 {object} response @Router /public/{ref}/{file} [get]
func (*Handler) PublicPodGetDirHandler ¶ added in v0.9.3
func (h *Handler) PublicPodGetDirHandler(w http.ResponseWriter, r *http.Request)
PublicPodGetDirHandler godoc
@Summary List directory content @Description PublicPodGetDirHandler is the api handler to list content of a directory from a public pod @Tags pod @Accept json @Produce json @Param sharingRef query string true "pod sharing reference" @Param dirPath query string true "dir location in the pod" @Success 200 {object} pod.ShareInfo @Failure 400 {object} response @Failure 500 {object} response @Router /public-dir [get]
func (*Handler) PublicPodGetFileHandler ¶ added in v0.9.3
func (h *Handler) PublicPodGetFileHandler(w http.ResponseWriter, r *http.Request)
PublicPodGetFileHandler godoc
@Summary download file from a shared pod @Description PodReceiveInfoHandler is the api handler to download file from a shared pod @Tags pod @Accept json @Produce json @Param sharingRef query string true "pod sharing reference" @Param filePath query string true "file location in the pod" @Success 200 {object} pod.ShareInfo @Failure 400 {object} response @Failure 500 {object} response @Router /public-file [get]
func (*Handler) PublicPodKVEntryGetHandler ¶ added in v0.9.3
func (h *Handler) PublicPodKVEntryGetHandler(w http.ResponseWriter, r *http.Request)
PublicPodKVEntryGetHandler godoc
@Summary get key from public pod @Description PublicPodKVEntryGetHandler is the api handler to get key from key value store from a public pod @Tags public @Accept json @Produce json @Param sharingRef query string true "pod sharing reference" @Param tableName query string true "table name" @Param key query string true "key to look up" @Success 200 {object} pod.ShareInfo @Failure 400 {object} response @Failure 500 {object} response @Router /public-kv [get]
func (*Handler) UserDeleteHandler ¶
func (h *Handler) UserDeleteHandler(w http.ResponseWriter, r *http.Request)
UserDeleteHandler godoc
@Tags user @Deprecated @Router /v1/user/delete [post]
func (*Handler) UserDeleteV2Handler ¶ added in v0.8.0
func (h *Handler) UserDeleteV2Handler(w http.ResponseWriter, r *http.Request)
UserDeleteV2Handler godoc
@Summary Delete user for ENS based authentication @Description deletes user info from swarm @Tags user @Produce json @Param UserDeleteRequest body UserDeleteRequest true "user delete request" @Param Cookie header string true "cookie parameter" @Success 200 {object} response @Failure 400 {object} response @Failure 500 {object} response @Router /v2/user/delete [delete]
func (*Handler) UserLoginHandler ¶
func (h *Handler) UserLoginHandler(w http.ResponseWriter, r *http.Request)
UserLoginHandler godoc
@Tags user @Deprecated @Router /v1/user/login [post]
func (*Handler) UserLoginV2Handler ¶ added in v0.8.0
func (h *Handler) UserLoginV2Handler(w http.ResponseWriter, r *http.Request)
UserLoginV2Handler godoc
@Summary Login User @Description login user with the new ENS based authentication @Tags user @Accept json @Produce json @Param user_request body common.UserLoginRequest true "username" @Success 200 {object} UserLoginResponse @Failure 400 {object} response @Failure 404 {object} response @Failure 500 {object} response @Header 200 {string} Set-Cookie "fairos-dfs session" @Router /v2/user/login [post]
func (*Handler) UserLogoutHandler ¶
func (h *Handler) UserLogoutHandler(w http.ResponseWriter, r *http.Request)
UserLogoutHandler godoc
@Summary Logout @Description logs-out user @Tags user @Accept json @Param Cookie header string true "cookie parameter" @Success 200 {object} response @Failure 400 {object} response @Failure 500 {object} response @Router /v1/user/logout [post]
func (*Handler) UserMigrateHandler ¶ added in v0.8.0
func (h *Handler) UserMigrateHandler(w http.ResponseWriter, r *http.Request)
UserMigrateHandler is the api handler to migrate local user credential to secondary location in swarm it takes only one argument - password: the password of the user
func (*Handler) UserPresentHandler ¶
func (h *Handler) UserPresentHandler(w http.ResponseWriter, r *http.Request)
UserPresentHandler godoc
@Tags user @Deprecated @Router /v1/user/present [get]
func (*Handler) UserPresentV2Handler ¶ added in v0.8.0
func (h *Handler) UserPresentV2Handler(w http.ResponseWriter, r *http.Request)
UserPresentV2Handler godoc
@Summary Check if user is present @Description checks if the new user is present in the new ENS based authentication @Tags user @Produce json @Param userName query string true "username" @Success 200 {object} PresentResponse @Failure 400 {object} response @Router /v2/user/present [get]
func (*Handler) UserSignupHandler ¶
func (h *Handler) UserSignupHandler(w http.ResponseWriter, r *http.Request)
UserSignupHandler godoc
@Tags user @Deprecated @Router /v1/user/signup [post]
func (*Handler) UserSignupV2Handler ¶ added in v0.8.0
func (h *Handler) UserSignupV2Handler(w http.ResponseWriter, r *http.Request)
UserSignupV2Handler godoc
@Summary Register New User @Description registers new user with the new ENS based authentication @Tags user @Accept json @Produce json @Param user_request body common.UserSignupRequest true "username" @Success 201 {object} UserSignupResponse @Failure 400 {object} response @Failure 402 {object} UserSignupResponse @Failure 500 {object} response @Router /v2/user/signup [post]
func (*Handler) UserStatHandler ¶ added in v0.7.0
func (h *Handler) UserStatHandler(w http.ResponseWriter, r *http.Request)
UserStatHandler godoc
@Summary User stat @Description show user stats @Tags user @Accept json @Param Cookie header string true "cookie parameter" @Success 200 {object} user.Stat @Failure 400 {object} response @Failure 500 {object} response @Router /v1/user/stat [get]
func (*Handler) WebsocketHandler ¶ added in v0.7.1
func (h *Handler) WebsocketHandler(w http.ResponseWriter, r *http.Request)
WebsocketHandler
type KVEntryDeleteRequest ¶ added in v0.9.1
type KVEntryDeleteRequest struct { PodName string `json:"podName,omitempty"` TableName string `json:"tableName,omitempty"` Key string `json:"key,omitempty"` }
KVEntryDeleteRequest
type KVEntryRequest ¶ added in v0.9.1
type KVEntryRequest struct { PodName string `json:"podName,omitempty"` TableName string `json:"tableName,omitempty"` Key string `json:"key,omitempty"` Value string `json:"value,omitempty"` }
KVEntryRequest
type KVExportRequest ¶ added in v0.9.1
type KVExportRequest struct { PodName string `json:"podName,omitempty"` TableName string `json:"tableName,omitempty"` StartPrefix string `json:"startPrefix,omitempty"` EndPrefix string `json:"endPrefix,omitempty"` Limit string `json:"limit,omitempty"` }
KVExportRequest
type KVResponse ¶
KVResponse
type KVResponseRaw ¶ added in v0.7.3
KVResponseRaw
type KVTableRequest ¶ added in v0.9.1
type KVTableRequest struct { PodName string `json:"podName,omitempty"` TableName string `json:"tableName,omitempty"` IndexType string `json:"indexType,omitempty"` }
KVTableRequest
type ListFileResponse ¶
type ListFileResponse struct { Directories []dir.Entry `json:"dirs,omitempty"` Files []file.Entry `json:"files,omitempty"` }
ListFileResponse is used to list directories and files
type PodForkFromReferenceRequest ¶ added in v0.9.2
type PodForkFromReferenceRequest struct { ForkName string `json:"forkName,omitempty"` Reference string `json:"podSharingReference"` }
PodForkFromReferenceRequest
type PodForkRequest ¶ added in v0.9.2
type PodForkRequest struct { PodName string `json:"podName,omitempty"` ForkName string `json:"forkName,omitempty"` }
PodForkRequest
type PodNameRequest ¶ added in v0.9.1
type PodNameRequest struct {
PodName string `json:"podName,omitempty"`
}
PodNameRequest
type PodOpenResponse ¶
type PodOpenResponse struct {
Reference string `json:"reference"`
}
PodOpenResponse
type PodSharingReference ¶
type PodSharingReference struct {
Reference string `json:"podSharingReference"`
}
PodSharingReference
type PodStatResponse ¶
PodStatResponse
type PresentResponse ¶ added in v0.7.3
type PresentResponse struct {
Present bool `json:"present"`
}
PresentResponse
type ReceiveFileResponse ¶
type ReceiveFileResponse struct {
FileName string `json:"fileName"`
}
ReceiveFileResponse represents the response for receiving a file
type SimpleDocRequest ¶ added in v0.9.1
type SimpleDocRequest struct { PodName string `json:"podName,omitempty"` TableName string `json:"tableName,omitempty"` }
SimpleDocRequest is used in doc delete request
type StatusResponse ¶ added in v0.9.2
type StatusResponse struct { Total int64 `json:"total"` Processed int64 `json:"processed"` Synced int64 `json:"synced"` }
StatusResponse
type UploadFileResponse ¶
type UploadFileResponse struct {
Responses []UploadResponse
}
UploadFileResponse
type UploadResponse ¶ added in v0.9.1
type UploadResponse struct { FileName string `json:"fileName"` Message string `json:"message,omitempty"` }
UploadResponse
type UserDeleteRequest ¶ added in v0.9.1
type UserDeleteRequest struct {
Password string `json:"password,omitempty"`
}
UserDeleteRequest
type UserExportResponse ¶
UserExportResponse
Source Files
¶
- dir_chmod.go
- dir_ls.go
- dir_mkdir.go
- dir_present.go
- dir_rename.go
- dir_rmdir.go
- dir_stat.go
- doc_count.go
- doc_delete.go
- doc_find.go
- doc_indexjson.go
- doc_loadjson.go
- doc_ls.go
- doc_new.go
- doc_open.go
- doc_put_get_del.go
- errors.go
- file_chmod.go
- file_delete.go
- file_download.go
- file_rename.go
- file_share.go
- file_stat.go
- file_status.go
- file_update.go
- file_upload.go
- handler.go
- kv_count.go
- kv_delete.go
- kv_export.go
- kv_loadcsv.go
- kv_ls.go
- kv_new.go
- kv_open.go
- kv_put_get_del.go
- kv_seek_getnext.go
- log_middleware.go
- login_middleware.go
- pod_close.go
- pod_delete.go
- pod_fork.go
- pod_ls.go
- pod_new.go
- pod_open.go
- pod_present.go
- pod_share.go
- pod_stat.go
- pod_sync.go
- public.go
- respond.go
- user_del.go
- user_export.go
- user_islogin.go
- user_login.go
- user_login_v1.go
- user_logout.go
- user_migrate.go
- user_present.go
- user_signup.go
- user_signup_v1.go
- user_stat.go
- ws.go