webhookv1

package
v0.38.0-rc6 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WebhookType_name = map[int32]string{
		0: "WEBHOOK_TYPE_UNSPECIFIED",
		1: "WEBHOOK_TYPE_DEFAULT",
		2: "WEBHOOK_TYPE_SLACK",
	}
	WebhookType_value = map[string]int32{
		"WEBHOOK_TYPE_UNSPECIFIED": 0,
		"WEBHOOK_TYPE_DEFAULT":     1,
		"WEBHOOK_TYPE_SLACK":       2,
	}
)

Enum value maps for WebhookType.

View Source
var (
	WebhookMode_name = map[int32]string{
		0: "WEBHOOK_MODE_UNSPECIFIED",
		1: "WEBHOOK_MODE_WORKSPACE",
		2: "WEBHOOK_MODE_SPECIFIC",
	}
	WebhookMode_value = map[string]int32{
		"WEBHOOK_MODE_UNSPECIFIED": 0,
		"WEBHOOK_MODE_WORKSPACE":   1,
		"WEBHOOK_MODE_SPECIFIC":    2,
	}
)

Enum value maps for WebhookMode.

View Source
var (
	TriggerType_name = map[int32]string{
		0: "TRIGGER_TYPE_UNSPECIFIED",
		1: "TRIGGER_TYPE_EXPERIMENT_STATE_CHANGE",
		2: "TRIGGER_TYPE_METRIC_THRESHOLD_EXCEEDED",
		3: "TRIGGER_TYPE_TASK_LOG",
		4: "TRIGGER_TYPE_CUSTOM",
	}
	TriggerType_value = map[string]int32{
		"TRIGGER_TYPE_UNSPECIFIED":               0,
		"TRIGGER_TYPE_EXPERIMENT_STATE_CHANGE":   1,
		"TRIGGER_TYPE_METRIC_THRESHOLD_EXCEEDED": 2,
		"TRIGGER_TYPE_TASK_LOG":                  3,
		"TRIGGER_TYPE_CUSTOM":                    4,
	}
)

Enum value maps for TriggerType.

View Source
var File_determined_webhook_v1_webhook_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type CustomWebhookEventData

type CustomWebhookEventData struct {

	// The level at which the event data is logged.
	Level logv1.LogLevel `protobuf:"varint,1,opt,name=level,proto3,enum=determined.log.v1.LogLevel" json:"level,omitempty"`
	// The title for the event data.
	Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	// The description for the event data.
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// contains filtered or unexported fields
}

Event data for custom trigger.

func (*CustomWebhookEventData) Descriptor deprecated

func (*CustomWebhookEventData) Descriptor() ([]byte, []int)

Deprecated: Use CustomWebhookEventData.ProtoReflect.Descriptor instead.

func (*CustomWebhookEventData) GetDescription

func (x *CustomWebhookEventData) GetDescription() string

func (*CustomWebhookEventData) GetLevel

func (x *CustomWebhookEventData) GetLevel() logv1.LogLevel

func (*CustomWebhookEventData) GetTitle

func (x *CustomWebhookEventData) GetTitle() string

func (*CustomWebhookEventData) ProtoMessage

func (*CustomWebhookEventData) ProtoMessage()

func (*CustomWebhookEventData) ProtoReflect

func (x *CustomWebhookEventData) ProtoReflect() protoreflect.Message

func (*CustomWebhookEventData) Reset

func (x *CustomWebhookEventData) Reset()

func (*CustomWebhookEventData) String

func (x *CustomWebhookEventData) String() string

type PatchWebhook

type PatchWebhook struct {

	// The new url of the webhook.
	Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	// contains filtered or unexported fields
}

PatchWebhook is a partial update to a webhook

func (*PatchWebhook) Descriptor deprecated

func (*PatchWebhook) Descriptor() ([]byte, []int)

Deprecated: Use PatchWebhook.ProtoReflect.Descriptor instead.

func (*PatchWebhook) GetUrl

func (x *PatchWebhook) GetUrl() string

func (*PatchWebhook) ProtoMessage

func (*PatchWebhook) ProtoMessage()

func (*PatchWebhook) ProtoReflect

func (x *PatchWebhook) ProtoReflect() protoreflect.Message

func (*PatchWebhook) Reset

func (x *PatchWebhook) Reset()

func (*PatchWebhook) String

func (x *PatchWebhook) String() string

type Trigger

type Trigger struct {

	// The id of the trigger.
	Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// The type of the trigger.
	TriggerType TriggerType `` /* 134-byte string literal not displayed */
	// The trigger condition.
	// For TRIGGER_TYPE_TASK_LOG needs {"regex": "abcd"}
	Condition *_struct.Struct `protobuf:"bytes,3,opt,name=condition,proto3" json:"condition,omitempty"`
	// The parent webhook of the trigger.
	WebhookId int32 `protobuf:"varint,4,opt,name=webhook_id,json=webhookId,proto3" json:"webhook_id,omitempty"`
	// contains filtered or unexported fields
}

Representation for a Trigger for a Webhook

func (*Trigger) Descriptor deprecated

func (*Trigger) Descriptor() ([]byte, []int)

Deprecated: Use Trigger.ProtoReflect.Descriptor instead.

func (*Trigger) GetCondition

func (x *Trigger) GetCondition() *_struct.Struct

func (*Trigger) GetId

func (x *Trigger) GetId() int32

func (*Trigger) GetTriggerType

