zulip

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Send

func Send() *cli.Command

Types

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPClient interface

var Client HTTPClient

type ZBot

type ZBot struct {
	EmailID string
	APIKey  string
}

type ZResponse

type ZResponse struct {
	ID      int    `json:"id"`
	Message string `json:"msg"`
	Result  string `json:"result"`
	Code    string `json:"code"`
}

func SendZulipMessage

func SendZulipMessage(zulipDomain string, zulipOpts Zulip) (*ZResponse, error)

SendZulipMessage function takes the zulip domain and zulip bot type, to, topic and content in the form of json byte array and sends message to zulip.

type Zulip

type Zulip struct {
	ZBot
	Type    string
	To      string
	Topic   string
	Content string
	Domain  string
}

Zulip holds all the necessary options to use zulip

Jump to

Keyboard shortcuts

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