lark

package
v0.12.4 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseMessage

func ParseMessage(message domain.NotificationMessage, templates domain.NotificationMessages, defaultTemplateFiles embed.FS) (string, error)

Types

type Config

type Config struct {
	Workspace LarkWorkspace
	Messages  domain.NotificationMessages
}

type LarkWorkspace

type LarkWorkspace struct {
	WorkspaceName string `mapstructure:"workspace" validate:"required"`
	ClientID      string `mapstructure:"client_id" validate:"required"`
	ClientSecret  string `mapstructure:"client_secret" validate:"required"`
	Criteria      string `mapstructure:"criteria" validate:"required"`
}

type Notifier

type Notifier struct {
	Messages domain.NotificationMessages
	// contains filtered or unexported fields
}

func NewNotifier

func NewNotifier(config *Config, httpClient utils.HTTPClient, logger log.Logger) *Notifier

func (*Notifier) Notify

func (n *Notifier) Notify(ctx context.Context, items []domain.Notification) []error

type Payload

type Payload struct {
	AppID     string `json:"app_id"`
	AppSecret string `json:"app_secret"`
}

type WorkSpaceConfig

type WorkSpaceConfig struct {
	Workspaces []LarkWorkspace `mapstructure:"workspaces"`
}

Jump to

Keyboard shortcuts

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