models

package
v0.0.0-...-da01245 Latest Latest
Warning

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

Go to latest
Published: May 5, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hook

type Hook struct {
	Name     string     `json:"name"`
	Secret   string     `json:"secret"`
	Private  bool       `json:"private"`
	Color    [4]uint8   `json:"color"`
	Created  time.Time  `json:"time"`
	Requests []*Request `json:"-"`
}

Hook is a hook model

func NewHook

func NewHook(private bool) *Hook

NewHook returns a new hook model

type Request

type Request struct {
	Name          string
	RemoteAddr    string
	Method        string
	Path          string
	Query         string
	Body          string
	ContentType   string
	ContentLength int64
	Headers       map[string]string
	FormData      map[string]string
	QueryData     map[string]string
	Created       time.Time
}

Request is a hook request model

func NewRequest

func NewRequest(r *http.Request) *Request

NewRequest returns a new request model

Jump to

Keyboard shortcuts

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