model

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2019 License: GPL-3.0 Imports: 4 Imported by: 0

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 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, 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) Name

func (node *Node) Name() string

type UploadDocumentRequest

type UploadDocumentRequest struct {
	ID      string
	Type    string
	Version int
}

func CreateUploadDocumentRequest

func CreateUploadDocumentRequest(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