webhookv1

package
v0.0.0-...-3511abf Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: Apache-2.0 Imports: 6 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 (
	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",
	}
	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,
	}
)

Enum value maps for TriggerType.

View Source
var File_determined_webhook_v1_webhook_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

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
)

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 */
	// 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) GetTriggers

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

func (*Webhook) GetUrl

func (x *Webhook) GetUrl() string

func (*Webhook) GetWebhookType

func (x *Webhook) GetWebhookType() WebhookType

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 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