config

package
v2.0.1-0...-2f82913 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CSVConfig

type CSVConfig struct {
	WithHeader *bool   `json:"withHeader" yaml:"withHeader"`
	WithLabel  *bool   `json:"withLabel" yaml:"withLabel"`
	Delimiter  *string `json:"delimiter" yaml:"delimiter"`
}

type Edge

type Edge struct {
	Name        *string `json:"name" yaml:"name"`
	WithRanking *bool   `json:"withRanking" yaml:"withRanking"`
	Props       []*Prop `json:"props" yaml:"props"`
	SrcVID      *VID    `json:"srcVID" yaml:"srcVID"`
	DstVID      *VID    `json:"dstVID" yaml:"dstVID"`
	Rank        *Rank   `json:"rank" yaml:"rank"`
}

func (*Edge) FormatValues

func (e *Edge) FormatValues(record base.Record) (string, error)

func (*Edge) String

func (e *Edge) String() string

type File

type File struct {
	Path         *string    `json:"path" yaml:"path"`
	FailDataPath *string    `json:"failDataPath" yaml:"failDataPath"`
	BatchSize    *int       `json:"batchSize" yaml:"batchSize"`
	Limit        *int       `json:"limit" yaml:"limit"`
	InOrder      *bool      `json:"inOrder" yaml:"inOrder"`
	Type         *string    `json:"type" yaml:"type"`
	CSV          *CSVConfig `json:"csv" yaml:"csv"`
	Schema       *Schema    `json:"schema" yaml:"schema"`
}

func (*File) IsInOrder

func (f *File) IsInOrder() bool

type NebulaClientConnection

type NebulaClientConnection struct {
	User     *string `json:"user" yaml:"user"`
	Password *string `json:"password" yaml:"password"`
	Address  *string `json:"address" yaml:"address"`
}

type NebulaClientSettings

type NebulaClientSettings struct {
	Retry             *int                    `json:"retry" yaml:"retry"`
	Concurrency       *int                    `json:"concurrency" yaml:"concurrency"`
	ChannelBufferSize *int                    `json:"channelBufferSize" yaml:"channelBufferSize"`
	Space             *string                 `json:"space" yaml:"space"`
	Connection        *NebulaClientConnection `json:"connection" yaml:"connection"`
	PostStart         *NebulaPostStart        `json:"postStart" yaml:"postStart"` // from v1
	PreStop           *NebulaPreStop          `json:"preStop" yaml:"preStop"`     // from v1
}

type NebulaPostStart

type NebulaPostStart struct {
	Commands    *string `json:"commands" yaml:"commands"`
	AfterPeriod *string `json:"afterPeriod" yaml:"afterPeriod"`
}

type NebulaPreStop

type NebulaPreStop struct {
	Commands *string `json:"commands" yaml:"commands"`
}

type Prop

type Prop struct {
	Name  *string `json:"name" yaml:"name"`
	Type  *string `json:"type" yaml:"type"`
	Index *int    `json:"index" yaml:"index"`
}

func (*Prop) FormatValue

func (p *Prop) FormatValue(record base.Record) (string, error)

func (*Prop) IsStringType

func (p *Prop) IsStringType() bool

func (*Prop) String

func (p *Prop) String(prefix string) string

type Rank

type Rank struct {
	Index *int `json:"index" yaml:"index"`
}

type Schema

type Schema struct {
	Type   *string `json:"type" yaml:"type"`
	Edge   *Edge   `json:"edge" yaml:"edge"`
	Vertex *Vertex `json:"vertex" yaml:"vertex"`
}

func (*Schema) CollectEmptyPropsTagNames

func (s *Schema) CollectEmptyPropsTagNames() []string

func (*Schema) IsVertex

func (s *Schema) IsVertex() bool

func (*Schema) String

func (s *Schema) String() string

type Tag

type Tag struct {
	Name  *string `json:"name" yaml:"name"`
	Props []*Prop `json:"props" yaml:"props"`
}

func (*Tag) FormatValues

func (t *Tag) FormatValues(record base.Record) (string, bool, error)

type VID

type VID struct {
	Index    *int    `json:"index" yaml:"index"`
	Function *string `json:"function" yaml:"function"`
	Type     *string `json:"type" yaml:"type"`
}

func (*VID) FormatValue

func (v *VID) FormatValue(record base.Record) (string, error)

func (*VID) ParseFunction

func (v *VID) ParseFunction(str string) (err error)

func (*VID) String

func (v *VID) String(vid string) string

type Vertex

type Vertex struct {
	VID  *VID   `json:"vid" yaml:"vid"`
	Tags []*Tag `json:"tags" yaml:"tags"`
}

func (*Vertex) FormatValues

func (v *Vertex) FormatValues(record base.Record) (string, error)

func (*Vertex) String

func (v *Vertex) String() string

type YAMLConfig

type YAMLConfig struct {
	Version              *string               `json:"version" yaml:"version"`
	Description          *string               `json:"description" yaml:"description"`
	RemoveTempFiles      *bool                 `json:"removeTempFiles" yaml:"removeTempFiles"` // from v1
	NebulaClientSettings *NebulaClientSettings `json:"clientSettings" yaml:"clientSettings"`
	LogPath              *string               `json:"logPath" yaml:"logPath"`
	Files                []*File               `json:"files" yaml:"files"`
}

func Parse

func Parse(filename string) (*YAMLConfig, error)

func (*YAMLConfig) ValidateAndReset

func (config *YAMLConfig) ValidateAndReset(dir string) error

Jump to

Keyboard shortcuts

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