v1

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContentTypeNames

func ContentTypeNames() []string

ContentTypeNames returns a list of possible string values of ContentType.

func NotifierTypeNames

func NotifierTypeNames() []string

NotifierTypeNames returns a list of possible string values of NotifierType.

Types

type Channel

type Channel struct {
	metav1.DbMeta    `json:",inline" xorm:"extends"` //inline dbmeta
	metav1.UuidMeta  `json:",inline" xorm:"extends"` //inline uuidmeta
	metav1.LabelMeta `json:",inline" xorm:"extends"` //inline labelmeta
	ChannelProperty  `json:",inline" xorm:"extends"` //inline property
}

DATABASE SCHEMA: EVENT

func (Channel) TableName

func (Channel) TableName() string

type ChannelNotifierEdge

type ChannelNotifierEdge struct {
	metav1.DbMeta               `json:",inline" xorm:"extends"`
	ChannelNotifierEdgeProperty `json:",inline" xorm:"extends"` //inline property
}

func (ChannelNotifierEdge) TableName

func (ChannelNotifierEdge) TableName() string

type ChannelNotifierEdgeProperty

type ChannelNotifierEdgeProperty struct {
	ChannelUuid  string `json:"channel_uuid,omitempty"  xorm:"'channel_uuid'  char(32)     notnull index"` //
	NotifierType string `json:"notifier_type,omitempty" xorm:"'notifier_type' varchar(255) notnull index"` //
	NotifierUuid string `json:"notifier_uuid,omitempty" xorm:"'notifier_uuid' char(32)     notnull index"` //
}

type ChannelProperty

type ChannelProperty struct {
	ClusterUuid string `json:"cluster_uuid,omitempty" xorm:"'cluster_uuid' char(32)     notnull index"` //

}

type ChannelWithEdges

type ChannelWithEdges struct {
	Channel       `json:",inline" xorm:"extends"`
	NotifierEdges []NotifierEdge `json:"notifier_edges,omitempty"`
}

type Channel_create

type Channel_create struct {
	metav1.LabelMeta `json:",inline" xorm:"extends"` //inline labelmeta
	ChannelProperty  `json:",inline" xorm:"extends"` //inline property
	NotifierEdges    []NotifierEdge                  `json:"notifier_edges,omitempty"`
}

type Channel_update

type Channel_update struct {
	metav1.LabelMeta `json:",inline" xorm:"extends"` //inline labelmeta
	ChannelProperty  `json:",inline" xorm:"extends"` //inline property
}

type ContentType

type ContentType int
ENUM(

application/json application/xml )

const (
	// ContentTypeApplicationJson is a ContentType of type Application/Json.
	ContentTypeApplicationJson ContentType = iota
	// ContentTypeApplicationXml is a ContentType of type Application/Xml.
	ContentTypeApplicationXml
)

func ParseContentType

func ParseContentType(name string) (ContentType, error)

ParseContentType attempts to convert a string to a ContentType.

func (ContentType) String

func (x ContentType) String() string

String implements the Stringer interface.

type MIME

type MIME struct {
	ContentType string `json:"Content-Type"              xorm:"'content_type'              notnull"`
}

database meta info

func (MIME) Valid

func (mime MIME) Valid() error

type NotifierConsole

type NotifierConsole struct {
	metav1.DbMeta           `json:",inline" xorm:"extends"` //inline dbmeta
	metav1.UuidMeta         `json:",inline" xorm:"extends"` //inline uuidmeta
	metav1.LabelMeta        `json:",inline" xorm:"extends"` //inline labelmeta
	NotifierConsoleProperty `json:",inline" xorm:"extends"` //inline property
	MIME                    `json:",inline" xorm:"extends"` //inline MIME
}

func (NotifierConsole) TableName

func (NotifierConsole) TableName() string

type NotifierConsoleProperty

type NotifierConsoleProperty struct{}

func (NotifierConsoleProperty) Type

type NotifierConsole_create

type NotifierConsole_create struct {
	metav1.LabelMeta        `json:",inline" xorm:"extends"` //inline labelmeta
	NotifierConsoleProperty `json:",inline" xorm:"extends"` //inline property
	MIME                    `json:",inline" xorm:"extends"` //inline MIME
}

type NotifierEdge

type NotifierEdge struct {
	NotifierType string `json:"notifier_type,omitempty"` //
	NotifierUuid string `json:"notifier_uuid,omitempty"` //
}

type NotifierRabbitMq

type NotifierRabbitMq struct {
	metav1.DbMeta            `json:",inline" xorm:"extends"` //inline dbmeta
	metav1.UuidMeta          `json:",inline" xorm:"extends"` //inline uuidmeta
	metav1.LabelMeta         `json:",inline" xorm:"extends"` //inline labelmeta
	NotifierRabbitMqProperty `json:",inline" xorm:"extends"` //inline property
	MIME                     `json:",inline" xorm:"extends"` //inline MIME
}

func (NotifierRabbitMq) TableName

func (NotifierRabbitMq) TableName() string

type NotifierRabbitMqProperty

