library

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Library

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

func LoadLibrary

func LoadLibrary() (*Library, error)

func (*Library) Close

func (l *Library) Close()

func (*Library) ConfigDir

func (l *Library) ConfigDir() string

func (*Library) Delete

func (l *Library) Delete(scroll_name string) error

func (*Library) Exists

func (l *Library) Exists(name string) bool

func (*Library) GetAllScrolls

func (l *Library) GetAllScrolls() ([]*Scroll, error)

func (*Library) GetAllScrollsAutoComplete

func (l *Library) GetAllScrollsAutoComplete(name string) ([]*Scroll, error)

func (*Library) GetAllScrollsByType

func (l *Library) GetAllScrollsByType(t string) ([]*Scroll, error)

func (*Library) GetById

func (l *Library) GetById(id int64) (*Scroll, error)

func (*Library) GetByName

func (l *Library) GetByName(scroll_name string) (*Scroll, error)

func (*Library) Migrate

func (l *Library) Migrate() error

func (*Library) MigrateScrolls

func (l *Library) MigrateScrolls(libPath string) error

func (*Library) NewScroll

func (l *Library) NewScroll(scroll_name, file_type string, body []byte) (*Scroll, error)

func (*Library) Rename

func (l *Library) Rename(src, dist string) error

func (*Library) Update

func (l *Library) Update(scroll *Scroll) error

type Scroll

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

func (*Scroll) Body

func (s *Scroll) Body() []byte

func (*Scroll) Delete

func (s *Scroll) Delete() error

func (*Scroll) Exec

func (s *Scroll) Exec() file_types.ExecArgs

func (*Scroll) File

func (s *Scroll) File() string

func (*Scroll) Id

func (s *Scroll) Id() string

func (*Scroll) Library

func (s *Scroll) Library() *Library

func (*Scroll) Name

func (s *Scroll) Name() string

func (*Scroll) Rename

func (s *Scroll) Rename(newName string) error

func (*Scroll) Save

func (s *Scroll) Save() error

func (*Scroll) SetBody

func (s *Scroll) SetBody(b []byte)

func (*Scroll) SetType

func (s *Scroll) SetType(t string)

func (*Scroll) Type

func (s *Scroll) Type() string

type ScrollsDB

type ScrollsDB struct {
	Db     *sql.DB
	DbFile string
	BkFile string
}

func NewConnection

func NewConnection(configDir string) (*ScrollsDB, error)

func (*ScrollsDB) Backup

func (s *ScrollsDB) Backup() error

func (*ScrollsDB) Connect

func (s *ScrollsDB) Connect() error

func (*ScrollsDB) RemoveBackup

func (s *ScrollsDB) RemoveBackup() error

func (*ScrollsDB) Restore

func (s *ScrollsDB) Restore() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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