http

package
v1.44.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AuthenticationTypes = struct {
	Basic    AuthenticationType
	NTML     AuthenticationType
	Kerberos AuthenticationType
}{
	AuthenticationType("BASIC_AUTHENTICATION"),
	AuthenticationType("NTML"),
	AuthenticationType("KERBEROS"),
}

AuthenticationTypes hints the currently supported AuthenticationTypes to `BASIC_AUTHENTICATION`, `NTLM` and `KERBEROS`. Additional values ARE however possible.

Functions

func JSONBytesEqual

func JSONBytesEqual(b1, b2 []byte) bool

func JSONStringsEqual

func JSONStringsEqual(s1, s2 string) bool

func SuppressEquivalent

func SuppressEquivalent(k, old, new string, d *schema.ResourceData) bool

Types

type Authentication

type Authentication struct {
	Type        AuthenticationType `json:"type"`                // The type of authentication. Possible values are `BASIC_AUTHENTICATION`, `NTLM` and `KERBEROS`
	Credentials string             `json:"credentials"`         // The ID of the credentials within the Dynatrace Credentials Vault.
	RealmName   *string            `json:"realmName,omitempty"` // The Realm Name. Valid and required only if the type of authentication is `KERBEROS`
	KdcIP       *string            `json:"kdcIp,omitempty"`     // The KDC IP. Valid and required only if the type of authentication is `KERBEROS`
}

Authentication represents authentication options for a HTTP Request

func (*Authentication) MarshalHCL

func (me *Authentication) MarshalHCL(properties hcl.Properties) error

MarshalHCL serializes the fields of an Authentication struct into a map, using the keys specified within the Schema function

func (*Authentication) Schema

func (me *Authentication) Schema() map[string]*schema.Schema

Schema provides the schema map for the terraform provider

func (*Authentication) UnmarshalHCL

func (me *Authentication) UnmarshalHCL(decoder hcl.Decoder) error

UnmarshalHCL deserializes data available via terraform provider into the Authentication struct. The keys to be used are defined by the Schema function

type AuthenticationType

type AuthenticationType string

AuthenticationType is a type alias, nailing down currently supported AuthenticationTypes to `BASIC_AUTHENTICATION`, `NTLM` and `KERBEROS`. Additional values ARE however possible.

type Request

type Request struct {
	Description    *string              `json:"description,omitempty"`          // A short description of the event to appear in the web UI
	URL            string               `json:"url"`                            // The URL to check
	Method         string               `json:"method"`                         // The HTTP method of the request
	Authentication *Authentication      `json:"authentication"`                 // Authentication options for this request
	RequestBody    *string              `json:"requestBody,omitempty"`          // The body of the HTTP request—you need to escape all JSON characters. \n\n Is set to null if the request method is GET, HEAD, or OPTIONS.
	Validation     *validation.Settings `json:"validation,omitempty"`           // Validation helps you verify that your HTTP monitor loads the expected content
	Configuration  *request.Config      `json:"configuration,omitempty"`        // The setup of the monitor
	PreProcessing  *string              `json:"preProcessingScript,omitempty"`  // Javascript code to execute before sending the request.
	PostProcessing *string              `json:"postProcessingScript,omitempty"` // Javascript code to execute after sending the request.
	RequestTimeout *int                 `json:"requestTimeout,omitempty"`       // Adapt request timeout option - the maximum time this request is allowed to consume. Keep in mind the maximum timeout of the complete monitor is 60 seconds
}

func (*Request) MarshalHCL

func (me *Request) MarshalHCL(properties hcl.Properties) error

func (*Request) Schema

func (me *Request) Schema() map[string]*schema.Schema

func (*Request) UnmarshalHCL

func (me *Request) UnmarshalHCL(decoder hcl.Decoder) error

type Requests

type Requests []*Request

func (*Requests) Schema

func (me *Requests) Schema() map[string]*schema.Schema

type Script

type Script struct {
	Version  string   `json:"version"`  // Script version—use the `1.0` value here
	Requests Requests `json:"requests"` // A list of HTTP requests to be performed by the monitor.\n\nThe requests are executed in the order in which they appear in the script
}

func (*Script) GetVersion

func (me *Script) GetVersion() string

func (*Script) MarshalHCL

func (me *Script) MarshalHCL(properties hcl.Properties) error

func (*Script) Schema

func (me *Script) Schema() map[string]*schema.Schema

func (*Script) UnmarshalHCL

func (me *Script) UnmarshalHCL(decoder hcl.Decoder) error

type SyntheticMonitor

type SyntheticMonitor struct {
	monitors.SyntheticMonitor
	Script *Script `json:"script,omitempty"`
}

SyntheticMonitor HTTP synthetic monitor update. Some fields are inherited from base `SyntheticMonitorUpdate` model

func (*SyntheticMonitor) GetType

func (me *SyntheticMonitor) GetType() monitors.Type

func (*SyntheticMonitor) MarshalHCL

func (me *SyntheticMonitor) MarshalHCL(properties hcl.Properties) error

func (*SyntheticMonitor) MarshalJSON

func (me *SyntheticMonitor) MarshalJSON() ([]byte, error)

func (*SyntheticMonitor) Schema

func (me *SyntheticMonitor) Schema() map[string]*schema.Schema

func (*SyntheticMonitor) UnmarshalHCL

func (me *SyntheticMonitor) UnmarshalHCL(decoder hcl.Decoder) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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