provider

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2023 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	INDEX_CREATED int = iota
	INDEX_EXISTS
	INDEX_CREATION_FAILED
)
View Source
const DESTINATION_INDEX = ".opendistro-alerting-config"
View Source
const DESTINATION_NAME_FIELD = "destination.name.keyword"
View Source
const DESTINATION_TYPE = "_doc"

Variables

This section is empty.

Functions

func Provider

func Provider() *schema.Provider

func WithHeader

func WithHeader(rt http.RoundTripper) withHeader

Types

type Destination

type Destination struct {
	ID            string      `json:"id"`
	Type          string      `json:"type"`
	Name          string      `json:"name"`
	Slack         interface{} `json:"slack,omitempty"`
	CustomWebhook interface{} `json:"custom_webhook,omitempty"`
	Chime         interface{} `json:"chime,omitempty"`
	SNS           interface{} `json:"sns,omitempty"`
	Email         interface{} `json:"email,omitempty"`
}

type GetPolicyResponse

type GetPolicyResponse struct {
	PolicyID    string                 `json:"_id"`
	Version     int                    `json:"_version"`
	PrimaryTerm int                    `json:"_primary_term"`
	SeqNo       int                    `json:"_seq_no"`
	Policy      map[string]interface{} `json:"policy"`
}

type IndexPermissions

type IndexPermissions struct {
	IndexPatterns         []string `json:"index_patterns"`
	DocumentLevelSecurity string   `json:"dls"`
	FieldLevelSecurity    []string `json:"fls"`
	MaskedFields          []string `json:"masked_fields"`
	AllowedActions        []string `json:"allowed_actions"`
}

type PolicyMapping

type PolicyMapping struct {
	PolicyID string        `json:"policy_id"`
	State    string        `json:"state"`
	IsSafe   bool          `json:"is_safe"`
	Include  []interface{} `json:"include"`
}

type PolicyMappingResponse

type PolicyMappingResponse struct {
	UpdatedIndices int           `json:"updated_indices"`
	Failures       bool          `json:"failures"`
	FailedIndices  []interface{} `json:"failed_indices"`
}

type ProviderConf

type ProviderConf struct {
	// contains filtered or unexported fields
}

type PutPolicyResponse

type PutPolicyResponse struct {
	PolicyID    string `json:"_id"`
	Version     int    `json:"_version"`
	PrimaryTerm int    `json:"_primary_term"`
	SeqNo       int    `json:"_seq_no"`
	Policy      struct {
		Policy map[string]interface{} `json:"policy"`
	} `json:"policy"`
}

type RoleBody

type RoleBody struct {
	Description        string              `json:"description"`
	ClusterPermissions []string            `json:"cluster_permissions,omitempty"`
	IndexPermissions   []IndexPermissions  `json:"index_permissions,omitempty"`
	TenantPermissions  []TenantPermissions `json:"tenant_permissions,omitempty"`
}

type RoleMappingResponse

type RoleMappingResponse struct {
	Message string `json:"message"`
	Status  string `json:"status"`
}

type RoleResponse

type RoleResponse struct {
	Message string `json:"message"`
	Status  string `json:"status"`
}

type RolesMapping

type RolesMapping struct {
	BackendRoles    []string `json:"backend_roles"`
	Hosts           []string `json:"hosts"`
	Users           []string `json:"users"`
	Description     string   `json:"description"`
	AndBackendRoles []string `json:"and_backend_roles"`
}

type Script

type Script struct {
	Name   string     `json:"name"`
	Script ScriptBody `json:"script"`
}

type ScriptBody

type ScriptBody struct {
	Language string `json:"lang"`
	Source   string `json:"source"`
}

type ServerFlavor

type ServerFlavor int64
const (
	Unknown ServerFlavor = iota
	OpenSearch
)

opensearch

type TenantBody

type TenantBody struct {
	Description string `json:"description"`
}

type TenantPermissions

type TenantPermissions struct {
	TenantPatterns []string `json:"tenant_patterns"`
	AllowedActions []string `json:"allowed_actions"`
}

type TenantResponse

type TenantResponse struct {
	Message string `json:"message"`
	Status  string `json:"status"`
}

type UserBody

type UserBody struct {
	BackendRoles []interface{}          `json:"backend_roles"`
	Attributes   map[string]interface{} `json:"attributes"`
	Description  string                 `json:"description"`
	Password     string                 `json:"password,omitempty"`
	PasswordHash string                 `json:"hash,omitempty"`
}

UserBody used by the odfe's API

type UserResponse

type UserResponse struct {
	Message string `json:"message"`
	Status  string `json:"status"`
}

UserResponse sent by the odfe's API

Jump to

Keyboard shortcuts

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