index

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: Apache-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 IndexJob

type IndexJob struct {
	Bucket *storage.Bucket
	// contains filtered or unexported fields
}

func NewIndexJob

func NewIndexJob(bucket *storage.Bucket) *IndexJob

func (*IndexJob) Delete

func (ij *IndexJob) Delete(enable bool)

Delete toggles deletion of stale indexes for now empty directories.

func (*IndexJob) DirectoryHTML

func (ij *IndexJob) DirectoryHTML(enable bool)

DirectoryHTML toggles generation of HTML pages to mimic directories.

func (*IndexJob) Do

func (ij *IndexJob) Do(ctx context.Context) error

func (*IndexJob) IndexHTML

func (ij *IndexJob) IndexHTML(enable bool)

IndexHTML toggles generation of index.html pages for each directory.

func (*IndexJob) Name

func (ij *IndexJob) Name(name string)

Name overrides Bucket's name in page titles.

func (*IndexJob) Prefix

func (ij *IndexJob) Prefix(p string)

Prefix overrides Bucket's default prefix.

func (*IndexJob) Recursive

func (sj *IndexJob) Recursive(enable bool)

Recursive toggles generation of indexes for subdirectories (the default).

type IndexSet

type IndexSet map[string]struct{}

func NewIndexSet

func NewIndexSet(bucket *storage.Bucket) IndexSet

func (IndexSet) IsIndex

func (is IndexSet) IsIndex(obj *gs.Object) bool

func (IndexSet) NotIndex

func (is IndexSet) NotIndex(obj *gs.Object) bool

type IndexTree

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

func NewIndexTree

func NewIndexTree(bucket *storage.Bucket, includeEmpty bool) *IndexTree

func (*IndexTree) Indexer

func (t *IndexTree) Indexer(name, prefix string) *Indexer

func (*IndexTree) Prefixes

func (t *IndexTree) Prefixes(dir string) []string

type Indexer

type Indexer struct {
	Title   string
	SubDirs []string
	Objects []*gs.Object
	// contains filtered or unexported fields
}

func (*Indexer) DeleteDirectory

func (i *Indexer) DeleteDirectory(ctx context.Context) error

func (*Indexer) DeleteIndexHTML

func (i *Indexer) DeleteIndexHTML(ctx context.Context) error

func (*Indexer) DeleteRedirect

func (i *Indexer) DeleteRedirect(ctx context.Context) error

func (*Indexer) Empty

func (i *Indexer) Empty() bool

func (*Indexer) UpdateDirectoryHTML

func (i *Indexer) UpdateDirectoryHTML(ctx context.Context) error

func (*Indexer) UpdateIndexHTML

func (i *Indexer) UpdateIndexHTML(ctx context.Context) error

func (*Indexer) UpdateRedirect

func (i *Indexer) UpdateRedirect(ctx context.Context) error

type SyncIndexJob

type SyncIndexJob struct {
	storage.SyncJob
	IndexJob
	// contains filtered or unexported fields
}

func NewSyncIndexJob

func NewSyncIndexJob(src, dst *storage.Bucket) *SyncIndexJob

func (*SyncIndexJob) Delete

func (si *SyncIndexJob) Delete(enable bool)

Delete enables deletion of extra objects and indexes from Destination.

func (*SyncIndexJob) DeleteFilter

func (si *SyncIndexJob) DeleteFilter(f storage.Filter)

DeleteFilter selects which objects may be pruned from Destination.

func (*SyncIndexJob) DestinationPrefix

func (si *SyncIndexJob) DestinationPrefix(p string)

DestinationPrefix overrides the Destination bucket's default prefix.

func (*SyncIndexJob) Do

func (sj *SyncIndexJob) Do(ctx context.Context) error

func (*SyncIndexJob) Prefix

func (si *SyncIndexJob) Prefix(p string)

Prefix is an alias for DestinationPrefix()

func (*SyncIndexJob) Recursive

func (si *SyncIndexJob) Recursive(enable bool)

Recursive toggles copying/indexing subdirectories (the default).

func (*SyncIndexJob) SourceFilter

func (si *SyncIndexJob) SourceFilter(f storage.Filter)

SourceFilter selects which objects to copy from Source.

Jump to

Keyboard shortcuts

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