domain

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	Message string `json:"message"`
}

type APISessionTokens added in v0.0.13

type APISessionTokens struct {
	HubToken      string
	ServicesToken string
}

type AddItemResult

type AddItemResult struct {
	SourcePath string
	BucketPath string
	Bytes      int64
	Error      error
}

type AddItemsResponse

type AddItemsResponse struct {
	TotalFiles int64
	TotalBytes int64
	Error      error
}

type AddWatchFile

type AddWatchFile struct {
	DbId       string `json:"dbId"`
	LocalPath  string `json:"local_path"`
	BucketPath string `json:"bucket_path"`
	BucketKey  string `json:"bucket_key"`
	BucketSlug string `json:"bucket_slug"`
	IsRemote   bool   `json:"isRemote"`
	Cid        string `json:"cid"`
}

type AppConfig

type AppConfig struct {
	Port                 int
	AppPath              string
	TextileHubTarget     string
	TextileThreadsTarget string
}

type DirEntry

type DirEntry struct {
	Path          string
	IsDir         bool
	Name          string
	SizeInBytes   string
	Created       string
	Updated       string
	FileExtension string
	Members       []Member
}

type FileInfo

type FileInfo struct {
	DirEntry
	IpfsHash          string
	BackedUp          bool
	LocallyAvailable  bool
	BackupInProgress  bool
	RestoreInProgress bool
}

type FileSharingInfo added in v0.0.10

type FileSharingInfo struct {
	Bucket            string
	SharedFileCid     string
	SharedFileKey     string
	SpaceDownloadLink string
}

type FullPath added in v0.0.13

type FullPath struct {
	DbId      string `json:"dbId"`
	BucketKey string `json:"bucketKey"`
	Bucket    string `json:"bucket"`
	Path      string `json:"path"`
}

type Identity

type Identity struct {
	Address   string `json:"address"`
	PublicKey string `json:"publicKey"`
	Username  string `json:"username"`
}

type Invitation added in v0.0.13

type Invitation struct {
	InviterPublicKey string           `json:"inviterPublicKey"`
	InviteePublicKey string           `json:"inviteePublicKey"`
	InvitationID     string           `json:"invitationID"`
	Status           InvitationStatus `json:"status"`
	ItemPaths        []FullPath       `json:"itemPaths"`
	Keys             [][]byte         `json:"keys"`
}

type InvitationReply added in v0.0.14

type InvitationReply struct {
	InvitationID string `json:"invitationID"`
}

type InvitationStatus added in v0.0.13

type InvitationStatus int
const (
	PENDING  InvitationStatus = 0
	ACCEPTED InvitationStatus = 1
	REJECTED InvitationStatus = 2
)

type KeyBackupType added in v0.0.34

type KeyBackupType int
const (
	PASSWORD KeyBackupType = 0
	GOOGLE   KeyBackupType = 1
	TWITTER  KeyBackupType = 2
	EMAIL    KeyBackupType = 3
)

func (KeyBackupType) String added in v0.0.34

func (b KeyBackupType) String() string

type KeyPair

type KeyPair struct {
	PublicKey  string
	PrivateKey string
}

type Member added in v0.0.14

type Member struct {
	Address   string `json:"address"`
	PublicKey string `json:"publicKey"`
}

type MessageBody added in v0.0.13

type MessageBody struct {
	Type NotificationTypes `json:"type"`
	Body []byte            `json:"body"`
}

type MirrorFile added in v0.0.13

type MirrorFile struct {
	Path              string
	BucketSlug        string
	Backup            bool
	Shared            bool
	BackupInProgress  bool
	RestoreInProgress bool
}

type Notification added in v0.0.13

type Notification struct {
	ID               string            `json:"id"`
	Subject          string            `json:"subject"`
	Body             string            `json:"body"`
	NotificationType NotificationTypes `json:"notificationType"`
	CreatedAt        int64             `json:"createdAt"`
	ReadAt           int64             `json:"readAt"`
	// QUESTION: is there a way to enforce that only one of the below is present
	InvitationValue        Invitation        `json:"invitationValue"`
	UsageAlertValue        UsageAlert        `json:"usageAlertValue"`
	InvitationAcceptValue  InvitationReply   `json:"invitationAcceptValue"`
	RevokedInvitationValue RevokedInvitation `json:"revokedInvitationValue"`
	RelatedObject          interface{}       `json:"relatedObject"`
}

type NotificationTypes added in v0.0.13

type NotificationTypes int
const (
	UNKNOWN NotificationTypes = iota
	INVITATION
	USAGEALERT
	INVITATION_REPLY
	REVOKED_INVITATION
)

type OpenFileInfo

type OpenFileInfo struct {
	Location string
}

type RevokedInvitation added in v0.1.3

type RevokedInvitation struct {
	InviterPublicKey string     `json:"inviterPublicKey"`
	InviteePublicKey string     `json:"inviteePublicKey"`
	ItemPaths        []FullPath `json:"itemPaths"`
	Keys             [][]byte   `json:"keys"`
}

Represents when an inviter unshared access to previously shared files in ItemPaths

type SearchFileEntry added in v0.0.30

type SearchFileEntry struct {
	FileInfo
	Bucket string
	DbID   string
}

type SharedDirEntry added in v0.0.14

type SharedDirEntry struct {
	DbID         string
	Bucket       string
	IsPublicLink bool
	FileInfo
	Members  []Member // XXX: it is duplicated from FileInfo
	SharedBy string
}

type SharedFilesRoleAction added in v0.1.3

type SharedFilesRoleAction int

SharedFilesRoleAction represents action to be performed on the role

const (
	DeleteRoleAction SharedFilesRoleAction = iota
	ReadWriteRoleAction
)

type ThreadInfo added in v0.0.8

type ThreadInfo struct {
	Addresses []string
	Key       string
}

type UsageAlert added in v0.0.13

type UsageAlert struct {
	Used    int64  `json:"used"`
	Limit   int64  `json:"limit"`
	Message string `json:"message"`
}

Jump to

Keyboard shortcuts

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