dbanon

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Tables []struct {
		Name    string            `yaml:"name"`
		Columns map[string]string `yaml:"columns"`
	}
	Eav []struct {
		Name       string            `yaml:"name"`
		Attributes map[string]string `yaml:"attributes"`
	}
}

func NewConfig

func NewConfig(requested string) (*Config, error)

func (Config) ProcessColumn

func (c Config) ProcessColumn(t string, col string) (bool, string)

func (Config) ProcessEav

func (c Config) ProcessEav(t string, attributeId string) (bool, string)

func (Config) ProcessTable

func (c Config) ProcessTable(t string) string

func (Config) String

func (c Config) String() ([]byte, error)

type Eav

type Eav struct {
	Config *Config
	// contains filtered or unexported fields
}

func NewEav

func NewEav(c *Config) *Eav

func (Eav) ProcessLine

func (eav Eav) ProcessLine(s string)

type LineProcessor

type LineProcessor struct {
	Config   *Config
	Provider ProviderInterface
}

func NewLineProcessor

func NewLineProcessor(c *Config, p ProviderInterface) *LineProcessor

func (LineProcessor) ProcessLine

func (p LineProcessor) ProcessLine(s string) string

type Provider

type Provider struct{}

func NewProvider

func NewProvider() *Provider

func (Provider) Get

func (p Provider) Get(s string) string

type ProviderInterface

type ProviderInterface interface {
	Get(s string) string
}

Jump to

Keyboard shortcuts

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