index

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateProcessingFile

func CreateProcessingFile(path string) error

CreateProcessingFile creates a file saying whether the index is being created.

func ExistsProcessingFile

func ExistsProcessingFile(path string) (bool, error)

ExistsProcessingFile returns whether the processing file exists.

func RemoveProcessingFile

func RemoveProcessingFile(path string) error

RemoveProcessingFile removes the file that says whether the index is still being created.

func WriteConfig

func WriteConfig(w io.Writer, cfg *Config) error

WriteConfig writes the configuration to the passed writer (w).

func WriteConfigFile

func WriteConfigFile(path string, cfg *Config) error

WriteConfigFile writes the configuration to file.

func WriteProcessingFile

func WriteProcessingFile(path string, data []byte) error

WriteProcessingFile write data to the processing file either truncating it before or creating it if it doesn't exist.

Types

type Config

type Config struct {
	DB          string
	Table       string
	ID          string
	Expressions []string
	Drivers     map[string]map[string]string
}

Config represents index configuration

func NewConfig

func NewConfig(
	db, table, id string,
	expressions []string,
	driverID string,
	driverConfig map[string]string,
) *Config

NewConfig creates a new Config instance for given driver's configuration

func ReadConfig

func ReadConfig(r io.Reader) (*Config, error)

ReadConfig reads an configuration from the passed reader (r).

func ReadConfigFile

func ReadConfigFile(path string) (*Config, error)

ReadConfigFile reads an configuration from file.

func (*Config) Driver

func (cfg *Config) Driver(driverID string) map[string]string

Driver returns an configuration for the particular driverID.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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