migrate

package
v0.0.0-...-ae88a46 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrConflict = errors.New("conflict")
)

Functions

func Export

func Export(ctx context.Context) ([]byte, error)

Types

type ConflictMode

type ConflictMode int
const (
	ModeReturn ConflictMode = iota
	ModeOverwrite
	ModeSkip
)

type DataSet

type DataSet struct {
	Consumers     []*entity.Consumer
	Routes        []*entity.Route
	Services      []*entity.Service
	SSLs          []*entity.SSL
	Upstreams     []*entity.Upstream
	Scripts       []*entity.Script
	GlobalPlugins []*entity.GlobalPlugins
	PluginConfigs []*entity.PluginConfig
}

func Import

func Import(ctx context.Context, data []byte, mode ConflictMode) (*DataSet, error)

func (*DataSet) Add

func (a *DataSet) Add(obj interface{}) error

Jump to

Keyboard shortcuts

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