file_content

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultMaxSize = (100 * 1024 * 1024)

Variables

This section is empty.

Functions

This section is empty.

Types

type FileContentSource

type FileContentSource struct {
	// Maximum file size in bytes to be read
	MaxSize int64
}

FileContentSource struct on which all methods are registered

func (*FileContentSource) Contexts

func (s *FileContentSource) Contexts() []string

List of contexts that this source is capable of find items for

func (*FileContentSource) Find

func (bc *FileContentSource) Find(ctx context.Context, itemContext string) ([]*sdp.Item, error)

Find calls back to the FindFunction to find all items

func (*FileContentSource) Get

func (bc *FileContentSource) Get(ctx context.Context, itemContext string, query string) (*sdp.Item, error)

Get calls back to the GetFunction to get a single item

func (*FileContentSource) Hidden

func (bc *FileContentSource) Hidden() bool

Hidden File_content items should be hidden as they are only used when needed, and should be covered by some higher layer of abstraction like a secondary source

func (*FileContentSource) Name

func (bc *FileContentSource) Name() string

Name Returns the name of the backend

func (*FileContentSource) Type

func (bc *FileContentSource) Type() string

Type is the type of items that this returns

func (*FileContentSource) Weight

func (s *FileContentSource) Weight() int

Weighting of duplicate sources

Jump to

Keyboard shortcuts

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