models

package
v0.0.0-...-be2c813 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2025 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package models provides the core data structures for handling webhook requests and responses.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	ID         string    `json:"id"`
	Time       time.Time `json:"time"`
	Region     string    `json:"region"`
	Source     string    `json:"source"`
	Account    string    `json:"account"`
	Version    string    `json:"version"`
	Detail     any       `json:"detail"`
	DetailType string    `json:"detail-type"`
	Resources  []string  `json:"resources"`
}

Event represents an AWS EventBridge event.

type EventRepository

type EventRepository struct {
	Repository RepositoryContext `json:"repository"`
}

EventRepository represents an event's repository details as part of webhook payloads or events.

type RepositoryContext

type RepositoryContext struct {
	Name     *string `json:"name,omitempty"`
	FullName *string `json:"full_name,omitempty"`
	Owner    *struct {
		Login *string `json:"login,omitempty"`
	} `json:"owner,omitempty"`
	CustomProperties map[string]string `json:"custom_properties,omitempty"`
}

RepositoryContext represents the context of a repository, including its name, full name, owner, and custom properties.

type Request

type Request struct {
	Body    string
	Headers map[string]string
}

Request represents an incoming client request containing a body and associated headers.

type Response

type Response struct {
	Body       string
	Headers    map[string]string
	StatusCode int
}

Response defines the structure for an HTTP response containing a body, headers, and a status code.

Jump to

Keyboard shortcuts

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