api

package
v0.0.0-...-6333696 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidCookie = errors.New("invalid cookie")
)

Functions

This section is empty.

Types

type DirOrFileEntry

type DirOrFileEntry struct {
	Name             string `json:"name"`
	Type             string `json:"type"`
	Size             string `json:"size,omitempty"`
	CreationTime     string `json:"creation_time"`
	ModificationTime string `json:"modification_time"`
	AccessTime       string `json:"access_time"`
}

type Handler

type Handler struct {
	WebHandlers *web.Web
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(dataDir, beeHost, beePort string, logger logging.Logger) (*Handler, error)

func (*Handler) DirectoryLsHandler

func (h *Handler) DirectoryLsHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) DirectoryMkdirHandler

func (h *Handler) DirectoryMkdirHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) DirectoryRmdirHandler

func (h *Handler) DirectoryRmdirHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) DirectoryStatHandler

func (h *Handler) DirectoryStatHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) ExportUserHandler

func (h *Handler) ExportUserHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) FileDeleteHandler

func (h *Handler) FileDeleteHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) FileDownloadHandler

func (h *Handler) FileDownloadHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) FileReceiveHandler

func (h *Handler) FileReceiveHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) FileReceiveInfoHandler

func (h *Handler) FileReceiveInfoHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) FileShareHandler

func (h *Handler) FileShareHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) FileStatHandler

func (h *Handler) FileStatHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) FileUploadHandler

func (h *Handler) FileUploadHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) GetUserAvatarHandler

func (h *Handler) GetUserAvatarHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) GetUserContactHandler

func (h *Handler) GetUserContactHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) GetUserNameHandler

func (h *Handler) GetUserNameHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) GetUserSharingInboxHandler

func (h *Handler) GetUserSharingInboxHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) GetUserSharingOutboxHandler

func (h *Handler) GetUserSharingOutboxHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) GetUserStatHandler

func (h *Handler) GetUserStatHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) ImportUserHandler

func (h *Handler) ImportUserHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) IsUserLoggedInHandler

func (h *Handler) IsUserLoggedInHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) LogMiddleware

func (h *Handler) LogMiddleware(next http.Handler) http.Handler

func (*Handler) LoginMiddleware

func (h *Handler) LoginMiddleware(next http.Handler) http.Handler

func (*Handler) PodCloseHandler

func (h *Handler) PodCloseHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) PodCreateHandler

func (h *Handler) PodCreateHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) PodDeleteHandler

func (h *Handler) PodDeleteHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) PodListHandler

func (h *Handler) PodListHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) PodOpenHandler

func (h *Handler) PodOpenHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) PodStatHandler

func (h *Handler) PodStatHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) PodSyncHandler

func (h *Handler) PodSyncHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) SaveUserAvatarHandler

func (h *Handler) SaveUserAvatarHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) SaveUserContactHandler

func (h *Handler) SaveUserContactHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) SaveUserNameHandler

func (h *Handler) SaveUserNameHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) UserDeleteHandler

func (h *Handler) UserDeleteHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) UserLoginHandler

func (h *Handler) UserLoginHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) UserLogoutHandler

func (h *Handler) UserLogoutHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) UserPresentHandler

func (h *Handler) UserPresentHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) UserSignupHandler

func (h *Handler) UserSignupHandler(w http.ResponseWriter, r *http.Request)

type ListFileResponse

type ListFileResponse struct {
	Entries []dir.DirOrFileEntry `json:"entries"`
}

type LoginStatus

type LoginStatus struct {
	LoggedIn bool `json:"loggedin"`
}

type PodCreateResponse

type PodCreateResponse struct {
	Reference string `json:"reference"`
}

type PodListResponse

type PodListResponse struct {
	Pods []string `json:"name"`
}

type PodOpenResponse

type PodOpenResponse struct {
	Reference string `json:"reference"`
}

type PodStatResponse

type PodStatResponse struct {
	Version          string `json:"version"`
	PodName          string `json:"name"`
	PodPath          string `json:"path"`
	CreationTime     string `json:"cTime"`
	AccessTime       string `json:"aTime"`
	ModificationTime string `json:"mTime"`
}

type Reference

type Reference struct {
	FileName  string `json:"file_name"`
	Reference string `json:"reference,omitempty"`
	Error     string `json:"error,omitempty"`
}

type SharingReference

type SharingReference struct {
	Reference string `json:"sharing_reference"`
}

type UserExportResponse

type UserExportResponse struct {
	Name    string `json:"name"`
	Address string `json:"address"`
}

type UserPresentResponse

type UserPresentResponse struct {
	Present bool `json:"present"`
}

type UserSignupResponse

type UserSignupResponse struct {
	Address  string `json:"address"`
	Mnemonic string `json:"mnemonic,omitempty"`
}

Jump to

Keyboard shortcuts

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