Help us shape the future of Go! Take the 2026 Go Developer Survey

mockserver

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockPR

type MockPR struct {
	Repo   string
	Number int
	Title  string
	Draft  bool
	Role   string
}

type RequestLog

type RequestLog struct {
	Method string
	Path   string
	Body   map[string]interface{}
}

type Server

type Server struct {
	*httptest.Server

	PRs []MockPR
	// contains filtered or unexported fields
}

func New

func New() *Server

func (*Server) AddPR

func (s *Server) AddPR(pr MockPR)

func (*Server) HasApproveRequest

func (s *Server) HasApproveRequest(repo string, number int) bool

func (*Server) HasMergeRequest

func (s *Server) HasMergeRequest(repo string, number int, method string) bool

func (*Server) Requests

func (s *Server) Requests() []RequestLog

func (*Server) Reset

func (s *Server) Reset()

Jump to

Keyboard shortcuts

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