teams

package
v0.0.0-...-7f90a9e Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	standard.QuerylessConfig
	standard.EnumlessConfig
	Token Token
}

Config for use within the teams plugin

func (*Config) GetURL

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

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

func (*Config) SetURL

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

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

type JSON

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

type Service struct {
	standard.Standard
	// contains filtered or unexported fields
}

Service providing teams as a notification service

func (*Service) CreateConfigFromURL

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

CreateConfigFromURL for use within the teams plugin

func (*Service) Initialize

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

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

Send a notification message to Microsoft Teams

type Token

type Token struct {
	A string
	B string
	C string
}

Token to be used with the teams notification service

func ParseToken

func ParseToken(s string) (Token, error)

ParseToken creates a token from a string representation

func (Token) String

func (t Token) String() string

Jump to

Keyboard shortcuts

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