frontend

package
v0.0.0-...-058b651 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2019 License: Apache-2.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 Frontend

type Frontend struct {
	// contains filtered or unexported fields
}

Frontend is the application frontend. It manages a list of activated frontend providers such as Telegram, Messenger...

func New

func New(capsuleChan chan *capsule.Capsule) (*Frontend, error)

New initiliazes a new frontend providers manager.

func (*Frontend) Start

func (f *Frontend) Start(wg *sync.WaitGroup)

Start starts frontend providers and user inputs listening.

type ProviderConfig

type ProviderConfig struct {
	// Label is the provider label.
	Label string `json:"label" yaml:"label"`

	// IsActivated defines if the provider is activated or not.
	IsActivated bool `json:"isActivated" yaml:"isActivated"`

	// Token is the API provider token
	Token string `json:"token" yaml:"token"`

	// AutorizedUsers is a slice containing all authorized users.
	// These users are authorized to use the frontend provider.
	AuthorizedUsers []*provider.User `json:"authorizedUsers" yaml:"authorizedUsers"`
}

ProviderConfig is a structured provider configuration.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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