typetalk

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const EnvToken = "TYPETALK_TOKEN"

EnvToken is Typetalk API Token

View Source
const EnvTopicID = "TYPETALK_TOPIC_ID"

EnvTopicID is Typetalk topic ID

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	ChatPostMessage(ctx context.Context, message string) (*typetalk.PostedMessageResult, *typetalkShared.Response, error)
}

API is Typetalk API interface

type Client

type Client struct {
	*typetalk.Client
	Config Config

	Notify *NotifyService
	API    API
	// contains filtered or unexported fields
}

Client represents Typetalk API client.

func NewClient

func NewClient(cfg Config) (*Client, error)

NewClient returns Client initialized with Config

type Config

type Config struct {
	Token    string
	Title    string
	TopicID  string
	Message  string
	CI       string
	Parser   terraform.Parser
	Template terraform.Template
}

Config is a configuration for Typetalk Client

type NotifyService

type NotifyService service

NotifyService handles notification process.

func (*NotifyService) Notify

func (s *NotifyService) Notify(body string) (exit int, err error)

Notify posts message to Typetalk.

type Typetalk

type Typetalk struct {
	*typetalk.Client
	TopicID int
}

Typetalk represents the attribute information necessary for requesting Typetalk API

Jump to

Keyboard shortcuts

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