Documentation ¶
Index ¶
- Constants
- func New(st store.Store, kc keychain.Keychain, threads *threadsClient.Client, ...) *model
- type BucketSchema
- type MirrorBucketSchema
- type MirrorFileSchema
- type Model
- type ReceivedFileSchema
- type ReceivedFileType
- type ReceivedFileViaInvitationSchema
- type ReceivedFileViaPublicLinkSchema
- type SharedPublicKeySchema
Constants ¶
View Source
const BucketEncryptionKeyLength = 32 + 16 + 32
32 bytes aes key + 16 bytes salt/IV + 32 bytes HMAC key
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BucketSchema ¶
type BucketSchema struct { ID core.InstanceID `json:"_id"` Slug string `json:"slug"` Backup bool `json:"backup"` EncryptionKey []byte `json:"hub_key"` DbID string *MirrorBucketSchema }
type MirrorBucketSchema ¶
type MirrorFileSchema ¶
type Model ¶
type Model interface { CreateBucket(ctx context.Context, bucketSlug, dbID string) (*BucketSchema, error) UpsertBucket(ctx context.Context, bucketSlug, dbID string) (*BucketSchema, error) BucketBackupToggle(ctx context.Context, bucketSlug string, backup bool) (*BucketSchema, error) FindBucket(ctx context.Context, bucketSlug string) (*BucketSchema, error) ListBuckets(ctx context.Context) ([]*BucketSchema, error) CreateReceivedFileViaInvitation( ctx context.Context, file domain.FullPath, invitationId string, accepted bool, key []byte, ) (*ReceivedFileSchema, error) CreateReceivedFileViaPublicLink( ctx context.Context, ipfsHash string, password string, filename string, filesize string, accepted bool, ) (*ReceivedFileSchema, error) FindReceivedFile(ctx context.Context, remoteDbID, bucket, path string) (*ReceivedFileSchema, error) FindPublicLinkReceivedFile(ctx context.Context, ipfsHash string) (*ReceivedFileSchema, error) CreateMirrorBucket(ctx context.Context, bucketSlug string, mirrorBucket *MirrorBucketSchema) (*BucketSchema, error) FindMirrorFileByPathAndBucketSlug(ctx context.Context, path, bucketSlug string) (*MirrorFileSchema, error) CreateMirrorFile(ctx context.Context, mirrorFile *domain.MirrorFile) (*MirrorFileSchema, error) UpdateMirrorFile(ctx context.Context, mirrorFile *MirrorFileSchema) (*MirrorFileSchema, error) ListReceivedFiles(ctx context.Context, accepted bool, seek string, limit int) ([]*ReceivedFileSchema, error) ListReceivedPublicFiles(ctx context.Context, cidHash string, accepted bool) ([]*ReceivedFileSchema, error) FindMirrorFileByPaths(ctx context.Context, paths []string) (map[string]*MirrorFileSchema, error) FindReceivedFilesByIds(ctx context.Context, ids []string) ([]*ReceivedFileSchema, error) }
type ReceivedFileSchema ¶
type ReceivedFileSchema struct { ID core.InstanceID `json:"_id"` Accepted bool `json:"accepted"` CreatedAt int64 `json:"created_at"` ReceivedFileViaInvitationSchema ReceivedFileViaPublicLinkSchema }
ReceivedFileSchema represents data of files shared with a user A file is shared with a user either by direct invite to the user or through a publicly accessible link
func (ReceivedFileSchema) IsPublicLinkReceived ¶ added in v0.0.26
func (r ReceivedFileSchema) IsPublicLinkReceived() bool
type ReceivedFileType ¶ added in v0.0.26
type ReceivedFileType int
type ReceivedFileViaInvitationSchema ¶ added in v0.0.26
type ReceivedFileViaPublicLinkSchema ¶ added in v0.0.26
type SharedPublicKeySchema ¶
type SharedPublicKeySchema struct {}
Click to show internal directories.
Click to hide internal directories.