server

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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseRequest

type BaseRequest struct {
	Action       string `json:"action"`
	Installation struct {
		ID int64 `json:"id"`
	} `json:"installation"`
	Repository struct {
		NodeID   string `json:"node_id"`
		FullName string `json:"full_name"`
		Name     string `json:"name"`
		Owner    struct {
			Login string `json:"login"`
		} `json:"owner"`
		Private bool `json:"private"`
	} `json:"repository"`
}

func (*BaseRequest) IsValid

func (req *BaseRequest) IsValid(logger *zerolog.Logger) bool

type GetLoggerForContext

type GetLoggerForContext func(ctx context.Context) *zerolog.Logger

type Handler

type Handler struct {
	GetLoggerForContext         GetLoggerForContext
	AllowedRepositories         common.RegexSlice
	AllowOnlyPublicRepositories bool

	JetStreamContext   nats.JetStreamContext
	PullRequestSubject string
	PushSubject        string

	RateLimitKV       nats.KeyValue
	RateLimitInterval time.Duration
}

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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