cmdutil

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Copyright © 2020 PagerDuty, Inc. <info@pagerduty.com>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright © 2020 PagerDuty, Inc. <info@pagerduty.com>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright © 2020 PagerDuty, Inc. <info@pagerduty.com>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

View Source
var CfgFile string

Functions

func GetNestedStringField added in v0.5.0

func GetNestedStringField(input map[string]interface{}, selectors ...string) (string, bool)

func InitConfig

func InitConfig()

InitConfig reads in config file and ENV variables if set.

func RunSendCommand

func RunSendCommand(config *Config, sendEvent eventsapi.Event) error

func StringMapToInterfaceMap added in v0.5.0

func StringMapToInterfaceMap(stringMap map[string]string) map[string]interface{}

func ValidateEnumField

func ValidateEnumField(inputVal string, allowedValues []string, err error) error

Types

type Config

type Config struct {
	HttpClient func() (*http.Client, error)
	Client     func() (*client.Client, error)
}

func NewConfig

func NewConfig() *Config

type Defaults

type Defaults struct {
	Address    string
	ConfigPath string
	Database   string
	Pidfile    string
	Secret     string
	Region     string
}

func GetDefaults

func GetDefaults() Defaults

Jump to

Keyboard shortcuts

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