type NotifierRabbitMqProperty struct {
	//amqp Dial
	Url string `json:"url" xorm:"'url' notnull"`

	//amqp.Channel.Publish
	Exchange   *string `json:"exchange"    xorm:"'exchange'    null"`
	RoutingKey *string `json:"routing_key" xorm:"'routing_key' null"`
	Mandatory  *bool   `json:"mandatory"   xorm:"'mandatory'   null"`
	Immediate  *bool   `json:"immediate"   xorm:"'immediate'   null"`

	//amqp.Publishing
	MessageHeaders         map[string]interface{} `json:"message_headers,omitempty" xorm:"'message_headers'          null"` // Application or header exchange table
	MessageContentType     *string                `json:"message_content_type"      xorm:"'message_content_type'     null"` // MIME content type
	MessageContentEncoding *string                `json:"message_content_encoding"  xorm:"'message_content_encoding' null"` // MIME content encoding
	MessageDeliveryMode    *uint8                 `json:"message_delivery_mode"     xorm:"'message_delivery_mode'    null"` // queue implementation use - Transient (1) or Persistent (2)
	MessagePriority        *uint8                 `json:"message_priority"          xorm:"'message_priority'         null"` // queue implementation use - 0 to 9
	MessageCorrelationId   *string                `json:"message_correlation_id"    xorm:"'message_correlation_id'   null"` // application use - correlation identifier
	MessageReplyTo         *string                `json:"message_reply_to"          xorm:"'message_reply_to'         null"` // application use - address to to reply to (ex: RPC)
	MessageExpiration      *string                `json:"message_expiration"        xorm:"'message_expiration'       null"` // implementation use - message expiration spec
	MessageMessageId       *string                `json:"message_message_id"        xorm:"'message_message_id'       null"` // application use - message identifier
	MessageTimestamp       *bool                  `json:"message_timestamp"         xorm:"'message_timestamp'        null"` // application use - message timestamp
	MessageType            *string                `json:"message_type"              xorm:"'message_type'             null"` // application use - message type name
	MessageUserId          *string                `json:"message_user_id"           xorm:"'message_user_id'          null"` // application use - creating user id
	MessageAppId           *string                `json:"message_app_id"            xorm:"'message_app_id'           null"` // application use - creating application
}

func (NotifierRabbitMqProperty) Type

type NotifierRabbitMq_create

type NotifierRabbitMq_create struct {
	metav1.LabelMeta         `json:",inline" xorm:"extends"` //inline labelmeta
	NotifierRabbitMqProperty `json:",inline" xorm:"extends"` //inline property
	MIME                     `json:",inline" xorm:"extends"` //inline MIME
}

type NotifierStatus

type NotifierStatus struct {
	metav1.DbMeta          `json:",inline" xorm:"extends"`
	metav1.UuidMeta        `json:",inline" xorm:"extends"` //inline uuidmeta
	NotifierStatusProperty `json:",inline" xorm:"extends"` //inline property
}

func (NotifierStatus) TableName

func (NotifierStatus) TableName() string

type NotifierStatusProperty

type NotifierStatusProperty struct {
	NotifierType string `json:"notifier_type,omitempty" xorm:"'notifier_type' varchar(255) notnull index"` //
	NotifierUuid string `json:"notifier_uuid,omitempty" xorm:"'notifier_uuid' char(32)     notnull index"` //
	Error        string `json:"error,omitempty"         xorm:"'error'         TEXT         null"`          //
}

type NotifierType

type NotifierType int
ENUM(

console webhook rabbitmq )

const (
	// NotifierTypeConsole is a NotifierType of type Console.
	NotifierTypeConsole NotifierType = iota
	// NotifierTypeWebhook is a NotifierType of type Webhook.
	NotifierTypeWebhook
	// NotifierTypeRabbitmq is a NotifierType of type Rabbitmq.
	NotifierTypeRabbitmq
)

func ParseNotifierType

func ParseNotifierType(name string) (NotifierType, error)

ParseNotifierType attempts to convert a string to a NotifierType.

func (NotifierType) String

func (x NotifierType) String() string

String implements the Stringer interface.

type NotifierWebhook

type NotifierWebhook struct {
	metav1.DbMeta           `json:",inline" xorm:"extends"` //inline dbmeta
	metav1.UuidMeta         `json:",inline" xorm:"extends"` //inline uuidmeta
	metav1.LabelMeta        `json:",inline" xorm:"extends"` //inline labelmeta
	NotifierWebhookProperty `json:",inline" xorm:"extends"` //inline property
	MIME                    `json:",inline" xorm:"extends"` //inline MIME
}

func (NotifierWebhook) TableName

func (NotifierWebhook) TableName() string

type NotifierWebhookProperty

type NotifierWebhookProperty struct {
	//http
	Method         string            `json:"method"                    xorm:"'method'          varchar(255) notnull"`                                    //
	Url            string            `json:"url"                       xorm:"'url'                          notnull"`                                    //
	RequestHeaders map[string]string `json:"request_headers,omitempty" xorm:"'request_headers'              null"   `                                    //
	RequestTimeout string            `json:"request_timeout"           xorm:"'request_timeout' varchar(16)  null    comment('fmt(time.ParseDuration)')"` //for timeout context
}

func (NotifierWebhookProperty) Type

type NotifierWebhook_create

type NotifierWebhook_create struct {
	metav1.LabelMeta        `json:",inline" xorm:"extends"` //inline labelmeta
	NotifierWebhookProperty `json:",inline" xorm:"extends"` //inline property
	MIME                    `json:",inline" xorm:"extends"` //inline MIME
}

Jump to

Keyboard shortcuts

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