viewmodel

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangeEmailForm added in v0.0.8

type ChangeEmailForm struct {
	UserID          string `json:"userid"`
	Email           string `json:"email"`
	CurrentPassword string `json:"currentPassword"`
}

ChangeEmail reset password

type Directory

type Directory struct {
	ID           string    `json:"id"`
	Name         string    `json:"name"`
	Entries      []Entry   `json:"children"`
	LastModified time.Time `json:"lastModified"`
	IsFolder     bool      `json:"isFolder"`
}

Directory entry

type Document

type Document struct {
	ID           string    `json:"id"`
	Name         string    `json:"name"`
	DocumentType string    `json:"type"` //notebook, pdf, epub
	LastModified time.Time `json:"lastModified"`
	Size         int64     `json:"size"`
}

Document is a single document

type DocumentList

type DocumentList struct {
	Documents []Document `json:"entries"`
}

DocumentList is a list of documents

type DocumentTree

type DocumentTree struct {
	Entries []Entry
	Trash   []Entry
}

DocumentTree a tree of documents

func DocTreeFromHashTree added in v0.0.5

func DocTreeFromHashTree(tree *models.HashTree) *DocumentTree

DocTreeFromHashTree from hash tree

func DocTreeFromRawMetadata added in v0.0.5

func DocTreeFromRawMetadata(documents []*InternalDoc) *DocumentTree

DocTreeFromRawMetadata from raw metadata

type Entry

type Entry interface {
}

Entry just an entry

type InternalDoc added in v0.0.12

type InternalDoc struct {
	ID           string
	Version      int
	LastModified time.Time
	Type         common.EntryType
	FileType     string
	Name         string
	CurrentPage  int
	Parent       string
	Size         int64
}

type LoginForm

type LoginForm struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

LoginForm the login form

type NewFolder added in v0.0.12

type NewFolder struct {
	ParentID string `json:"parentId"`
	Name     string `json:"name"`
}

type NewUser added in v0.0.8

type NewUser struct {
	ID          string `json:"userid" binding:"required"`
	Email       string `json:"email" binding:"email"`
	NewPassword string `json:"newpassword" binding:"required"`
}

NewUser new user creation

type ResetPasswordForm

type ResetPasswordForm struct {
	UserID          string `json:"userid"`
	CurrentPassword string `json:"currentPassword"`
	NewPassword     string `json:"newPassword"`
}

ResetPasswordForm reset password

type UpdateDoc added in v0.0.5

type UpdateDoc struct {
	DocumentID string `json:"documentId" binding:"required"`
	ParentID   string `json:"parentId"`
	Name       string `json:"name"`
}

UpdateDoc with somethin

type User

type User struct {
	ID           string `json:"userid"`
	Email        string `json:"email"`
	Name         string `json:"name"`
	NewPassword  string `json:"newpassword,omitempty"`
	CreatedAt    time.Time
	Integrations []string `json:"integrations,omitempty"`
}

User user model

Jump to

Keyboard shortcuts

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