testserver

package
v0.0.0-...-93e8ec0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package testserver implements HTTP server to test datamodifier service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestServer

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

TestServer represents a third-party WebAPI server for testing datamodifier server.

func NewTestServer

func NewTestServer(employeePath, absencePath, port, token string, u *entity.User, ad *entity.UserAbsenceData) *TestServer

NewTestServer returns TestServer with configured routes.

func (*TestServer) ServeHTTP

func (s *TestServer) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP handles request.

func (*TestServer) StartTestServer

func (s *TestServer) StartTestServer() error

StartTestServer starts listen and handle requests.

Jump to

Keyboard shortcuts

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