config

package
v0.0.0-...-5de3a08 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BotDescription = "Created by the %s Plugin."

	PathOAuth2                = "/oauth2"
	PathComplete              = "/complete"
	PathAPI                   = "/api/v1"
	PathDialogs               = "/dialogs"
	PathSetAutoRespondMessage = "/set-auto-respond-message"
	PathPostAction            = "/action"
	PathRespond               = "/respond"
	PathAccept                = "/accept"
	PathDecline               = "/decline"
	PathTentative             = "/tentative"
	PathConfirmStatusChange   = "/confirm"
	PathNotification          = "/notification/v1"
	PathEvent                 = "/event"
	PathVerifyDomain          = "/verify"

	PathAutocomplete = "/autocomplete"
	PathUsers        = "/users"
	PathChannels     = "/channels"

	InternalAPIPath   = "/api/v1"
	PathEvents        = "/events"
	PathCreate        = "/create"
	PathProvider      = "/provider"
	PathConnectedUser = "/me"

	FullPathEventNotification = PathNotification + PathEvent
	FullPathOAuth2Redirect    = PathOAuth2 + PathComplete

	EventIDKey = "EventID"
)

REVIEW: need an interface for returning bot info probably good to have a struct to capture the data clump

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	PluginID               string
	BuildDate              string
	BuildHash              string
	BuildHashShort         string
	MattermostSiteHostname string
	MattermostSiteURL      string
	PluginURL              string
	PluginURLPath          string
	PluginVersion          string
	StoredConfig
	Provider ProviderConfig
}

Config represents the the metadata handed to all request runners (command, http).

func (*Config) GetNotificationURL

func (c *Config) GetNotificationURL() string

type ProviderConfig

type ProviderConfig struct {
	Name               string
	DisplayName        string
	Repository         string
	CommandTrigger     string
	TelemetryShortName string
	BotUsername        string
	BotDisplayName     string
	Features           ProviderFeatures
}

ProviderConfig represents the specific configuration that changes when building for different calendar providers.

var Provider ProviderConfig

type ProviderFeatures

type ProviderFeatures struct {
	EncryptedStore     bool
	EventNotifications bool
}

type StoredConfig

type StoredConfig struct {
	OAuth2Authority    string
	OAuth2ClientID     string
	OAuth2ClientSecret string
	bot.Config
	EnableStatusSync   bool
	EnableDailySummary bool

	EncryptionKey string
}

StoredConfig represents the data stored in and managed with the Mattermost config.

Jump to

Keyboard shortcuts

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