shoutrrr: Index | Files

package zulip

import ""


Package Files

zulip.go zulip_config.go zulip_errors.go zulip_payload.go


const (
    // Scheme is the identifying part of this service's configuration URL
    Scheme = "zulip"

func CreatePayload Uses

func CreatePayload(config *Config, message string) url.Values

CreatePayload compatible with the zulip api

type Config Uses

type Config struct {
    BotMail string
    BotKey  string
    Host    string
    Path    string
    Stream  string
    Topic   string

Config for the zulip service

func CreateConfigFromURL Uses

func CreateConfigFromURL(serviceURL *url.URL) (*Config, error)

CreateConfigFromURL to use within the zulip service

func (*Config) Clone Uses

func (config *Config) Clone() *Config

Clone the config to a new Config struct

func (*Config) GetURL Uses

func (config *Config) GetURL() *url.URL

GetURL returns a URL representation of it's current field values

func (*Config) SetURL Uses

func (config *Config) SetURL(serviceURL *url.URL) error

SetURL updates a ServiceConfig from a URL representation of it's field values

type ErrorMessage Uses

type ErrorMessage string

ErrorMessage for error events within the zulip service

const (
    // MissingAPIKey from the service URL
    MissingAPIKey ErrorMessage = "missing API key"
    // MissingHost from the service URL
    MissingHost ErrorMessage = "missing Zulip host"
    // MissingBotMail from the service URL
    MissingBotMail ErrorMessage = "missing Bot mail address"
    // TopicTooLong if topic is more than 60 characters
    TopicTooLong ErrorMessage = "topic exceeds max length (%d characters): was %d characters"

type Service Uses

type Service struct {
    // contains filtered or unexported fields

Service sends notifications to a pre-configured channel or user

func (*Service) Initialize Uses

func (service *Service) Initialize(configURL *url.URL, logger *log.Logger) error

Initialize loads ServiceConfig from configURL and sets logger for this Service

func (*Service) Send Uses

func (service *Service) Send(message string, params *types.Params) error

Send a notification message to Zulip

Package zulip imports 8 packages (graph) and is imported by 1 packages. Updated 2020-07-05. Refresh now. Tools for package owners.