func (x *Trigger) GetTriggerType() TriggerType

func (*Trigger) GetWebhookId

func (x *Trigger) GetWebhookId() int32

func (*Trigger) ProtoMessage

func (*Trigger) ProtoMessage()

func (*Trigger) ProtoReflect

func (x *Trigger) ProtoReflect() protoreflect.Message

func (*Trigger) Reset

func (x *Trigger) Reset()

func (*Trigger) String

func (x *Trigger) String() string

type TriggerType

type TriggerType int32

Enum values for expected trigger types.

const (
	// Default value
	TriggerType_TRIGGER_TYPE_UNSPECIFIED TriggerType = 0
	// For an experiment changing state
	TriggerType_TRIGGER_TYPE_EXPERIMENT_STATE_CHANGE TriggerType = 1
	// For metrics emitted during training.
	TriggerType_TRIGGER_TYPE_METRIC_THRESHOLD_EXCEEDED TriggerType = 2
	// For task logs.
	TriggerType_TRIGGER_TYPE_TASK_LOG TriggerType = 3
	// For custom alert.
	TriggerType_TRIGGER_TYPE_CUSTOM TriggerType = 4
)

func (TriggerType) Descriptor

func (TriggerType) Enum

func (x TriggerType) Enum() *TriggerType

func (TriggerType) EnumDescriptor deprecated

func (TriggerType) EnumDescriptor() ([]byte, []int)

Deprecated: Use TriggerType.Descriptor instead.

func (TriggerType) Number

func (x TriggerType) Number() protoreflect.EnumNumber

func (TriggerType) String

func (x TriggerType) String() string

func (TriggerType) Type

type Webhook

type Webhook struct {

	// The id of the webhook.
	Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// The url of the webhook.
	Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
	// The triggers of the webhook.
	Triggers []*Trigger `protobuf:"bytes,3,rep,name=triggers,proto3" json:"triggers,omitempty"`
	// The type of the webhook.
	WebhookType WebhookType `` /* 134-byte string literal not displayed */
	// The name of the webhook.
	Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"`
	// The workspace of the webhook.
	WorkspaceId int32 `protobuf:"varint,6,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"`
	// The mode of the webhook.
	Mode WebhookMode `protobuf:"varint,7,opt,name=mode,proto3,enum=determined.webhook.v1.WebhookMode" json:"mode,omitempty"`
	// contains filtered or unexported fields
}

Representation of a Webhook

func (*Webhook) Descriptor deprecated

func (*Webhook) Descriptor() ([]byte, []int)

Deprecated: Use Webhook.ProtoReflect.Descriptor instead.

func (*Webhook) GetId

func (x *Webhook) GetId() int32

func (*Webhook) GetMode

func (x *Webhook) GetMode() WebhookMode

func (*Webhook) GetName

func (x *Webhook) GetName() string

func (*Webhook) GetTriggers

func (x *Webhook) GetTriggers() []*Trigger

func (*Webhook) GetUrl

func (x *Webhook) GetUrl() string

func (*Webhook) GetWebhookType

func (x *Webhook) GetWebhookType() WebhookType

func (*Webhook) GetWorkspaceId

func (x *Webhook) GetWorkspaceId() int32

func (*Webhook) ProtoMessage

func (*Webhook) ProtoMessage()

func (*Webhook) ProtoReflect

func (x *Webhook) ProtoReflect() protoreflect.Message

func (*Webhook) Reset

func (x *Webhook) Reset()

func (*Webhook) String

func (x *Webhook) String() string

type WebhookMode

type WebhookMode int32

Enum values for webhook mode.

const (
	// Default value
	WebhookMode_WEBHOOK_MODE_UNSPECIFIED WebhookMode = 0
	// Webhook will be triggered by all experiment in the workspace
	WebhookMode_WEBHOOK_MODE_WORKSPACE WebhookMode = 1
	// Webhook will only be triggered by experiment with matching configuration in
	// the same workspace as the web hook
	WebhookMode_WEBHOOK_MODE_SPECIFIC WebhookMode = 2
)

func (WebhookMode) Descriptor

func (WebhookMode) Enum

func (x WebhookMode) Enum() *WebhookMode

func (WebhookMode) EnumDescriptor deprecated

func (WebhookMode) EnumDescriptor() ([]byte, []int)

Deprecated: Use WebhookMode.Descriptor instead.

func (WebhookMode) Number

func (x WebhookMode) Number() protoreflect.EnumNumber

func (WebhookMode) String

func (x WebhookMode) String() string

func (WebhookMode) Type

type WebhookType

type WebhookType int32

Enum values for expected webhook types.

const (
	// Default value
	WebhookType_WEBHOOK_TYPE_UNSPECIFIED WebhookType = 0
	// For a default webhook
	WebhookType_WEBHOOK_TYPE_DEFAULT WebhookType = 1
	// For a slack webhook.
	WebhookType_WEBHOOK_TYPE_SLACK WebhookType = 2
)

func (WebhookType) Descriptor

func (WebhookType) Enum

func (x WebhookType) Enum() *WebhookType

func (WebhookType) EnumDescriptor deprecated

func (WebhookType) EnumDescriptor() ([]byte, []int)

Deprecated: Use WebhookType.Descriptor instead.

func (WebhookType) Number

func (x WebhookType) Number() protoreflect.EnumNumber

func (WebhookType) String

func (x WebhookType) String() string

func (WebhookType) Type

Jump to

Keyboard shortcuts

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