Documentation
¶
Overview ¶
Package services для подключения сервисов и устроения взаимодействия сервисов с главным потоком
Index ¶
- Constants
- func AddService(name string, pService IService)
- func Close(name string, out chan<- interface{}) error
- func Connect(name string, in <-chan interface{}) (out chan interface{}, err error)
- func ExamlpeSendEmail()
- func GeneratePassword(email string) (string, error)
- func GenerateRandomBytes(n int) ([]byte, error)
- func GenerateRandomString(s int) (string, error)
- func Get(name string, messages ...interface{}) (response interface{}, err error)
- func HashPassword(password []byte) uint32
- func InitServices() *rootServices
- func Send(name string, messages ...interface{}) (err error)
- func Status(name string) string
- func VerifyMail(email, password string)
- type ErrBrokenConnection
- type ErrServiceNotCorrectOperation
- type ErrServiceNotCorrectParamType
- type ErrServiceNotEnoughParameter
- type ErrServiceNotFound
- type ErrServiceNotReady
- type ErrServiceWrongIndex
- type IService
- type Mail
Constants ¶
const PATH_FLAG = "-path"
PATH_FLAG - сиситемая константа - флаг пути к файлам конфигурации.
const STATUS_ERROR = "error"
STATUS_ERROR - стстус Сервиса - "Ошибка"
const STATUS_PREPARING = "preparing data"
STATUS_PREPARING - стстус Сервиса - "Подготовка сервиса"
const STATUS_READY = "ready"
STATUS_READY - стстус Сервиса - "Готово"
const TYPE_HTML = "text/html"
TYPE_HTML - тип отправляемого сообщения - "HTML"
const TYPE_PLAIN_TEXT = "text/plain"
TYPE_PLAIN_TEXT - тип отправляемого сообщения - "Текст"
Variables ¶
This section is empty.
Functions ¶
func AddService ¶
AddService adding new service with {name} to services list
func GeneratePassword ¶ added in v1.0.310
GeneratePassword run password by email
func GenerateRandomBytes ¶ added in v1.0.310
GenerateRandomBytes returns securely generated random bytes. It will return an error if the system's secure random number generator fails to function correctly, in which case the caller should not continue.
func GenerateRandomString ¶ added in v1.0.310
GenerateRandomString returns a URL-safe, base64 encoded securely generated random string. It will return an error if the system's secure random number generator fails to function correctly, in which case the caller should not continue.
func HashPassword ¶ added in v1.0.310
HashPassword create hash from {password} & return checksumm
func InitServices ¶
func InitServices() *rootServices
InitServices started all services from sServices.services in some goroutins
func VerifyMail ¶
func VerifyMail(email, password string)
VerifyMail - проверка на валидность email - адреса
Types ¶
type ErrBrokenConnection ¶
type ErrBrokenConnection struct { Name string Param interface{} }
ErrBrokenConnection for errors broken connection
func (ErrBrokenConnection) Error ¶
func (err ErrBrokenConnection) Error() string
type ErrServiceNotCorrectOperation ¶
ErrServiceNotCorrectOperation for errors if input operation is not valid
func (ErrServiceNotCorrectOperation) Error ¶
func (err ErrServiceNotCorrectOperation) Error() string
type ErrServiceNotCorrectParamType ¶
ErrServiceNotCorrectParamType for errors if parameter is not valid
func (ErrServiceNotCorrectParamType) Error ¶
func (err ErrServiceNotCorrectParamType) Error() string
type ErrServiceNotEnoughParameter ¶
type ErrServiceNotEnoughParameter struct { Name string Param interface{} }
ErrServiceNotEnoughParameter for errors if not found required parameter
func (ErrServiceNotEnoughParameter) Error ¶
func (err ErrServiceNotEnoughParameter) Error() string
type ErrServiceNotFound ¶
type ErrServiceNotFound struct {
Name string
}
ErrServiceNotFound for errors when current service not found
func (ErrServiceNotFound) Error ¶
func (err ErrServiceNotFound) Error() string
type ErrServiceNotReady ¶
type ErrServiceNotReady struct {
Name string
}
ErrServiceNotReady for errors if service not ready
func (ErrServiceNotReady) Error ¶
func (err ErrServiceNotReady) Error() string
type ErrServiceWrongIndex ¶
ErrServiceWrongIndex for errors wrong index in array range TODO: wrote correct comment for this type
func (ErrServiceWrongIndex) Error ¶
func (err ErrServiceWrongIndex) Error() string