toc

package
v0.0.0-...-7af3d7a Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: GPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*TableOfContent) error

func WithFilename

func WithFilename(sFile string) Option

type TableOfContent

type TableOfContent struct {
	Lastupdate int64            `json:"lastupdate"`
	Files      []*kirinuki.File `json:"files"`
	// contains filtered or unexported fields
}

TOC handles the table of content of the Kirinuki files

func New

func New(ms *storage.MultiStorage, opts ...Option) (*TableOfContent, error)

func (*TableOfContent) Add

func (t *TableOfContent) Add(f *kirinuki.File) bool

func (TableOfContent) Exist

func (t TableOfContent) Exist(name string) bool

Exist returns true if the Kirinuki file with the given name exists

func (TableOfContent) Find

func (t TableOfContent) Find(pattern string) []*kirinuki.File

func (TableOfContent) Get

func (t TableOfContent) Get(name string) (*kirinuki.File, bool)

Get returns the Kirinuki file with the given name and true if the file exists This method returns the Kirinuki file without the data

func (*TableOfContent) Load

func (t *TableOfContent) Load(email string, password string) error

func (*TableOfContent) Size

func (t *TableOfContent) Size() int

func (*TableOfContent) Store

func (t *TableOfContent) Store(email string, password string) error

Jump to

Keyboard shortcuts

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