Documentation ¶
Index ¶
Constants ¶
View Source
const ( TypeDefault = "" TypeJson = "json" TypeBase64 = "base64" )
Variables ¶
View Source
var (
ErrUndefinedType = errors.New("undefined key type")
)
View Source
var (
ErrUnsupportedFormat = errors.New("unsupported format")
)
Functions ¶
func FileEncode ¶
func IsAllowedExtension ¶
Types ¶
type ConsulMigrate ¶
type ConsulMigrate struct {
// contains filtered or unexported fields
}
func CreateConsulMigrate ¶
func CreateConsulMigrate(addr string) (*ConsulMigrate, error)
func NewConsulMigrate ¶
func NewConsulMigrate(cli *api.Client) *ConsulMigrate
func (*ConsulMigrate) Dump ¶
func (m *ConsulMigrate) Dump() (KVList, error)
func (*ConsulMigrate) DumpToFile ¶
func (m *ConsulMigrate) DumpToFile(filename string) error
func (*ConsulMigrate) Migrate ¶
func (m *ConsulMigrate) Migrate(kv KVList) error
func (*ConsulMigrate) MigrateFromDir ¶
func (m *ConsulMigrate) MigrateFromDir(path string) error
func (*ConsulMigrate) MigrateFromFile ¶
func (m *ConsulMigrate) MigrateFromFile(filename string) error
type KVItem ¶
type KVItem struct { Key string `yaml:"key" json:"key"` Value string `yaml:"value,omitempty" json:"value,omitempty"` Type string `yaml:"type,omitempty" json:"type,omitempty"` }
func (KVItem) DetectType ¶
func (KVItem) ValueBytes ¶
Click to show internal directories.
Click to hide internal directories.