bridge

package
v0.0.0-...-6b8f8f6 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrAttr

func ErrAttr(err error) slog.Attr

func New

func New(
	matrixHomeserver *string,
	matrixToken *string,
	matrixRoomID *string,
	matrixTemplateFile *string,
	mqttBroker *string,
	mqttUser *string,
	mqttPassword *string,
	mqttTopic *string,
	mqttTopicQOS *int)

Types

type MatrixRequestBody

type MatrixRequestBody struct {
	Body          string `json:"body"`
	Format        string `json:"format"`
	FormattedBody string `json:"formatted_body"`
	Msgtype       string `json:"msgtype"`
}

https://spec.matrix.org/v1.8/client-server-api/#mtext

type MqttMessage

type MqttMessage struct {
	Action      string      `json:"action"`
	Tenant      string      `json:"tenant"`
	Pipeline    string      `json:"pipeline"`
	Project     string      `json:"project"`
	Branch      string      `json:"branch"`
	ChangeURL   string      `json:"change_url"`
	Message     string      `json:"message"`
	TriggerTime *jsonTime   `json:"trigger_time"`
	EnqueueTime *jsonTime   `json:"enqueue_time"`
	Change      interface{} `json:"change"`
	Patchset    string      `json:"patchset"`
	CommitID    string      `json:"commit_id"`
	Owner       string      `json:"owner"`
	Ref         string      `json:"ref"`
	ZuulRef     string      `json:"zuul_ref"`
	Buildset    struct {
		UUID   string `json:"uuid"`
		Result string `json:"result,omitempty"`
		Builds []struct {
			JobName      string        `json:"job_name"`
			Voting       bool          `json:"voting"`
			UUID         string        `json:"uuid,omitempty"`
			ExecuteTime  *jsonTime     `json:"execute_time"`
			StartTime    *jsonTime     `json:"start_time,omitempty"`
			EndTime      *jsonTime     `json:"end_time,omitempty"`
			LogURL       string        `json:"log_url,omitempty"`
			WebURL       string        `json:"web_url,omitempty"`
			Result       string        `json:"result,omitempty"`
			Dependencies []interface{} `json:"dependencies,omitempty"`
			Artifacts    []interface{} `json:"artifacts,omitempty"`
		} `json:"builds"`
	} `json:"buildset"`
}

Jump to

Keyboard shortcuts

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