common

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DelayUntilHeader = "DelayUntil"
)

Variables

This section is empty.

Functions

func DelayMessageIfNeeded

func DelayMessageIfNeeded(logger *zerolog.Logger, msg *nats.Msg) bool

func QueueMessage

func QueueMessage(
	logger *zerolog.Logger,
	js nats.JetStreamContext,
	kv nats.KeyValue,
	interval time.Duration,
	subject,
	msgID string,
	msg any,
) error

Types

type PullRequest

type PullRequest struct {
	Number int64 `json:"number"`
}

type QueuePullRequestMessage

type QueuePullRequestMessage struct {
	InstallationID int64       `json:"installation_id"`
	Repository     Repository  `json:"repository"`
	PullRequest    PullRequest `json:"pull_request"`
}

type QueuePushMessage

type QueuePushMessage struct {
	InstallationID int64      `json:"installation_id"`
	Repository     Repository `json:"repository"`
}

type RegexItem

type RegexItem struct {
	Text  string
	Regex *regexp.Regexp
}

func MustNewRegexItem

func MustNewRegexItem(text string) (i RegexItem)

func (*RegexItem) Equal

func (sl *RegexItem) Equal(s string) bool

func (*RegexItem) MarshalJSON

func (sl *RegexItem) MarshalJSON() ([]byte, error)

func (*RegexItem) MarshalYAML

func (sl *RegexItem) MarshalYAML() (interface{}, error)

func (*RegexItem) UnmarshalJSON

func (sl *RegexItem) UnmarshalJSON(data []byte) error

func (*RegexItem) UnmarshalYAML

func (sl *RegexItem) UnmarshalYAML(unmarshal func(interface{}) error) error

type RegexSlice

type RegexSlice []RegexItem

func (RegexSlice) ContainsOneOf

func (sl RegexSlice) ContainsOneOf(items ...string) string

func (RegexSlice) String

func (sl RegexSlice) String() string

func (RegexSlice) Strings

func (sl RegexSlice) Strings() []string

type Repository

type Repository struct {
	FullName  string `json:"full_name"`
	Name      string `json:"name"`
	NodeID    string `json:"node_id"`
	OwnerName string `json:"owner_name"`
	Private   bool   `json:"private"`
}

Jump to

Keyboard shortcuts

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