Documentation ¶
Index ¶
- type Manager
- func (m *Manager) BatchUpdateEntities(name string, entities []*dialogflow.GoogleCloudDialogflowV2EntityTypeEntity) error
- func (m *Manager) Export() (string, error)
- func (m *Manager) ExportToFile(fName string) error
- func (m *Manager) Import(content string) error
- func (m *Manager) ImportFile(fName string) error
- func (m *Manager) ListEntityTypes() ([]*dialogflow.GoogleCloudDialogflowV2EntityType, error)
- func (m *Manager) Restore(content string) error
- func (m *Manager) RestoreFile(fName string) error
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager in charge of all actions related to DialogFlow
Example ¶
f, err := ioutil.ReadFile("someFileName") checkError(err) m, err := NewManager(f, "myDFProject") checkError(err) err = m.ExportToFile("export.zip") checkError(err)
Output:
func NewManager ¶
NewManager parses cli context and builds DFManager instance based on provided args
func (*Manager) BatchUpdateEntities ¶ added in v1.0.4
func (m *Manager) BatchUpdateEntities(name string, entities []*dialogflow.GoogleCloudDialogflowV2EntityTypeEntity) error
BatchUpdateEntities updates entities for one given group in batch manner
func (*Manager) Export ¶
Export downloads Dialogflow agent and returns it as BASE64 encoded zip archive string
func (*Manager) ExportToFile ¶ added in v1.0.2
ExportToFile downloads Dialogflow agent and saves to file If file name is not provided, file with GCP project name and extension .zip will be created in work directory
func (*Manager) ImportFile ¶ added in v1.0.2
ImportFile reads archive and uploads it to Dialogflow
func (*Manager) ListEntityTypes ¶ added in v1.0.4
ListEntityTypes reads and returns list of all entities that belong to the project
func (*Manager) Restore ¶
Restore reads content (BASE64 encoded agent zip archive) and restores it in Dialogflow
func (*Manager) RestoreFile ¶ added in v1.0.2
RestoreFile reads archive and restores it in Dialogflow