noteroot

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NoteRoot

type NoteRoot struct {
	// contains filtered or unexported fields
}

func NewNoteRoot

func NewNoteRoot(storageDir string, adminPassword string, jwtSecret string) (*NoteRoot, error)

func (*NoteRoot) ChangeOwnPassword

func (nr *NoteRoot) ChangeOwnPassword(id, oldPassword, newPassword string) error

func (*NoteRoot) Close

func (nr *NoteRoot) Close() error

func (*NoteRoot) CreatePage

func (nr *NoteRoot) CreatePage(parentID *string, title string, slug string) (*tree.Page, error)

func (*NoteRoot) CreateUser

func (nr *NoteRoot) CreateUser(username, email, password, role string) (*auth.PublicUser, error)

func (*NoteRoot) DeleteAsset

func (nr *NoteRoot) DeleteAsset(pageID string, filename string) error

func (*NoteRoot) DeletePage

func (nr *NoteRoot) DeletePage(id string, recursive bool) error

func (*NoteRoot) DeleteUser

func (nr *NoteRoot) DeleteUser(id string) error

func (*NoteRoot) EnsureWelcomePage

func (nr *NoteRoot) EnsureWelcomePage() error

func (*NoteRoot) FindByPath

func (nr *NoteRoot) FindByPath(route string) (*tree.Page, error)

func (*NoteRoot) GetAssetService

func (nr *NoteRoot) GetAssetService() *assets.AssetService

func (*NoteRoot) GetAuthService

func (nr *NoteRoot) GetAuthService() *auth.AuthService

func (*NoteRoot) GetPage

func (nr *NoteRoot) GetPage(id string) (*tree.Page, error)

func (*NoteRoot) GetStorageDir

func (nr *NoteRoot) GetStorageDir() string

func (*NoteRoot) GetTree

func (nr *NoteRoot) GetTree() *tree.PageNode

func (*NoteRoot) GetUserByID

func (nr *NoteRoot) GetUserByID(id string) (*auth.PublicUser, error)

func (*NoteRoot) GetUserService

func (nr *NoteRoot) GetUserService() *auth.UserService

func (*NoteRoot) GetUsers

func (nr *NoteRoot) GetUsers() ([]*auth.PublicUser, error)

func (*NoteRoot) ListAssets

func (nr *NoteRoot) ListAssets(pageID string) ([]string, error)

func (*NoteRoot) Login

func (nr *NoteRoot) Login(identifier, password string) (*auth.AuthToken, error)

func (*NoteRoot) MovePage

func (nr *NoteRoot) MovePage(id, parentID string) error

func (*NoteRoot) RefreshToken

func (nr *NoteRoot) RefreshToken(token string) (*auth.AuthToken, error)

func (*NoteRoot) ResetAdminUserPassword

func (nr *NoteRoot) ResetAdminUserPassword() (*auth.User, error)

func (*NoteRoot) SortPages

func (nr *NoteRoot) SortPages(parentID string, orderedIDs []string) error

func (*NoteRoot) SuggestSlug

func (nr *NoteRoot) SuggestSlug(parentID string, title string) (string, error)

func (*NoteRoot) UpdatePage

func (nr *NoteRoot) UpdatePage(id, title, slug, content string) (*tree.Page, error)

func (*NoteRoot) UpdatePassword

func (nr *NoteRoot) UpdatePassword(id, password string) error

func (*NoteRoot) UpdateUser

func (nr *NoteRoot) UpdateUser(id, username, email, password, role string) (*auth.PublicUser, error)

func (*NoteRoot) UploadAsset

func (nr *NoteRoot) UploadAsset(pageID string, file multipart.File, filename string) (string, error)

Jump to

Keyboard shortcuts

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