connected

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2025 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Botoptions

type Botoptions struct {
	Watchman *watchman.Watchmanconfig `json:"watchman,omitempty"`

	Dbpath              string                   `json:"db_path,omitempty"`
	TemplatesPath       string                   `json:"templates_path"`
	Bottoken            string                   `json:"bot_token,omitempty"`
	Botmainurl          string                   `json:"bot_mainurl,omitempty"`
	Metadata            *controller.MetadataConf `json:"metadata,omitempty"`
	WebHookServerOption *server.ServerOption     `json:"webhook_server,omitempty"`
	SboxConfPath        string                   `json:"sbox_path,omitempty"`
	LoggerOption        LoggerOptions            `json:"log,omitempty"`

	Logger *zap.Logger     `json:"-"`
	Ctx    context.Context `json:"-"`
	//Templates  map[string]map[string]botapi.MgItem `json:"-"`
	Sboxoption option.Options `json:"-"`
}

type ConnectedBot

type ConnectedBot struct {
	Ctx context.Context

	Botapi botapi.BotAPI

	Webhookserver *server.Webhookserver
	Parser        parser.Parserwrap
	Ctrl          *controller.Controller
	Watchman      *watchman.Watchman
	Services      []service.Service
	// contains filtered or unexported fields
}

func New

func New(options Botoptions) (*ConnectedBot, error)

func (*ConnectedBot) Close

func (c *ConnectedBot) Close() error

func (*ConnectedBot) Start

func (c *ConnectedBot) Start() error

type LoggerOptions

type LoggerOptions struct {
	Paths    []string `json:"paths,omitempty"`
	Level    string   `json:"level,omitempty"`
	Encoding string   `json:"encoding,omitempty"`
}

Jump to

Keyboard shortcuts

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