dialog

package
v0.0.0-...-54eea7a Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProcessingText

func ProcessingText(text, userName, BaseName, ToBaseName, ToSectorName, userFraction string) string

Types

type Ask

type Ask struct {
	ID         int    `json:"id"`
	Name       string `json:"name"`
	Text       string `json:"text"`        // текст ответа
	ToPage     int    `json:"to_page"`     // страница на которую ведет ответ
	TypeAction string `json:"type_action"` // функция которая выолнается при выборе этого варианта ответа
}

type Dialog

type Dialog struct {
	ID         int           `json:"id"`
	Name       string        `json:"name"`
	Pages      map[int]*Page `json:"pages"` // все страницы диалога
	AccessType string        `json:"access_type"`
	Fraction   string        `json:"fraction"`
	Type       string        `json:"type"`
	Mission    string        `json:"mission"` // говорит какая миссия начнется при ивенте асепт_миссион
}

func (*Dialog) GetPageByType

func (d *Dialog) GetPageByType(typePage string) *Page

func (*Dialog) ProcessingDialogText

func (d *Dialog) ProcessingDialogText(userName, BaseName, ToBaseName, ToSectorName, userFraction string)

type Page

type Page struct {
	ID     int    `json:"id"`
	Number int    `json:"number"`
	Name   string `json:"name"`
	Text   string `json:"text"` // текст страницы
	Asc    []Ask  `json:"asc"`  // варианты отетов

	Type string `json:"type"`
	// contains filtered or unexported fields
}

func (*Page) GetAllPicture

func (p *Page) GetAllPicture() map[string]string

func (*Page) GetPicture

func (p *Page) GetPicture(typePic string) string

func (*Page) SetPicture

func (p *Page) SetPicture(picture, typePic string)

func (*Page) SetPictures

func (p *Page) SetPictures(mainPicture, pictureReplics, pictureExplores, pictureReverses string)

Jump to

Keyboard shortcuts

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