Documentation ¶
Index ¶
- Variables
- type Address
- type Contacts
- type Inbox
- type Info
- type Name
- type Outbox
- type ReceiveFileInfo
- type SharingEntry
- type Stat
- type Users
- func (u *Users) CreateNewUser(userName, passPhrase, mnemonic, dataDir string, client blockstore.Client, ...) (string, string, *Info, error)
- func (u *Users) CreateRootFeeds(userInfo *Info) error
- func (u *Users) CreateSettingsFeeds(rootAddress utils.Address, userInfo *Info) error
- func (u *Users) CreateSharingFeeds(rootAddress utils.Address, userInfo *Info) error
- func (u *Users) DeleteUser(userName, dataDir, password, sessionId string, response http.ResponseWriter, ...) error
- func (u *Users) ExportUser(ui *Info) (string, string, error)
- func (u *Users) GetAvatar(userInfo *Info) ([]byte, error)
- func (u *Users) GetContacts(userInfo *Info) (*Contacts, error)
- func (u *Users) GetLoggedInUserInfo(sessionId string) *Info
- func (u *Users) GetName(userInfo *Info) (*Name, error)
- func (u *Users) GetSharingInbox(userInfo *Info) (*Inbox, error)
- func (u *Users) GetSharingOutbox(userInfo *Info) (*Outbox, error)
- func (u *Users) GetUserStat(userInfo *Info) (*Stat, error)
- func (u *Users) ImportUsingAddress(userName, passPhrase, addressString, dataDir string, client blockstore.Client, ...) error
- func (u *Users) IsUserLoggedIn(sessionId string) bool
- func (u *Users) IsUserNameLoggedIn(userName string) bool
- func (u *Users) IsUsernameAvailable(userName string, dataDir string) bool
- func (u *Users) ListAllUsers(dataDir string) []string
- func (u *Users) Login(ui *Info, response http.ResponseWriter) error
- func (u *Users) LoginUser(userName, passPhrase, dataDir string, client blockstore.Client, ...) error
- func (u *Users) Logout(sessionId string, response http.ResponseWriter) error
- func (u *Users) LogoutUser(userName, dataDir, sessionId string, response http.ResponseWriter) error
- func (u *Users) ReceiveFileFromUser(podName string, sharingRef utils.SharingReference, userInfo *Info, ...) (string, string, error)
- func (u *Users) ReceiveFileInfo(podName string, sharingRef utils.SharingReference, userInfo *Info, ...) (*ReceiveFileInfo, error)
- func (u *Users) SaveAvatar(avatar []byte, userInfo *Info) error
- func (u *Users) SaveContacts(phone, mobile string, address *Address, userInfo *Info) error
- func (u *Users) SaveName(firstName, lastName, middleName, surName string, userInfo *Info) error
- func (u *Users) ShareFileWithUser(podName, podFilePath, destinationRef string, userInfo *Info, pod *pod.Pod) (string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUserAlreadyLoggedIn = errors.New("user already logged in") ErrInvalidUserName = errors.New("invalid user name") ErrUserAlreadyPresent = errors.New("user name already present") ErrUserNotLoggedIn = errors.New("user not logged in") ErrInvalidPassword = errors.New("invalid password") )
Functions ¶
This section is empty.
Types ¶
type Inbox ¶
type Inbox struct {
Entries []SharingEntry `json:"entries"`
}
type Info ¶
type Info struct {
// contains filtered or unexported fields
}
func (*Info) GetAccount ¶
func (*Info) GetPodName ¶
func (*Info) GetSessionId ¶
func (*Info) GetUserName ¶
func (*Info) RemovePodName ¶
func (i *Info) RemovePodName()
func (*Info) SetPodName ¶
type Outbox ¶
type Outbox struct {
Entries []SharingEntry `json:"entries"`
}
type ReceiveFileInfo ¶
type ReceiveFileInfo struct { FileName string `json:"name"` Size string `json:"size"` BlockSize string `json:"block_size"` NumberOfBlocks string `json:"number_of_blocks"` ContentType string `json:"content_type"` Compression string `json:"compression"` PodName string `json:"pod_name"` FileMetaHash string `json:"meta_ref"` Sender string `json:"source_address"` Receiver string `json:"dest_address"` }
type SharingEntry ¶
type Users ¶
type Users struct {
// contains filtered or unexported fields
}
func (*Users) CreateNewUser ¶
func (*Users) CreateRootFeeds ¶
func (*Users) CreateSettingsFeeds ¶
func (*Users) CreateSharingFeeds ¶
func (*Users) DeleteUser ¶
func (*Users) GetLoggedInUserInfo ¶
func (*Users) ImportUsingAddress ¶
func (u *Users) ImportUsingAddress(userName, passPhrase, addressString, dataDir string, client blockstore.Client, response http.ResponseWriter, sessionId string) error
func (*Users) IsUserLoggedIn ¶
func (*Users) IsUserNameLoggedIn ¶
func (*Users) IsUsernameAvailable ¶
func (*Users) ListAllUsers ¶
func (*Users) LoginUser ¶
func (u *Users) LoginUser(userName, passPhrase, dataDir string, client blockstore.Client, response http.ResponseWriter, sessionId string) error
func (*Users) LogoutUser ¶
func (u *Users) LogoutUser(userName, dataDir, sessionId string, response http.ResponseWriter) error
func (*Users) ReceiveFileFromUser ¶
func (*Users) ReceiveFileInfo ¶
func (u *Users) ReceiveFileInfo(podName string, sharingRef utils.SharingReference, userInfo *Info, pod *pod.Pod) (*ReceiveFileInfo, error)
func (*Users) SaveContacts ¶
Click to show internal directories.
Click to hide internal directories.