typecheck

package
v2.7.6 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCheckSchemaCommand

func NewCheckSchemaCommand(v *viper.Viper) (*cobra.Command, error)

func NewMergeSchemaCommand

func NewMergeSchemaCommand(v *viper.Viper) (*cobra.Command, error)

Types

type FieldTypes

type FieldTypes map[string]struct{}

func (FieldTypes) MarshalText

func (ft FieldTypes) MarshalText() (text []byte, err error)

func (*FieldTypes) UnmarshalText

func (ft *FieldTypes) UnmarshalText(text []byte) error

type MergeFilesCommand

type MergeFilesCommand struct {
	OutputFile    string
	ConflictsFile string
}

type Schema

type Schema map[string]FieldTypes

func NewSchema

func NewSchema() Schema

func SchemaFromFile

func SchemaFromFile(filename string) (Schema, error)

func (Schema) AddField

func (s Schema) AddField(database, retention, measurement, field, dataType string)

func (Schema) AddFormattedField

func (s Schema) AddFormattedField(field string, dataType string)

func (Schema) Conflicts

func (s Schema) Conflicts() Schema

func (Schema) Decode

func (s Schema) Decode(r io.Reader) error

func (Schema) Encode

func (s Schema) Encode(w io.Writer) error

func (Schema) Merge

func (s Schema) Merge(schema Schema)

func (Schema) WriteConflictsFile

func (s Schema) WriteConflictsFile(filename string) error

func (Schema) WriteSchemaFile

func (s Schema) WriteSchemaFile(filename string) error

type TypeConflictChecker

type TypeConflictChecker struct {
	Path          string
	SchemaFile    string
	ConflictsFile string
	Logger        *zap.Logger
	// contains filtered or unexported fields
}

type UniqueField

type UniqueField struct {
	Database    string `json:"database"`
	Retention   string `json:"retention"`
	Measurement string `json:"measurement"`
	Field       string `json:"field"`
}

func (*UniqueField) String

func (uf *UniqueField) String() string

Jump to

Keyboard shortcuts

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