dfmanager

command module
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2018 License: MIT Imports: 6 Imported by: 0

README

Build Status License MIT Go Report Card

Dialogflow Agent Manager

Installation

Make sure you have a working Go environment. See Golang install instructions

To install, run:

go get github.com/skaeladmin/dfmanager

Use as CLI

dfmanager [global options] command [command options] [arguments...]
COMMANDS:
     export, e   exports agent from dialogflow
     import, i   imports agent to dialogflow
     restore, r  restores (replaces) agent in dialogflow
     help, h     Shows a list of commands or help for one command

GLOBAL OPTIONS:
   -k value, --key value      Google Cloud Platform Auth Key [$GCP_KEY]
   -p value, --project value  Google Cloud Platform Project Name [$GCE_PROJECT]
   -f value, --file value     Input/Output file
   --help, -h                 show help
   --version, -v              print the version

Use as API

func main() {
	f, err := ioutil.ReadFile("someFileName")
	checkError(err)

	m, err := NewManager(f, "myDFProject")
	checkError(err)

	err = m.ExportToFile("export.zip")
	checkError(err)
}

func checkError(err error) {
	if nil != err {
		log.Fatal(err)
	}
}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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