Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadMappingFromFile ¶
func LoadMappingFromFile(path string, fileReader FileReader) (map[string]string, error)
Load the prefix to target url from a file
Types ¶
type ConfigWebhookURLLoader ¶
type ConfigWebhookURLLoader struct {
// contains filtered or unexported fields
}
func NewConfigWebhookURLLoader ¶
func NewConfigWebhookURLLoader(mapping map[string]string) ConfigWebhookURLLoader
func (ConfigWebhookURLLoader) Load ¶
func (c ConfigWebhookURLLoader) Load(repositoryUrl string) string
Load implements WebhookURLLoader.
Find the longest prefix match of `repositoryUrl“ and the keys of `mapping`, and return the value of that key.
type FileReader ¶
type WebhookURLLoader ¶
Click to show internal directories.
Click to hide internal directories.