shoutrrr: Index | Files

package teams

import ""


Package Files

teams.go teams_config.go teams_json.go teams_token.go


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

type Config Uses

type Config struct {
    Token Token

Config for use within the teams plugin

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(url *url.URL) error

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

type JSON Uses

type JSON struct {
    CardType string `json:"@type"`
    Context  string `json:"@context"`
    Markdown bool   `json:"markdown,bool"`
    Text     string `json:"text,omitempty"`

JSON is the actual payload being sent to the teams api

type Service Uses

type Service struct {
    // contains filtered or unexported fields

Service providing teams as a notification service

func (*Service) CreateConfigFromURL Uses

func (service *Service) CreateConfigFromURL(url *url.URL) (*Config, error)

CreateConfigFromURL for use within the teams plugin

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 Microsoft Teams

type Token Uses

type Token struct {
    A   string
    B   string
    C   string

Token to be used with the teams notification service

func ParseToken Uses

func ParseToken(s string) (Token, error)

ParseToken creates a token from a string representation

func (Token) String Uses

func (t Token) String() string

Package teams imports 11 packages (graph) and is imported by 1 packages. Updated 2020-05-18. Refresh now. Tools for package owners.