model

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2023 License: AGPL-3.0 Imports: 3 Imported by: 12 modules, 11 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	DirectoryType = "CollectionType"
	DocumentType  = "DocumentType"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthTokens

type AuthTokens struct {
	DeviceToken string
	UserToken   string
}

type BlobRootStorageRequest added in v0.0.22

type BlobRootStorageRequest struct {
	Method       string `json:"http_method"`
	Initial      bool   `json:"initial_sync,omitempty"`
	RelativePath string `json:"relative_path"`
	RootSchema   string `json:"root_schema,omitempty"`
	Generation   int64  `json:"generation"`
}

type BlobStorageRequest added in v0.0.16

type BlobStorageRequest struct {
	Method       string `json:"http_method"`
	Initial      bool   `json:"initial_sync,omitempty"`
	RelativePath string `json:"relative_path"`
	ParentPath   string `json:"parent_path,omitempty"`
}

BlobStorageRequest request

type BlobStorageResponse added in v0.0.16

type BlobStorageResponse struct {
	Expires            string `json:"expires"`
	Method             string `json:"method"`
	RelativePath       string `json:"relative_path"`
	Url                string `json:"url"`
	MaxUploadSizeBytes int64  `json:"maxuploadsize_bytes,omitifempty"`
}

BlobStorageResponse response

type DeleteDocument

type DeleteDocument struct {
	ID      string
	Version int
}

type DeviceTokenRequest

type DeviceTokenRequest struct {
	Code       string `json:"code"`
	DeviceDesc string `json:"deviceDesc"`
	DeviceId   string `json:"deviceID"`
}

type Document

type Document struct {
	ID                string
	Version           int
	Message           string
	Success           bool
	BlobURLGet        string
	BlobURLGetExpires string
	ModifiedClient    string
	Type              string
	VissibleName      string
	CurrentPage       int
	Bookmarked        bool
	Parent            string
}

func (Document) ToDeleteDocument

func (doc Document) ToDeleteDocument() DeleteDocument

func (Document) ToMetaDocument

func (doc Document) ToMetaDocument() MetadataDocument

type MetadataDocument

type MetadataDocument struct {
	ID             string
	Parent         string
	VissibleName   string
	Type           string
	Version        int
	ModifiedClient string
}

func CreateDirDocument

func CreateDirDocument(parent, name string) MetadataDocument

func CreateUploadDocumentMeta

func CreateUploadDocumentMeta(id string, entryType, parent, name string) MetadataDocument

func (MetadataDocument) ToDocument

func (meta MetadataDocument) ToDocument() Document

type Node

type Node struct {
	Document *Document
	Children map[string]*Node
	Parent   *Node
}

func CreateNode

func CreateNode(document Document) Node

func (*Node) EntyExists

func (node *Node) EntyExists(id string) bool

func (*Node) FindByName

func (node *Node) FindByName(name string) (*Node, error)

func (*Node) Id

func (node *Node) Id() string

func (*Node) IsDirectory

func (node *Node) IsDirectory() bool

func (*Node) IsFile

func (node *Node) IsFile() bool

func (*Node) IsRoot

func (node *Node) IsRoot() bool

func (*Node) LastModified added in v0.0.13

func (node *Node) LastModified() (time.Time, error)

func (*Node) Name

func (node *Node) Name() string

func (*Node) Version added in v0.0.11

func (node *Node) Version() int

type SyncCompletedRequest added in v0.0.22

type SyncCompletedRequest struct {
	Generation int64 `json:"generation"`
}

SyncCompleteRequest payload of the sync completion

type UploadDocumentRequest

type UploadDocumentRequest struct {
	ID      string
	Type    string
	Version int
}

func CreateUploadDocumentRequest

func CreateUploadDocumentRequest(id string, entryType string) UploadDocumentRequest

type UploadDocumentResponse

type UploadDocumentResponse struct {
	ID                string
	Version           int
	Message           string
	Success           bool
	BlobURLPut        string
	BlobURLPutExpires string
}

Jump to

Keyboard shortcuts

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