internal

package
v0.0.0-...-6b5f556 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package server is the reusable server

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultConfig = Config{
		AuthPassEnvVar: "",
		AuthUserEnvVar: "",
		DefaultEnv:     "",
		ProjectRoot:    "/Users/x/go/md-doc/data",
		GitBinPath:     "/usr/bin/git",
		UploadPack:     true,
		ReceivePack:    true,
		RoutePrefix:    "",
		CommandFunc:    func(*exec.Cmd) {},
	}
)

Functions

func Handler

func Handler() http.HandlerFunc

func InitConfig

func InitConfig(config Config)

func Render2Html

func Render2Html(content []byte) string

Types

type Config

type Config struct {
	AuthPassEnvVar string
	AuthUserEnvVar string
	DefaultEnv     string
	ProjectRoot    string
	GitBinPath     string
	UploadPack     bool
	ReceivePack    bool
	RoutePrefix    string
	CommandFunc    func(*exec.Cmd)
}

type HandlerReq

type HandlerReq struct {
	Rpc  string
	Dir  string
	File string
	// contains filtered or unexported fields
}

type Service

type Service struct {
	Method  string
	Handler func(HandlerReq)
	Rpc     string
}

Jump to

Keyboard shortcuts

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