Documentation ¶
Index ¶
- Constants
- type FileContentSource
- func (s *FileContentSource) Contexts() []string
- func (bc *FileContentSource) Find(ctx context.Context, itemContext string) ([]*sdp.Item, error)
- func (bc *FileContentSource) Get(ctx context.Context, itemContext string, query string) (*sdp.Item, error)
- func (bc *FileContentSource) Hidden() bool
- func (bc *FileContentSource) Name() string
- func (bc *FileContentSource) Type() string
- func (s *FileContentSource) Weight() int
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
Click to show internal directories.
Click to hide internal directories.