server

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assert

func Assert(cond bool, message string)

Types

type EndpointMapping

type EndpointMapping struct {
	Path            string             `json:"path"`
	Method          *string            `json:"method"`
	Payload         *interface{}       `json:"payload"`
	PayloadType     PayloadType        `json:"payload_type"`
	ResponseHeaders *map[string]string `json:"resposne_headers"`
	StatusCode      *int               `json:"status_code"`
}

type PayloadType

type PayloadType string
const (
	PayloadTypeJson PayloadType = "json"
	PayloadTypeText PayloadType = "text"
)

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(opts ServerOptions) *Server

func (*Server) Run

func (s *Server) Run()

func (*Server) Stop

func (s *Server) Stop()

type ServerOptions

type ServerOptions struct {
	ListenAddress string
	MappingJson   string
}

Jump to

Keyboard shortcuts

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