v1.0.1 Latest Latest

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

Go to latest
Published: Oct 26, 2021 License: MIT Imports: 7 Imported by: 0



Package web is used to create and set up the routes used to host the server.

Single Project Host - func (*ServerSettings) SingleHostProjectSetup



This section is empty.


This section is empty.


This section is empty.


type RedirectSettings

type RedirectSettings struct {
	// IndexRedirect is the host you would like the index of this service to be redirect to.
	// Loaded from Environment variable indexRedirect
	IndexRedirect string
	// VCSBase is the host name of the Version Control System - ie 'https://github.com/'
	// Loaded from Environment variable vcsBase
	VCSBase string

	// VCSTeamName is the team or user name at the VCS - ie 'lafronzt'
	// Loaded from Environment variable vcsTeamName
	VCSTeamName string

	// VCSLinkMiddle is the part of the url that is in between VCSTeamName and the repo name - ie '/'
	// Loaded from Environment variable vcsLinkMiddle
	VCSLinkMiddle string

	// ProjectName is used in Logging only
	// Loaded from Environment variable projectName
	ProjectName string

RedirectSettings stores the data used to redirect the requester to the proper go source host

type ServerSettings

type ServerSettings struct {
	// Port is used to hold the port value that the server will run on
	// Loaded from Environment variable PORT
	Port string
	// RedirectSettings uses the interface RedirectSettings.
	// It holds the settings needed for the service to redirect the go get to the correct location.
	RedirectSettings RedirectSettings

ServerSettings a struck that holds variables used to create and direct the server

S exposes the Server Env Variables to the main function

func (*ServerSettings) SingleHostProjectSetup

func (s *ServerSettings) SingleHostProjectSetup() *http.Server

SingleHostProjectSetup is the Setup script to build all the server routes to handle http requests

Jump to

Keyboard shortcuts

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