Documentation ¶
Index ¶
- Variables
- func CreateGenericBuckets(db *bolt.DB) error
- func CreateUserContactBucket(userBucket string, db *bolt.DB) error
- type CONTROLLER
- func (c *CONTROLLER) AddContactToList(p *Person)
- func (c *CONTROLLER) AddFileToContact(sender string, file utils.File) error
- func (c *CONTROLLER) Authorize(apiKey string) (User, error)
- func (c *CONTROLLER) CheckForExistingUser() error
- func (c *CONTROLLER) CloseDb() error
- func (c *CONTROLLER) CreatePersonFromIdentifier(identifier string) *Person
- func (c *CONTROLLER) DeleteContactFromList(identifier string)
- func (c *CONTROLLER) DownloadFileFromContact(pendingContact, pendingFile string) error
- func (c *CONTROLLER) GetDownloadedFiles() ([]utils.File, error)
- func (c *CONTROLLER) InitialiseDatabase() error
- func (c *CONTROLLER) Logout(callback func())
- func (c *CONTROLLER) OpenDownloadedFile(filePath string) error
- func (c *CONTROLLER) RemoveCurrentUser() error
- func (c *CONTROLLER) RetrieveAllPeople(userBucket string) ([]Person, error)
- func (c *CONTROLLER) RetrieveFilesForUser() error
- func (c *CONTROLLER) RetrievePerson(userBucket, userId string) (*Person, error)
- func (c *CONTROLLER) RetrieveUser() (*User, error)
- func (c *CONTROLLER) SearchForContacts(searchQuery string) ([]Person, error)
- func (c *CONTROLLER) StoreErrorMessage(message string, code int) error
- func (c *CONTROLLER) StorePerson(userBucket string, p *Person) error
- func (c *CONTROLLER) StoreStatusMessage(message string, code int) error
- func (c *CONTROLLER) StoreUser(u *User) error
- func (c *CONTROLLER) SyncPeople() (map[string]*Person, error)
- func (c *CONTROLLER) UploadFileToContact(pendingContact, pendingFile string) (string, error)
- func (c *CONTROLLER) UserSpecificSetup(modify bool)
- type Contacts
- type Error
- type Person
- type SearchResults
- type Status
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var ( KEYS = "keys" CONTACTS = "contacts" USER = "user" DOWNLOADS = "downloads" ERRORS = "errors" STATUS = "status" )
Functions ¶
func CreateGenericBuckets ¶
Types ¶
type CONTROLLER ¶
type CONTROLLER struct { SERVER *srv.Server CRYPTO *cryptography.Crypto User *User UserAuthenticated func(user string, error string) //when oauth is complete can call this Contacts *Contacts Logger func(message string) SearchResults *SearchResults Db *bolt.DB DBPath string DBDisabled bool WebAssets packr.Box }
func (*CONTROLLER) AddContactToList ¶
func (c *CONTROLLER) AddContactToList(p *Person)
func (*CONTROLLER) AddFileToContact ¶
func (c *CONTROLLER) AddFileToContact(sender string, file utils.File) error
func (*CONTROLLER) CheckForExistingUser ¶
func (c *CONTROLLER) CheckForExistingUser() error
func (*CONTROLLER) CloseDb ¶
func (c *CONTROLLER) CloseDb() error
func (*CONTROLLER) CreatePersonFromIdentifier ¶
func (c *CONTROLLER) CreatePersonFromIdentifier(identifier string) *Person
func (*CONTROLLER) DeleteContactFromList ¶
func (c *CONTROLLER) DeleteContactFromList(identifier string)
func (*CONTROLLER) DownloadFileFromContact ¶
func (c *CONTROLLER) DownloadFileFromContact(pendingContact, pendingFile string) error
func (*CONTROLLER) GetDownloadedFiles ¶
func (c *CONTROLLER) GetDownloadedFiles() ([]utils.File, error)
func (*CONTROLLER) InitialiseDatabase ¶
func (c *CONTROLLER) InitialiseDatabase() error
func (*CONTROLLER) Logout ¶
func (c *CONTROLLER) Logout(callback func())
func (*CONTROLLER) OpenDownloadedFile ¶
func (c *CONTROLLER) OpenDownloadedFile(filePath string) error
func (*CONTROLLER) RemoveCurrentUser ¶
func (c *CONTROLLER) RemoveCurrentUser() error
func (*CONTROLLER) RetrieveAllPeople ¶
func (c *CONTROLLER) RetrieveAllPeople(userBucket string) ([]Person, error)
func (*CONTROLLER) RetrieveFilesForUser ¶
func (c *CONTROLLER) RetrieveFilesForUser() error
func (*CONTROLLER) RetrievePerson ¶
func (c *CONTROLLER) RetrievePerson(userBucket, userId string) (*Person, error)
func (*CONTROLLER) RetrieveUser ¶
func (c *CONTROLLER) RetrieveUser() (*User, error)
func (*CONTROLLER) SearchForContacts ¶
func (c *CONTROLLER) SearchForContacts(searchQuery string) ([]Person, error)
func (*CONTROLLER) StoreErrorMessage ¶
func (c *CONTROLLER) StoreErrorMessage(message string, code int) error
func (*CONTROLLER) StorePerson ¶
func (c *CONTROLLER) StorePerson(userBucket string, p *Person) error
func (*CONTROLLER) StoreStatusMessage ¶
func (c *CONTROLLER) StoreStatusMessage(message string, code int) error
func (*CONTROLLER) StoreUser ¶
func (c *CONTROLLER) StoreUser(u *User) error
func (*CONTROLLER) SyncPeople ¶
func (c *CONTROLLER) SyncPeople() (map[string]*Person, error)
func (*CONTROLLER) UploadFileToContact ¶
func (c *CONTROLLER) UploadFileToContact(pendingContact, pendingFile string) (string, error)
============================================================================================================================
func (*CONTROLLER) UserSpecificSetup ¶
func (c *CONTROLLER) UserSpecificSetup(modify bool)
type SearchResults ¶
type User ¶
type User struct { UserId *uuid.UUID `json:"user_id"` //our id // Id string `json:"id"` //a services id (e.g google) Username string `json:"username" gorm:"unique"` Email string `json:"-" gorm:"not null;unique"` Name string `json:"name"` Picture string `json:"picture"` Locale string `json:"-"` ApiKey string `json:"apiKey"` Service string `json:"service"` CreatedAt time.Time `json:"createdAt"` Verified bool `json:"verified"` //cannot send files just receive files if not verified (anonymous) // Expiry time.Time `json:"expiry"` Enabled bool `json:"enabled"` }
Click to show internal directories.
Click to hide internal directories.