config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CommandPrefix = "circleci"

	URLPluginBase = "/plugins/" + PluginName
	URLStaticBase = URLPluginBase + "/static"

	HeaderMattermostUserID = "Mattermost-User-Id"

	BotUserName    = "circleci"
	BotDisplayName = "CircleCI"
	BotDescription = "Created by the CircleCI Plugin."

	BotIconURL        = URLStaticBase + "/circleci.png"
	BotThumbnail      = URLStaticBase + "/circleci-blue.png"
	BotIconURLSuccess = URLStaticBase + "/circleci_success.png"
	BotIconURLFailed  = URLStaticBase + "/circeci_failed.png"

	// TODO: Configurable retry count
	KVCompareAndSetMaxRetries = 5
)
View Source
const (
	PluginName = "com.mattermost.circleci"
)

Variables

View Source
var (
	Mattermost plugin.API
	BotUserID  string
)

Functions

func SetConfig

func SetConfig(c *Configuration)

Types

type Configuration

type Configuration struct {
	Secret        string `json:"Secret"`
	EncryptionKey string `json:"EncryptionKey"`
}

func GetConfig

func GetConfig() *Configuration

func (*Configuration) IsValid

func (c *Configuration) IsValid() error

IsValid is used for config validations.

func (*Configuration) ProcessConfiguration

func (c *Configuration) ProcessConfiguration() error

ProcessConfiguration is used for post-processing on configuration.

Jump to

Keyboard shortcuts

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