gotify

package module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2020 License: GPL-3.0 Imports: 1 Imported by: 0

README

Build Status codecov

gotify

Send message anywhere

Install

go get github.com/farwydi/gotify

Adapters

Telegram

Setup with proxy

package main

import (
    "github.com/farwydi/gotify"
    "github.com/farwydi/gotify/telegram"
    "github.com/go-resty/resty/v2"
)

func main()  {
    client, _ := gotify.NewClient(
        telegram.NewTelegramAdapterWithHttp(
            "token", 1414, resty.New().
                SetProxy("http://proxyserver:8888"),
        ),
    )
    client.Send("title")
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter interface {
	Format(text []Line) []byte
	Send(subject string, message ...Line) error
	SendWithoutFormatting(p []byte) error
}

type B

type B TextElement

type CODE

type CODE TextElement

type Client

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

func MustClient

func MustClient(adaptersInit ...func() (adapter Adapter, err error)) *Client

func NewClient

func NewClient(adaptersInit ...func() (adapter Adapter, err error)) (*Client, error)

func (Client) Send

func (c Client) Send(subject string, message ...Line) (errs []error)

type Line

type Line []interface{}

func C

func C(text ...interface{}) (c Line)

Concatenation line

type TextElement

type TextElement []byte

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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